home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / UsingPDF / GhostScript / source / gs5.10 / msvccom.mak < prev    next >
Encoding:
Text File  |  1997-07-25  |  4.7 KB  |  226 lines

  1. #    Copyright (C) 1997 Aladdin Enterprises.  All rights reserved.
  2. # This file is part of Aladdin Ghostscript.
  3. # Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. # or distributor accepts any responsibility for the consequences of using it,
  5. # or for whether it serves any particular purpose or works at all, unless he
  6. # or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. # License (the "License") for full details.
  8. # Every copy of Aladdin Ghostscript must include a copy of the License,
  9. # normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. # the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. # under certain conditions described in the License.  Among other things, the
  12. # License requires that the copyright notice and this notice be preserved on
  13. # all copies.
  14.  
  15. # msvccom.mak
  16. # Common makefile section for Microsoft Visual C++ 4.x/5.x,
  17. # Windows NT or Windows 95 platform.
  18. # Created 1997-05-22 by L. Peter Deutsch from msvc4/5 makefiles.
  19. # edited 1997-06-xx by JD to factor out interpreter-specific sections
  20.  
  21. # Set up linker differently for MSVC 4 vs. later versions
  22.  
  23. !if $(MSVC_VERSION) == 4
  24.  
  25. # MSVC version 4.x doesn't recognize the /QI0f switch, which works around
  26. # an unspecified bug in the Pentium decoding of certain 0F instructions.
  27. QI0f=
  28.  
  29. # Set up LIB enviromnent variable to include LIBDIR. This is a hack for
  30. # MSVC4.x, which doesn't have compiler switches to do the deed
  31.  
  32. !ifdef LIB
  33. LIB=$(LIBDIR);$(LIB)
  34. !else
  35. LINK_SETUP=set LIB=$(LIBDIR)
  36. CCAUX_SETUP=$(LINK_SETUP)
  37. !endif
  38.  
  39. !else
  40. #else #$(MSVC_VERSION) == 4
  41.  
  42. # MSVC 5.x does recognize /QI0f.
  43. QI0f=/QI0f
  44.  
  45. # Define linker switch that will select where MS libraries are.
  46.  
  47. LINK_LIB_SWITCH=/LIBPATH:$(LIBDIR)
  48.  
  49. # Define separate CCAUX command-line switch that must be at END of line.
  50.  
  51. CCAUX_TAIL= /link $(LINK_LIB_SWITCH)
  52.  
  53. !endif
  54. #endif #$(MSVC_VERSION) == 4
  55.  
  56.  
  57. # Define the current directory prefix and shell invocations.
  58.  
  59. D=\#
  60.  
  61. EXPP=
  62. SH=
  63. SHP=
  64.  
  65. # Define the arguments for genconf.
  66.  
  67. CONFILES=-p %%s -o $(ld_tr) -l lib.tr
  68.  
  69. # Define the generic compilation flags.
  70.  
  71. PLATOPT=
  72.  
  73. INTASM=
  74. PCFBASM=
  75.  
  76. # Make sure we get the right default target for make.
  77.  
  78. dosdefault: default
  79.  
  80. # Define the compilation flags.
  81.  
  82. !if "$(CPU_FAMILY)"=="i386"
  83.  
  84. !if $(CPU_TYPE)>500
  85. CPFLAGS=/G5 $(QI0f)
  86. !else if $(CPU_TYPE)>400
  87. CPFLAGS=/GB $(QI0f)
  88. !else
  89. CPFLAGS=/GB $(QI0f)
  90. !endif
  91.  
  92. !if $(FPU_TYPE)>0
  93. FPFLAGS=/FPi87
  94. !else
  95. FPFLAGS=
  96. !endif
  97.  
  98. !endif
  99.  
  100. !if "$(CPU_FAMILY)"=="ppc"
  101.  
  102. !if $(CPU_TYPE)>=620
  103. CPFLAGS=/QP620
  104. !else if $(CPU_TYPE)>=604
  105. CPFLAGS=/QP604
  106. !else
  107. CPFLAGS=/QP601
  108. !endif
  109.  
  110. FPFLAGS=
  111.  
  112. !endif
  113.  
  114. !if "$(CPU_FAMILY)"=="alpha"
  115.  
  116. # *** alpha *** This needs fixing
  117. CPFLAGS=
  118. FPFLAGS=
  119.  
  120. !endif
  121.  
  122. !if $(NOPRIVATE)!=0
  123. CP=/DNOPRIVATE
  124. !else
  125. CP=
  126. !endif
  127.  
  128. !if $(DEBUG)!=0
  129. CD=/DDEBUG
  130. !else
  131. CD=
  132. !endif
  133.  
  134. !if $(TDEBUG)!=0
  135. CT=/Zi /Od
  136. LCT=/DEBUG $(LINK_LIB_SWITCH)
  137. COMPILE_FULL_OPTIMIZED=    # no optimization when debugging
  138. COMPILE_WITH_FRAMES=    # no optimization when debugging
  139. COMPILE_WITHOUT_FRAMES=    # no optimization when debugging
  140. !else
  141. CT=
  142. LCT=$(LINK_LIB_SWITCH)
  143. COMPILE_FULL_OPTIMIZED=/O2
  144. COMPILE_WITH_FRAMES=
  145. COMPILE_WITHOUT_FRAMES=/Oy
  146. !endif
  147.  
  148. !if $(DEBUG)!=0 || $(TDEBUG)!=0
  149. CS=/Ge
  150. !else
  151. CS=/Gs
  152. !endif
  153.  
  154. # Specify output object name
  155. CCOBJNAME=-Fo
  156.  
  157. # Specify function prolog type
  158. COMPILE_FOR_DLL=
  159. COMPILE_FOR_EXE=
  160. COMPILE_FOR_CONSOLE_EXE=
  161.  
  162.  
  163. GENOPT=$(CP) $(CD) $(CT) $(CS) /W2 /nologo
  164.  
  165. CCFLAGS=$(PLATOPT) $(FPFLAGS) $(CPFLAGS) $(CFLAGS) $(XCFLAGS)
  166. CC=$(COMP) /c $(CCFLAGS) @ccf32.tr
  167. CPP=$(COMPCPP) /c $(CCFLAGS) @ccf32.tr
  168. !if $(MAKEDLL)
  169. WX=$(COMPILE_FOR_DLL)
  170. !else
  171. WX=$(COMPILE_FOR_EXE)
  172. !endif
  173. CCC=$(CC) $(WX) $(COMPILE_FULL_OPTIMIZED)
  174. CCD=$(CC) $(WX) $(COMPILE_WITH_FRAMES)
  175. CCINT=$(CCC)
  176. CCCF=$(CCC)
  177. CCLEAF=$(CCC) $(COMPILE_WITHOUT_FRAMES)
  178.  
  179. # Compiler for auxilliary programs
  180.  
  181. CCAUX=$(COMPAUX) /I$(INCDIR) /O
  182.  
  183.  
  184. # Define the generic compilation rules.
  185.  
  186. .c.obj:
  187.     $(CCC) $<
  188.  
  189. .cpp.obj:
  190.     $(CPP) $<
  191.  
  192.  
  193. # Include the generic library makefiles.
  194.  
  195. !include winlib.mak
  196.  
  197.  
  198. # -------------------------- Auxiliary programs --------------------------- #
  199.  
  200. ccf32.tr: $(MAKEFILE) makefile
  201.     echo $(GENOPT) /I$(INCDIR) -DCHECK_INTERRUPTS -D_Windows -D__WIN32__ > ccf32.tr
  202.  
  203. $(GENARCH_XE): genarch.c $(stdpre_h) $(iref_h) ccf32.tr
  204.     $(CCAUX_SETUP)
  205.     $(CCAUX) @ccf32.tr genarch.c $(CCAUX_TAIL)
  206.  
  207. # -------------------------------- Library -------------------------------- #
  208.  
  209. # See winlib.mak
  210.  
  211. # ----------------------------- Main program ------------------------------ #
  212.  
  213. LIBCTR=libc32.tr
  214.  
  215. $(LIBCTR): $(MAKEFILE) $(ECHOGS_XE)
  216.         echogs -w $(LIBCTR) $(LIBDIR)\shell32.lib
  217.         echogs -a $(LIBCTR) $(LIBDIR)\comdlg32.lib
  218.         echogs -a $(LIBCTR) $(LIBDIR)\gdi32.lib
  219.         echogs -a $(LIBCTR) $(LIBDIR)\user32.lib
  220.         echogs -a $(LIBCTR) $(LIBDIR)\winspool.lib
  221.  
  222. # end of msvccom.mak
  223.