winlib.mak 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. # Copyright (C) 1991-1999, 2000 Aladdin Enterprises. All rights reserved.
  2. #
  3. # This software is provided AS-IS with no warranty, either express or
  4. # implied.
  5. #
  6. # This software is distributed under license and may not be copied,
  7. # modified or distributed except as expressly authorized under the terms
  8. # of the license contained in the file LICENSE in this distribution.
  9. #
  10. # For more information about licensing, please refer to
  11. # http://www.ghostscript.com/licensing/. For information on
  12. # commercial licensing, go to http://www.artifex.com/licensing/ or
  13. # contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  14. # San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  15. # $Id: winlib.mak,v 1.24 2004/12/01 20:02:11 ray Exp $
  16. # Common makefile section for 32-bit MS Windows.
  17. # This makefile must be acceptable to Microsoft Visual C++, Watcom C++,
  18. # and Borland C++. For this reason, the only conditional directives
  19. # allowed are !if[n]def, !else, and !endif.
  20. # Note that built-in third-party libraries aren't available.
  21. SHARE_JPEG=0
  22. SHARE_LIBPNG=0
  23. SHARE_ZLIB=0
  24. SHARE_JBIG2=0
  25. SHARE_JASPER=0
  26. # Define the platform name.
  27. !ifndef PLATFORM
  28. PLATFORM=mswin32_
  29. !endif
  30. # Define the auxiliary program dependency. We use this to
  31. # preconstruct ccf32.tr to get around the limit on the maximum
  32. # length of a command line.
  33. AK=$(GLGENDIR)\ccf32.tr
  34. # Define the syntax for command, object, and executable files.
  35. NULL=
  36. CMD=.bat
  37. D_=-D
  38. _D_=$(NULL)=
  39. _D=
  40. I_=-I
  41. II=-I
  42. _I=
  43. NO_OP=@rem
  44. # O_ and XE_ are defined separately for each compiler.
  45. OBJ=obj
  46. Q=
  47. XE=.exe
  48. XEAUX=.exe
  49. # Define generic commands.
  50. # We have to use a batch file for the equivalent of cp,
  51. # because the DOS COPY command copies the file write time, like cp -p.
  52. # We also have to use a batch file for for the equivalent of rm -f,
  53. # because the DOS ERASE command returns an error status if the file
  54. # doesn't exist.
  55. CP_=call $(GLSRCDIR)\cp.bat
  56. RM_=call $(GLSRCDIR)\rm.bat
  57. RMN_=call $(GLSRCDIR)\rm.bat
  58. # Define the generic compilation flags.
  59. PLATOPT=
  60. INTASM=
  61. PCFBASM=
  62. # Define conditinal name for UFST bridge :
  63. !ifdef UFST_ROOT
  64. UFST_BRIDGE = 1
  65. UFST_LIB_EXT=.lib
  66. !endif
  67. # Define conditinal name for FreeType bridge :
  68. !ifdef FT_ROOT
  69. FT_BRIDGE = 1
  70. FT_LIB_EXT=.lib
  71. !endif
  72. # Define the files to be removed by `make clean'.
  73. # nmake expands macros when encountered, not when used,
  74. # so this must precede the !include statements.
  75. BEGINFILES=$(GLGENDIR)\ccf32.tr\
  76. $(GLOBJDIR)\*.res $(GLOBJDIR)\*.ico\
  77. $(BINDIR)\$(GSDLL).dll $(BINDIR)\$(GSCONSOLE).exe\
  78. $(BINDIR)\setupgs.exe $(BINDIR)\uninstgs.exe\
  79. $(BEGINFILES2)
  80. # Include the generic makefiles.
  81. #!include $(COMMONDIR)/pcdefs.mak
  82. #!include $(COMMONDIR)/generic.mak
  83. !include $(GLSRCDIR)\gs.mak
  84. !include $(GLSRCDIR)\lib.mak
  85. !include $(GLSRCDIR)\jpeg.mak
  86. # zlib.mak must precede libpng.mak
  87. !include $(GLSRCDIR)\zlib.mak
  88. !include $(GLSRCDIR)\libpng.mak
  89. !include $(GLSRCDIR)\jbig2.mak
  90. !include $(GLSRCDIR)\jasper.mak
  91. !include $(GLSRCDIR)\icclib.mak
  92. !include $(GLSRCDIR)\ijs.mak
  93. !include $(GLSRCDIR)\devs.mak
  94. !include $(GLSRCDIR)\contrib.mak
  95. # Define the compilation rule for Windows devices.
  96. # This requires GL*_ to be defined, so it has to come after lib.mak.
  97. GLCCWIN=$(CC_WX) $(CCWINFLAGS) $(I_)$(GLI_)$(_I) $(GLF_)
  98. !include $(GLSRCDIR)\winplat.mak
  99. !include $(GLSRCDIR)\pcwin.mak
  100. # Define abbreviations for the executable and DLL files.
  101. GS_OBJ=$(GLOBJ)$(GS)
  102. GSDLL_SRC=$(GLSRC)$(GSDLL)
  103. GSDLL_OBJ=$(GLOBJ)$(GSDLL)
  104. # -------------------------- Auxiliary files --------------------------- #
  105. # No special gconfig_.h is needed. /* This file deliberately left blank. */
  106. $(gconfig__h): $(TOP_MAKEFILES)
  107. $(ECHOGS_XE) -w $(gconfig__h) -x 2f2a20 This file deliberately left blank. -x 2a2f
  108. $(gconfigv_h): $(TOP_MAKEFILES) $(ECHOGS_XE)
  109. $(ECHOGS_XE) -w $(gconfigv_h) -x 23 define USE_ASM -x 2028 -q $(USE_ASM)-0 -x 29
  110. $(ECHOGS_XE) -a $(gconfigv_h) -x 23 define USE_FPU -x 2028 -q $(FPU_TYPE)-0 -x 29
  111. $(ECHOGS_XE) -a $(gconfigv_h) -x 23 define EXTEND_NAMES 0$(EXTEND_NAMES)
  112. $(ECHOGS_XE) -a $(gconfigv_h) -x 23 define SYSTEM_CONSTANTS_ARE_WRITABLE 0$(SYSTEM_CONSTANTS_ARE_WRITABLE)
  113. # -------------------------------- Library -------------------------------- #
  114. # The Windows Win32 platform
  115. mswin32__=$(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_stdia.$(OBJ)
  116. mswin32_inc=$(GLD)nosync.dev $(GLD)winplat.dev
  117. $(GLGEN)mswin32_.dev: $(mswin32__) $(ECHOGS_XE) $(mswin32_inc)
  118. $(SETMOD) $(GLGEN)mswin32_ $(mswin32__)
  119. $(ADDMOD) $(GLGEN)mswin32_ -include $(mswin32_inc)
  120. $(GLOBJ)gp_mswin.$(OBJ): $(GLSRC)gp_mswin.c $(AK) $(gp_mswin_h) \
  121. $(ctype__h) $(dos__h) $(malloc__h) $(memory__h) $(pipe__h) \
  122. $(stdio__h) $(string__h) $(windows__h) \
  123. $(gx_h) $(gp_h) $(gpcheck_h) $(gpmisc_h) $(gserrors_h) $(gsexit_h)
  124. $(GLCCWIN) $(GLO_)gp_mswin.$(OBJ) $(C_) $(GLSRC)gp_mswin.c
  125. $(GLOBJ)gp_wgetv.$(OBJ): $(GLSRC)gp_wgetv.c $(AK) $(gscdefs_h)
  126. $(GLCCWIN) $(GLO_)gp_wgetv.$(OBJ) $(C_) $(GLSRC)gp_wgetv.c
  127. $(GLOBJ)gp_stdia.$(OBJ): $(GLSRC)gp_stdia.c $(AK)\
  128. $(stdio__h) $(time__h) $(unistd__h) $(gx_h) $(gp_h)
  129. $(GLCCWIN) $(GLO_)gp_stdia.$(OBJ) $(C_) $(GLSRC)gp_stdia.c
  130. # Define MS-Windows handles (file system) as a separable feature.
  131. mshandle_=$(GLOBJ)gp_mshdl.$(OBJ)
  132. $(GLD)mshandle.dev: $(ECHOGS_XE) $(mshandle_)
  133. $(SETMOD) $(GLD)mshandle $(mshandle_)
  134. $(ADDMOD) $(GLD)mshandle -iodev handle
  135. $(GLOBJ)gp_mshdl.$(OBJ): $(GLSRC)gp_mshdl.c $(AK)\
  136. $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\
  137. $(gserror_h) $(gsmemory_h) $(gstypes_h) $(gxiodev_h)
  138. $(GLCC) $(GLO_)gp_mshdl.$(OBJ) $(C_) $(GLSRC)gp_mshdl.c
  139. # Define MS-Windows printer (file system) as a separable feature.
  140. msprinter_=$(GLOBJ)gp_msprn.$(OBJ)
  141. $(GLD)msprinter.dev: $(ECHOGS_XE) $(msprinter_)
  142. $(SETMOD) $(GLD)msprinter $(msprinter_)
  143. $(ADDMOD) $(GLD)msprinter -iodev printer
  144. $(GLOBJ)gp_msprn.$(OBJ): $(GLSRC)gp_msprn.c $(AK)\
  145. $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\
  146. $(gserror_h) $(gsmemory_h) $(gstypes_h) $(gxiodev_h)
  147. $(GLCCWIN) $(GLO_)gp_msprn.$(OBJ) $(C_) $(GLSRC)gp_msprn.c
  148. # Define MS-Windows polling as a separable feature
  149. # because it is not needed by the gslib.
  150. mspoll_=$(GLOBJ)gp_mspol.$(OBJ)
  151. $(GLD)mspoll.dev: $(ECHOGS_XE) $(mspoll_)
  152. $(SETMOD) $(GLD)mspoll $(mspoll_)
  153. $(GLOBJ)gp_mspol.$(OBJ): $(GLSRC)gp_mspol.c $(AK)\
  154. $(gx_h) $(gp_h) $(gpcheck_h) $(iapi_h) $(iref_h) $(iminst_h) $(imain_h)
  155. $(GLCCWIN) $(GLO_)gp_mspol.$(OBJ) $(C_) $(GLSRC)gp_mspol.c
  156. # end of winlib.mak