wccommon.mak 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. # Copyright (C) 1991, 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: wccommon.mak,v 1.8 2003/12/11 02:22:11 giles Exp $
  16. # wccommon.mak
  17. # Section of Watcom C/C++ makefile common to MS-DOS and MS Windows.
  18. # We strongly recommend that you read the Watcom section of Make.htm
  19. # before attempting to build Ghostscript with the Watcom compiler.
  20. # This file is used by watc.mak, watcwin.mak, and watclib.mak.
  21. # Those files supply the following parameters:
  22. # Configuration, public:
  23. # GS_LIB_DEFAULT, SEARCH_HERE_FIRST, GS_INIT, FEATURE_DEVS,
  24. # DEVICE_DEVS*, COMPILE_INITS, BAND_LIST_*
  25. # Configuration, internal, generic:
  26. # PLATFORM, MAKEFILE, AK, CC*, DEBUG, NOPRIVATE, CP_, RM_, RMN_
  27. # Configuration, internal, specific to DOS/Windows:
  28. # TDEBUG, USE_ASM, ASM,
  29. # COMPDIR, LIBPATHS,
  30. # CPU_TYPE, FPU_TYPE
  31. # We want Unix-compatible behavior. This is part of it.
  32. .NOCHECK
  33. # Define additional extensions to keep `make' happy
  34. .EXTENSIONS: .be .z
  35. # Define the auxiliary program dependency. We don't use this.
  36. AK=
  37. # Note that built-in third-party libraries aren't available.
  38. SHARE_JPEG=0
  39. SHARE_LIBPNG=0
  40. SHARE_ZLIB=0
  41. SHARE_JBIG2=0
  42. # Define the extensions for command, object, and executable files.
  43. NULL=
  44. C_=
  45. CMD=.bat
  46. D_=-D
  47. _D_=$(NULL)=
  48. _D=
  49. I_=-i=
  50. II=-i=
  51. _I=
  52. NO_OP=%null
  53. O_=-fo=
  54. OBJ=obj
  55. Q=
  56. RO_=$(O_)
  57. XE=.exe
  58. XEAUX=.exe
  59. # Define the executable and shell invocations.
  60. D=\\
  61. EXP=
  62. SH=
  63. # Define generic commands.
  64. CP_=call $(GLSRCDIR)\cp.bat
  65. RM_=call $(GLSRCDIR)\rm.bat
  66. RMN_=call $(GLSRCDIR)\rm.bat
  67. # Define the arguments for genconf.
  68. # wmake interprets & as calling for background execution, and ^ fails on
  69. # Windows NT.
  70. CONFILES=-e ~ -p FILE~s~ps
  71. CONFLDTR=-ol
  72. # Define the names of the Watcom C files.
  73. # See the comments in watc.mak and watcwin.mak regarding WCVERSION.
  74. !ifeq WCVERSION 11.0
  75. # 11.0 is currently the same as 10.5.
  76. COMP=$(%WATCOM)\binw\wcc386
  77. LINK=$(%WATCOM)\binw\wlink
  78. STUB=$(%WATCOM)\binw\wstub.exe
  79. WRC=$(%WATCOM)\binw\wrc.exe
  80. !endif
  81. !ifeq WCVERSION 10.5
  82. COMP=$(%WATCOM)\binw\wcc386
  83. LINK=$(%WATCOM)\binw\wlink
  84. STUB=$(%WATCOM)\binw\wstub.exe
  85. WRC=$(%WATCOM)\binw\wrc.exe
  86. !endif
  87. !ifeq WCVERSION 10.0
  88. COMP=$(%WATCOM)\binb\wcc386
  89. LINK=$(%WATCOM)\bin\wlink
  90. STUB=$(%WATCOM)\binb\wstub.exe
  91. WRC=$(%WATCOM)\binb\wrc.exe
  92. !endif
  93. !ifeq WCVERSION 9.5
  94. COMP=$(%WATCOM)\bin\wcc386
  95. LINK=$(%WATCOM)\bin\wlinkp
  96. STUB=$(%WATCOM)\binb\wstub.exe
  97. WRC=$(%WATCOM)\binb\wrc.exe
  98. !endif
  99. # 95/NT Watcom compiler versions
  100. # 10.695 is 10.6 under Windows 95 or NT (32 bit hosted tools)
  101. !ifeq WCVERSION 10.695
  102. COMP=$(%WATCOM)\binnt\wcc386
  103. LINK=$(%WATCOM)\binnt\wlink
  104. STUB=$(%WATCOM)\binw\wstub.exe
  105. WRC=$(%WATCOM)\binnt\wrc.exe
  106. WAT32=1
  107. !endif
  108. # Defaults
  109. !ifndef COMP
  110. COMP=$(%WATCOM)\bin\wcc386p
  111. LINK=$(%WATCOM)\bin\wlinkp
  112. STUB=$(%WATCOM)\binb\wstub.exe
  113. WRC=$(%WATCOM)\binb\rc.exe
  114. !endif
  115. !ifndef WAT32
  116. WAT32=0
  117. !endif
  118. !ifeq WAT32 0
  119. INCDIRS=$(%WATCOM)\h
  120. !else
  121. INCDIRS=$(%WATCOM)\h;$(%WATCOM)\h\nt
  122. !endif
  123. WBIND=$(%WATCOM)\binb\wbind.exe
  124. # Define the generic compilation flags.
  125. !ifeq CPU_TYPE 586
  126. !ifeq FPU_TYPE 0
  127. FPU_TYPE=387
  128. !endif
  129. !else
  130. !ifeq CPU_TYPE 486
  131. !ifeq FPU_TYPE 0
  132. FPU_TYPE=387
  133. !endif
  134. !endif
  135. !endif
  136. !ifeq FPU_TYPE 387
  137. FPFLAGS=-fpi87
  138. !else
  139. !ifeq FPU_TYPE 287
  140. FPFLAGS=-fpi287
  141. !else
  142. !ifeq FPU_TYPE -1
  143. FPFLAGS=-fpc
  144. !else
  145. FPFLAGS=-fpi
  146. !endif
  147. !endif
  148. !endif
  149. INTASM=
  150. PCFBASM=
  151. # Define the generic compilation rules.
  152. .asm.obj:
  153. $(ASM) $(ASMFLAGS) $<;
  154. # Make sure we get the right default target for make.
  155. dosdefault: default
  156. $(NO_OP)
  157. # Define the compilation flags.
  158. # Privacy
  159. !ifneq NOPRIVATE 0
  160. CP=-dNOPRIVATE
  161. !else
  162. CP=
  163. !endif
  164. # Run-time debugging and stack checking
  165. !ifneq DEBUG 0
  166. CD=-dDEBUG
  167. CS=
  168. !else
  169. CD=
  170. CS=-oeilnt -s
  171. !endif
  172. # Debugger symbols
  173. !ifneq TDEBUG 0
  174. CT=-d2
  175. LCT=DEBUG ALL
  176. !else
  177. CT=-d1
  178. LCT=DEBUG LINES
  179. !endif
  180. GENOPT=$(CP) $(CD) $(CT) $(CS)
  181. CCOPT=-d+ -i=$(INCDIRS) -zq -zp8 -ei
  182. CCFLAGS=$(CCOPT) $(GENOPT) $(PLATOPT) $(FPFLAGS) $(CFLAGS) $(XCFLAGS)
  183. CC=$(COMP) -oi $(CCFLAGS)
  184. CCAUX=$(COMP) -oi $(CCOPT) $(FPFLAGS)
  185. CC_=$(CC)
  186. CC_D=$(CC)
  187. CC_INT=$(COMP) -oit $(CCFLAGS)
  188. CC_NO_WARN=$(CC_)