1#  Copyright (C) 2001-2007 Artifex Software, Inc.
2#  All Rights Reserved.
3#
4#  This software is provided AS-IS with no warranty, either express or
5#  implied.
6#
7#  This software is distributed under license and may not be copied, modified
8#  or distributed except as expressly authorized under the terms of that
9#  license.  Refer to licensing information at http://www.artifex.com/
10#  or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
11#  San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12#
13# $Id: msvc32.mak 10689 2010-02-02 18:14:37Z hintak $
14# makefile for 32-bit Microsoft Visual C++, Windows NT or Windows 95 platform.
15#
16# All configurable options are surrounded by !ifndef/!endif to allow
17# preconfiguration from within another makefile.
18#
19# Optimization /O2 seems OK with MSVC++ 4.1, but not with 5.0.
20# Created 1997-01-24 by Russell Lang from MSVC++ 2.0 makefile.
21# Enhanced 97-05-15 by JD
22# Common code factored out 1997-05-22 by L. Peter Deutsch.
23# Made pre-configurable by JD 6/4/98
24# Revised to use subdirectories 1998-11-13 by lpd.
25
26# Note: If you are planning to make self-extracting executables,
27# see winint.mak to find out about third-party software you will need.
28
29# ------------------------------- Options ------------------------------- #
30
31###### This section is the only part of the file you should need to edit.
32
33# ------ Generic options ------ #
34
35# Define the directory for the final executable, and the
36# source, generated intermediate file, and object directories
37# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
38
39!if "$(DEBUG)"=="1"
40DEFAULT_OBJ_DIR=.\debugobj
41!else
42DEFAULT_OBJ_DIR=.\obj
43!endif
44
45!ifndef BINDIR
46BINDIR=.\bin
47!endif
48!ifndef GLSRCDIR
49GLSRCDIR=.\base
50!endif
51!ifndef GLGENDIR
52GLGENDIR=$(DEFAULT_OBJ_DIR)
53!endif
54!ifndef GLOBJDIR
55GLOBJDIR=$(DEFAULT_OBJ_DIR)
56!endif
57!ifndef PSSRCDIR
58PSSRCDIR=.\psi
59!endif
60!ifndef PSLIBDIR
61PSLIBDIR=.\lib
62!endif
63!ifndef PSRESDIR
64PSRESDIR=.\Resource
65!endif
66!ifndef PSGENDIR
67PSGENDIR=$(DEFAULT_OBJ_DIR)
68!endif
69!ifndef PSOBJDIR
70PSOBJDIR=$(DEFAULT_OBJ_DIR)
71!endif
72!ifndef SBRDIR
73SBRDIR=$(DEFAULT_OBJ_DIR)
74!endif
75
76# Define the root directory for Ghostscript installation.
77
78!ifndef AROOTDIR
79AROOTDIR=c:/gs
80!endif
81!ifndef GSROOTDIR
82GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION)
83!endif
84
85# Define the directory that will hold documentation at runtime.
86
87!ifndef GS_DOCDIR
88GS_DOCDIR=$(GSROOTDIR)/doc
89!endif
90
91# Define the default directory/ies for the runtime initialization, resource and
92# font files.  Separate multiple directories with ';'.
93# Use / to indicate directories, not \.
94# MSVC will not allow \'s here because it sees '\;' CPP-style as an
95# illegal escape.
96
97!ifndef GS_LIB_DEFAULT
98GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Init;$(GSROOTDIR)/lib;$(GSROOTDIR)/Resource/Font;$(AROOTDIR)/fonts
99!endif
100
101# Define whether or not searching for initialization files should always
102# look in the current directory first.  This leads to well-known security
103# and confusion problems, but users insist on it.
104# NOTE: this also affects searching for files named on the command line:
105# see the "File searching" section of Use.htm for full details.
106# Because of this, setting SEARCH_HERE_FIRST to 0 is not recommended.
107
108!ifndef SEARCH_HERE_FIRST
109SEARCH_HERE_FIRST=1
110!endif
111
112# Define the name of the interpreter initialization file.
113# (There is no reason to change this.)
114
115!ifndef GS_INIT
116GS_INIT=gs_init.ps
117!endif
118
119# Choose generic configuration options.
120
121# Setting DEBUG=1 includes debugging features in the build:
122# 1. It defines the C preprocessor symbol DEBUG. The latter includes
123#    tracing and self-validation code fragments into compilation.
124#    Particularly it enables the -Z and -T switches in Ghostscript.
125# 2. It compiles code fragments for C stack overflow checks.
126# Code produced with this option is somewhat larger and runs
127# somewhat slower.
128
129!ifndef DEBUG
130DEBUG=0
131!endif
132
133# Setting TDEBUG=1 disables code optimization in the C compiler and
134# includes symbol table information for the debugger.
135# Code is substantially larger and slower.
136
137# NOTE: The MSVC++ 5.0 compiler produces incorrect output code with TDEBUG=0.
138# Also MSVC 6 must be service pack >= 3 to prevent INTERNAL COMPILER ERROR
139
140# Default to 0 anyway since the execution times are so much better.
141!ifndef TDEBUG
142TDEBUG=0
143!endif
144
145# Setting DEBUGSYM=1 is only useful with TDEBUG=0.
146# This option is for advanced developers. It includes symbol table
147# information for the debugger in an optimized (release) build.
148# NOTE: The debugging information generated for the optimized code may be
149# significantly misleading. For general MSVC users we recommend TDEBUG=1.
150
151!ifndef DEBUGSYM
152DEBUGSYM=0
153!endif
154
155
156# We can compile for a 32-bit or 64-bit target
157# WIN32 and WIN64 are mutually exclusive.  WIN32 is the default.
158!if !defined(WIN32) && !defined(Win64)
159WIN32=0
160!endif
161
162# Define the name of the executable file.
163
164!ifndef GS
165GS=gswin32
166!endif
167!ifndef GSCONSOLE
168GSCONSOLE=gswin32c
169!endif
170!ifndef GSDLL
171GSDLL=gsdll32
172!endif
173
174# To build two small executables and a large DLL use MAKEDLL=1
175# To build two large executables use MAKEDLL=0
176
177!ifndef MAKEDLL
178MAKEDLL=1
179!endif
180
181# Define the directory where the IJG JPEG library sources are stored,
182# and the major version of the library that is stored there.
183# You may need to change this if the IJG library version changes.
184# See jpeg.mak for more information.
185
186!ifndef JSRCDIR
187JSRCDIR=jpeg
188!endif
189
190# Define the directory where the PNG library sources are stored,
191# and the version of the library that is stored there.
192# You may need to change this if the libpng version changes.
193# See libpng.mak for more information.
194
195!ifndef PNGSRCDIR
196PNGSRCDIR=libpng
197!endif
198
199!ifndef TIFFSRCDIR
200TIFFSRCDIR=tiff$(D)
201TIFFCONFIG_SUFFIX=.vc
202TIFFPLATFORM=win32
203!endif
204
205# Define the directory where the zlib sources are stored.
206# See zlib.mak for more information.
207
208!ifndef ZSRCDIR
209ZSRCDIR=zlib
210!endif
211
212# Define which jbig2 library to use
213!ifndef JBIG2_LIB
214JBIG2_LIB=jbig2dec
215!endif
216
217!if "$(JBIG2_LIB)" == "luratech" || "$(JBIG2_LIB)" == "ldf_jb2"
218# Set defaults for using the Luratech JB2 implementation
219!ifndef JBIG2SRCDIR
220# CSDK source code location
221JBIG2SRCDIR=ldf_jb2
222!endif
223!ifndef JBIG2_CFLAGS
224# required compiler flags
225JBIG2_CFLAGS=-DUSE_LDF_JB2 -DWIN32
226!endif
227!else
228# Use jbig2dec by default. See jbig2.mak for more information.
229!ifndef JBIG2SRCDIR
230# location of included jbig2dec library source
231JBIG2SRCDIR=jbig2dec
232!endif
233!endif
234
235# Alternatively, you can build a separate DLL
236# and define SHARE_JBIG2=1 in src/winlib.mak
237
238# Define which jpeg2k library to use
239!ifndef JPX_LIB
240JPX_LIB=jasper
241!endif
242
243!if "$(JPX_LIB)" == "luratech" || "$(JPX_LIB)" == "lwf_jp2"
244# Set defaults for using the Luratech JP2 implementation
245!ifndef JPXSRCDIR
246# CSDK source code location
247JPXSRCDIR=lwf_jp2
248!endif
249!ifndef JPX_CFLAGS
250# required compiler flags
251JPX_CFLAGS=-DUSE_LWF_JP2 -DWIN32
252!endif
253!else
254# Use jasper by default. See jasper.mak for more information.
255!ifndef JPXSRCDIR
256JPXSRCDIR=jasper
257!endif
258!endif
259
260# Alternatively, you can build a separate DLL
261# and define SHARE_JPX=1 in src/winlib.mak
262
263# Define the directory where the icclib source are stored.
264# See icclib.mak for more information
265
266!ifndef ICCSRCDIR
267ICCSRCDIR=icclib
268!endif
269
270# Define the directory where the ijs source is stored,
271# and the process forking method to use for the server.
272# See ijs.mak for more information.
273
274!ifndef IJSSRCDIR
275IJSSRCDIR=ijs
276IJSEXECTYPE=win
277!endif
278
279# Define the directory where the imdi library source is stored.
280# See devs.mak for more information
281
282!ifndef IMDISRCDIR
283IMDISRCDIR=imdi
284!endif
285
286# Define any other compilation flags.
287
288# support XCFLAGS for parity with the unix makefiles
289!ifndef XCFLAGS
290XCFLAGS=
291!endif
292
293!ifndef CFLAGS
294CFLAGS=$(XCFLAGS)
295!endif
296
297# 1 --> Use 64 bits for gx_color_index.  This is required only for
298# non standard devices or DeviceN process color model devices.
299USE_LARGE_COLOR_INDEX=1
300
301!if $(USE_LARGE_COLOR_INDEX) == 1
302# Definitions to force gx_color_index to 64 bits
303LARGEST_UINTEGER_TYPE=unsigned __int64
304GX_COLOR_INDEX_TYPE=$(LARGEST_UINTEGER_TYPE)
305
306CFLAGS=$(CFLAGS) /DGX_COLOR_INDEX_TYPE="$(GX_COLOR_INDEX_TYPE)"
307!endif
308
309# -W3 generates too much noise.
310!ifndef WARNOPT
311WARNOPT=-W2
312!endif
313
314#
315# Do not edit the next group of lines.
316
317#!include $(COMMONDIR)\msvcdefs.mak
318#!include $(COMMONDIR)\pcdefs.mak
319#!include $(COMMONDIR)\generic.mak
320!include $(GLSRCDIR)\version.mak
321# The following is a hack to get around the special treatment of \ at
322# the end of a line.
323NUL=
324DD=$(GLGENDIR)\$(NUL)
325GLD=$(GLGENDIR)\$(NUL)
326PSD=$(PSGENDIR)\$(NUL)
327
328!ifdef SBR
329SBRFLAGS=/FR$(SBRDIR)\$(NUL)
330!endif
331
332# ------ Platform-specific options ------ #
333
334# Define which major version of MSVC is being used
335# (currently, 4, 5, 6, 7, and 8 are supported).
336# Define the minor version of MSVC, currently only
337# used for Microsoft Visual Studio .NET 2003 (7.1)
338
339#MSVC_VERSION=6
340#MSVC_MINOR_VERSION=0
341
342# Make a guess at the version of MSVC in use
343# This will not work if service packs change the version numbers.
344
345!if defined(_NMAKE_VER) && !defined(MSVC_VERSION)
346!if "$(_NMAKE_VER)" == "162"
347MSVC_VERSION=5
348!endif
349!if "$(_NMAKE_VER)" == "6.00.8168.0"
350MSVC_VERSION=6
351!endif
352!if "$(_NMAKE_VER)" == "7.00.9466"
353MSVC_VERSION=7
354!endif
355!if "$(_NMAKE_VER)" == "7.00.9955"
356MSVC_VERSION=7
357!endif
358!if "$(_NMAKE_VER)" == "7.10.3077"
359MSVC_VERSION=7
360MSVC_MINOR_VERSION=1
361!endif
362!if "$(_NMAKE_VER)" == "8.00.40607.16"
363MSVC_VERSION=8
364!endif
365!if "$(_NMAKE_VER)" == "8.00.50727.42"
366MSVC_VERSION=8
367!endif
368!if "$(_NMAKE_VER)" == "8.00.50727.762"
369MSVC_VERSION=8
370!endif
371!if "$(_NMAKE_VER)" == "9.00.21022.08"
372MSVC_VERSION=9
373!endif
374!if "$(_NMAKE_VER)" == "9.00.30729.01"
375MSVC_VERSION=9
376!endif
377!endif
378
379!ifndef MSVC_VERSION
380MSVC_VERSION=6
381!endif
382!ifndef MSVC_MINOR_VERSION
383MSVC_MINOR_VERSION=0
384!endif
385
386# Define the drive, directory, and compiler name for the Microsoft C files.
387# COMPDIR contains the compiler and linker (normally \msdev\bin).
388# MSINCDIR contains the include files (normally \msdev\include).
389# LIBDIR contains the library files (normally \msdev\lib).
390# COMP is the full C compiler path name (normally \msdev\bin\cl).
391# COMPCPP is the full C++ compiler path name (normally \msdev\bin\cl).
392# COMPAUX is the compiler name for DOS utilities (normally \msdev\bin\cl).
393# RCOMP is the resource compiler name (normallly \msdev\bin\rc).
394# LINK is the full linker path name (normally \msdev\bin\link).
395# Note that when MSINCDIR and LIBDIR are used, they always get a '\' appended,
396#   so if you want to use the current directory, use an explicit '.'.
397
398!if $(MSVC_VERSION) == 4
399! ifndef DEVSTUDIO
400DEVSTUDIO=c:\msdev
401! endif
402COMPBASE=$(DEVSTUDIO)
403SHAREDBASE=$(DEVSTUDIO)
404!endif
405
406!if $(MSVC_VERSION) == 5
407! ifndef DEVSTUDIO
408DEVSTUDIO=C:\Program Files\Devstudio
409! endif
410!if "$(DEVSTUDIO)"==""
411COMPBASE=
412SHAREDBASE=
413!else
414COMPBASE=$(DEVSTUDIO)\VC
415SHAREDBASE=$(DEVSTUDIO)\SharedIDE
416!endif
417!endif
418
419!if $(MSVC_VERSION) == 6
420! ifndef DEVSTUDIO
421DEVSTUDIO=C:\Program Files\Microsoft Visual Studio
422! endif
423!if "$(DEVSTUDIO)"==""
424COMPBASE=
425SHAREDBASE=
426!else
427COMPBASE=$(DEVSTUDIO)\VC98
428SHAREDBASE=$(DEVSTUDIO)\Common\MSDev98
429!endif
430!endif
431
432!if $(MSVC_VERSION) == 7
433! ifndef DEVSTUDIO
434!if $(MSVC_MINOR_VERSION) == 0
435DEVSTUDIO=C:\Program Files\Microsoft Visual Studio .NET
436!else
437DEVSTUDIO=C:\Program Files\Microsoft Visual Studio .NET 2003
438!endif
439! endif
440!if "$(DEVSTUDIO)"==""
441COMPBASE=
442SHAREDBASE=
443!else
444COMPBASE=$(DEVSTUDIO)\Vc7
445SHAREDBASE=$(DEVSTUDIO)\Vc7
446!endif
447!endif
448
449!if $(MSVC_VERSION) == 8
450! ifndef DEVSTUDIO
451!ifdef WIN64
452DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 8
453!else
454DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 8
455!endif
456! endif
457!if "$(DEVSTUDIO)"==""
458COMPBASE=
459SHAREDBASE=
460!else
461COMPBASE=$(DEVSTUDIO)\VC
462SHAREDBASE=$(DEVSTUDIO)\VC
463!ifdef WIN64
464COMPDIR64=$(COMPBASE)\bin\amd64
465LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\AMD64"
466!endif
467!endif
468!endif
469
470!if $(MSVC_VERSION) == 9
471! ifndef DEVSTUDIO
472!ifdef WIN64
473DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 9.0
474!else
475DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 9.0
476!endif
477! endif
478!if "$(DEVSTUDIO)"==""
479COMPBASE=
480SHAREDBASE=
481!else
482# There are at least 4 different values:
483# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
484# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
485! ifdef MSSDK
486RCDIR=$(MSSDK)\bin
487! else
488RCDIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
489! endif
490COMPBASE=$(DEVSTUDIO)\VC
491SHAREDBASE=$(DEVSTUDIO)\VC
492!ifdef WIN64
493COMPDIR64=$(COMPBASE)\bin\amd64
494LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\AMD64"
495!endif
496!endif
497!endif
498
499# Some environments don't want to specify the path names for the tools at all.
500# Typical definitions for such an environment would be:
501#   MSINCDIR= LIBDIR= COMP=cl COMPAUX=cl RCOMP=rc LINK=link
502# COMPDIR, LINKDIR, and RCDIR are irrelevant, since they are only used to
503# define COMP, LINK, and RCOMP respectively, but we allow them to be
504# overridden anyway for completeness.
505!ifndef COMPDIR
506!if "$(COMPBASE)"==""
507COMPDIR=
508!else
509!ifdef WIN64
510COMPDIR=$(COMPDIR64)
511!else
512COMPDIR=$(COMPBASE)\bin
513!endif
514!endif
515!endif
516
517!ifndef LINKDIR
518!if "$(COMPBASE)"==""
519LINKDIR=
520!else
521!ifdef WIN64
522LINKDIR=$(COMPDIR64)
523!else
524LINKDIR=$(COMPBASE)\bin
525!endif
526!endif
527!endif
528
529!ifndef RCDIR
530!if "$(SHAREDBASE)"==""
531RCDIR=
532!else
533RCDIR=$(SHAREDBASE)\bin
534!endif
535!endif
536
537!ifndef MSINCDIR
538!if "$(COMPBASE)"==""
539MSINCDIR=
540!else
541MSINCDIR=$(COMPBASE)\include
542!endif
543!endif
544
545!ifndef LIBDIR
546!if "$(COMPBASE)"==""
547LIBDIR=
548!else
549!ifdef WIN64
550LIBDIR=$(COMPBASE)\lib\amd64
551!else
552LIBDIR=$(COMPBASE)\lib
553!endif
554!endif
555!endif
556
557!ifndef COMP
558!if "$(COMPDIR)"==""
559COMP=cl
560!else
561COMP="$(COMPDIR)\cl"
562!endif
563!endif
564!ifndef COMPCPP
565COMPCPP=$(COMP)
566!endif
567!ifndef COMPAUX
568!ifdef WIN64
569COMPAUX=$(COMP)
570!else
571COMPAUX=$(COMP)
572!endif
573!endif
574
575!ifndef RCOMP
576!if "$(RCDIR)"==""
577RCOMP=rc
578!else
579RCOMP="$(RCDIR)\rc"
580!endif
581!endif
582
583!ifndef LINK
584!if "$(LINKDIR)"==""
585LINK=link
586!else
587LINK="$(LINKDIR)\link"
588!endif
589!endif
590
591# nmake does not have a form of .BEFORE or .FIRST which can be used
592# to specify actions before anything else is done.  If LIB and INCLUDE
593# are not defined then we want to define them before we link or
594# compile.  Here is a kludge which allows us to to do what we want.
595# nmake does evaluate preprocessor directives when they are encountered.
596# So the desired set statements are put into dummy preprocessor
597# directives.
598!ifndef INCLUDE
599!if "$(MSINCDIR)"!=""
600!if [set INCLUDE=$(MSINCDIR)]==0
601!endif
602!endif
603!endif
604!ifndef LIB
605!if "$(LIBDIR)"!=""
606!if [set LIB=$(LIBDIR)]==0
607!endif
608!endif
609!endif
610
611!ifndef LINKLIBPATH
612LINKLIBPATH=
613!endif
614
615# Define the processor architecture. (i386, ppc, alpha)
616
617!ifndef CPU_FAMILY
618CPU_FAMILY=i386
619#CPU_FAMILY=ppc
620#CPU_FAMILY=alpha  # not supported yet - we need someone to tweak
621!endif
622
623# Define the processor (CPU) type. Allowable values depend on the family:
624#   i386: 386, 486, 586
625#   ppc: 601, 604, 620
626#   alpha: not currently used.
627
628!ifndef CPU_TYPE
629CPU_TYPE=486
630#CPU_TYPE=601
631!endif
632
633# Define the .dev module that implements thread and synchronization
634# primitives for this platform.  Don't change this unless you really know
635# what you're doing.
636
637!ifndef SYNC
638SYNC=winsync
639!endif
640
641# ------ Devices and features ------ #
642
643# Choose the language feature(s) to include.  See gs.mak for details.
644
645!ifndef FEATURE_DEVS
646FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(PSD)mshandle.dev $(PSD)msprinter.dev $(PSD)mspoll.dev $(GLD)pipe.dev $(PSD)fapi.dev $(PSD)jbig2.dev $(PSD)jpx.dev
647!endif
648
649# Choose whether to compile the .ps initialization files into the executable.
650# See gs.mak for details.
651
652!ifndef COMPILE_INITS
653COMPILE_INITS=1
654!endif
655
656# Choose whether to store band lists on files or in memory.
657# The choices are 'file' or 'memory'.
658
659!ifndef BAND_LIST_STORAGE
660BAND_LIST_STORAGE=file
661!endif
662
663# Choose which compression method to use when storing band lists in memory.
664# The choices are 'lzw' or 'zlib'.
665
666!ifndef BAND_LIST_COMPRESSOR
667BAND_LIST_COMPRESSOR=zlib
668!endif
669
670# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
671# See gs.mak and sfxfd.c for more details.
672
673!ifndef FILE_IMPLEMENTATION
674FILE_IMPLEMENTATION=stdio
675!endif
676
677# Choose the implementation of stdio: '' for file I/O and 'c' for callouts
678# See gs.mak and ziodevs.c/ziodevsc.c for more details.
679
680!ifndef STDIO_IMPLEMENTATION
681STDIO_IMPLEMENTATION=c
682!endif
683
684# Choose the device(s) to include.  See devs.mak for details,
685# devs.mak and contrib.mak for the list of available devices.
686
687!ifndef DEVICE_DEVS
688DEVICE_DEVS=$(DD)display.dev $(DD)mswindll.dev $(DD)mswinpr2.dev
689DEVICE_DEVS2=$(DD)epson.dev $(DD)eps9high.dev $(DD)eps9mid.dev $(DD)epsonc.dev $(DD)ibmpro.dev
690DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev
691DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev
692DEVICE_DEVS5=$(DD)uniprint.dev $(DD)djet500c.dev $(DD)declj250.dev $(DD)lj250.dev $(DD)ijs.dev
693DEVICE_DEVS6=$(DD)st800.dev $(DD)stcolor.dev $(DD)bj10e.dev $(DD)bj200.dev
694DEVICE_DEVS7=$(DD)t4693d2.dev $(DD)t4693d4.dev $(DD)t4693d8.dev $(DD)tek4696.dev
695DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
696DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pkmraw.dev
697DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
698DEVICE_DEVS11=$(DD)bmpmono.dev $(DD)bmpgray.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiff48nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiff64nc.dev $(DD)tiffsep.dev $(DD)tiffsep1.dev
699DEVICE_DEVS12=$(DD)psmono.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
700DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
701DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev
702DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev $(DD)svgwrite.dev
703DEVICE_DEVS16=$(DD)bbox.dev
704# Overflow for DEVS3,4,5,6,9
705DEVICE_DEVS17=$(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev
706DEVICE_DEVS18=$(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev $(DD)jetp3852.dev $(DD)r4081.dev
707DEVICE_DEVS19=$(DD)lbp8.dev $(DD)m8510.dev $(DD)necp6.dev $(DD)bjc600.dev $(DD)bjc800.dev
708DEVICE_DEVS20=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pamcmyk32.dev
709DEVICE_DEVS21= $(DD)spotcmyk.dev $(DD)devicen.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16m.dev $(DD)bmp32b.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev
710!endif
711
712# FAPI compilation options :
713UFST_CFLAGS=-DMSVC
714
715# ---------------------------- End of options ---------------------------- #
716
717# Define the name of the makefile -- used in dependencies.
718
719MAKEFILE=$(PSSRCDIR)\msvc32.mak
720TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)\msvccmd.mak $(GLSRCDIR)\msvctail.mak $(GLSRCDIR)\winlib.mak $(PSSRCDIR)\winint.mak
721
722# Define the files to be removed by `make clean'.
723# nmake expands macros when encountered, not when used,
724# so this must precede the !include statements.
725
726BEGINFILES2=$(GLGENDIR)\lib32.rsp\
727 $(GLOBJDIR)\*.exp $(GLOBJDIR)\*.ilk $(GLOBJDIR)\*.pdb $(GLOBJDIR)\*.lib\
728 $(BINDIR)\*.exp $(BINDIR)\*.ilk $(BINDIR)\*.pdb $(BINDIR)\*.lib obj.pdb\
729 obj.idb $(GLOBJDIR)\gs.pch $(SBRDIR)\*.sbr
730
731!ifdef BSCFILE
732BEGINFILES2=$(BEGINFILES2) $(BSCFILE)
733!endif
734
735!include $(GLSRCDIR)\msvccmd.mak
736# psromfs.mak must precede lib.mak
737!include $(PSSRCDIR)\psromfs.mak
738!include $(GLSRCDIR)\winlib.mak
739!include $(GLSRCDIR)\msvctail.mak
740!include $(PSSRCDIR)\winint.mak
741
742# ----------------------------- Main program ------------------------------ #
743
744GSCONSOLE_XE=$(BINDIR)\$(GSCONSOLE).exe
745GSDLL_DLL=$(BINDIR)\$(GSDLL).dll
746GSDLL_OBJS=$(PSOBJ)gsdll.$(OBJ) $(GLOBJ)gp_msdll.$(OBJ)
747
748!if $(TDEBUG) != 0
749$(PSGEN)lib32.rsp: $(TOP_MAKEFILES)
750	echo /NODEFAULTLIB:LIBC.lib > $(PSGEN)lib32.rsp
751	echo /NODEFAULTLIB:LIBCMT.lib >> $(PSGEN)lib32.rsp
752	echo LIBCMTD.lib >> $(PSGEN)lib32.rsp
753!else
754$(PSGEN)lib32.rsp: $(TOP_MAKEFILES)
755	echo /NODEFAULTLIB:LIBC.lib > $(PSGEN)lib32.rsp
756	echo /NODEFAULTLIB:LIBCMTD.lib >> $(PSGEN)lib32.rsp
757	echo LIBCMT.lib >> $(PSGEN)lib32.rsp
758!endif
759
760
761!if $(MAKEDLL)
762# The graphical small EXE loader
763$(GS_XE): $(GSDLL_DLL)  $(DWOBJ) $(GSCONSOLE_XE) $(SETUP_XE) $(UNINSTALL_XE)
764	echo /SUBSYSTEM:WINDOWS > $(PSGEN)gswin32.rsp
765	echo /DEF:$(PSSRCDIR)\dwmain32.def /OUT:$(GS_XE) >> $(PSGEN)gswin32.rsp
766	$(LINK) $(LCT) @$(PSGEN)gswin32.rsp $(DWOBJ) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res
767	del $(PSGEN)gswin32.rsp
768
769# The console mode small EXE loader
770$(GSCONSOLE_XE): $(OBJC) $(GS_OBJ).res $(PSSRCDIR)\dw32c.def
771	echo /SUBSYSTEM:CONSOLE > $(PSGEN)gswin32.rsp
772	echo  /DEF:$(PSSRCDIR)\dw32c.def /OUT:$(GSCONSOLE_XE) >> $(PSGEN)gswin32.rsp
773	$(LINK) $(LCT) @$(PSGEN)gswin32.rsp $(OBJC) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res
774	del $(PSGEN)gswin32.rsp
775
776# The big DLL
777$(GSDLL_DLL): $(GS_ALL) $(DEVS_ALL) $(GSDLL_OBJS) $(GSDLL_OBJ).res $(PSGEN)lib32.rsp $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
778	echo /DLL /DEF:$(PSSRCDIR)\gsdll32.def /OUT:$(GSDLL_DLL) > $(PSGEN)gswin32.rsp
779	$(LINK) $(LCT) @$(PSGEN)gswin32.rsp $(GSDLL_OBJS) @$(ld_tr) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) @$(PSGEN)lib32.rsp $(LINKLIBPATH) @$(LIBCTR) $(GSDLL_OBJ).res
780	del $(PSGEN)gswin32.rsp
781
782!else
783# The big graphical EXE
784$(GS_XE): $(GSCONSOLE_XE) $(GS_ALL) $(DEVS_ALL) $(GSDLL_OBJS) $(DWOBJNO) $(GSDLL_OBJ).res $(PSSRCDIR)\dwmain32.def $(PSGEN)lib32.rsp $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
785	copy $(ld_tr) $(PSGEN)gswin32.tr
786	echo $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) >> $(PSGEN)gswin32.tr
787	echo $(PSOBJ)dwnodll.obj >> $(PSGEN)gswin32.tr
788	echo $(GLOBJ)dwimg.obj >> $(PSGEN)gswin32.tr
789	echo $(PSOBJ)dwmain.obj >> $(PSGEN)gswin32.tr
790	echo $(GLOBJ)dwtext.obj >> $(PSGEN)gswin32.tr
791	echo $(GLOBJ)dwreg.obj >> $(PSGEN)gswin32.tr
792	echo /DEF:$(PSSRCDIR)\dwmain32.def /OUT:$(GS_XE) > $(PSGEN)gswin32.rsp
793	$(LINK) $(LCT) @$(PSGEN)gswin32.rsp $(GLOBJ)gsdll @$(PSGEN)gswin32.tr $(LINKLIBPATH) @$(LIBCTR) @$(PSGEN)lib32.rsp $(GSDLL_OBJ).res $(DWTRACE)
794	del $(PSGEN)gswin32.tr
795	del $(PSGEN)gswin32.rsp
796
797# The big console mode EXE
798$(GSCONSOLE_XE): $(GS_ALL) $(DEVS_ALL) $(GSDLL_OBJS) $(OBJCNO) $(GS_OBJ).res $(PSSRCDIR)\dw32c.def $(PSGEN)lib32.rsp $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
799	copy $(ld_tr) $(PSGEN)gswin32c.tr
800	echo $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) >> $(PSGEN)gswin32c.tr
801	echo $(PSOBJ)dwnodllc.obj >> $(PSGEN)gswin32c.tr
802	echo $(GLOBJ)dwimg.obj >> $(PSGEN)gswin32c.tr
803	echo $(PSOBJ)dwmainc.obj >> $(PSGEN)gswin32c.tr
804	echo $(PSOBJ)dwreg.obj >> $(PSGEN)gswin32c.tr
805	echo /SUBSYSTEM:CONSOLE > $(PSGEN)gswin32.rsp
806	echo /DEF:$(PSSRCDIR)\dw32c.def /OUT:$(GSCONSOLE_XE) >> $(PSGEN)gswin32.rsp
807	$(LINK) $(LCT) @$(PSGEN)gswin32.rsp $(GLOBJ)gsdll @$(PSGEN)gswin32c.tr $(LINKLIBPATH) @$(LIBCTR) @$(PSGEN)lib32.rsp $(GS_OBJ).res $(DWTRACE)
808	del $(PSGEN)gswin32.rsp
809	del $(PSGEN)gswin32c.tr
810!endif
811
812# ---------------------- Setup and uninstall programs ---------------------- #
813
814!if $(MAKEDLL)
815
816$(SETUP_XE): $(PSOBJ)dwsetup.obj $(PSOBJ)dwinst.obj $(PSOBJ)dwsetup.res $(PSSRC)dwsetup.def $(PSSRC)dwsetup_x86.manifest $(PSSRC)dwsetup_x64.manifest
817	echo /DEF:$(PSSRC)dwsetup.def /OUT:$(SETUP_XE) > $(PSGEN)dwsetup.rsp
818	echo $(PSOBJ)dwsetup.obj $(PSOBJ)dwinst.obj >> $(PSGEN)dwsetup.rsp
819	copy $(LIBCTR) $(PSGEN)dwsetup.tr
820	echo ole32.lib >> $(PSGEN)dwsetup.tr
821	echo uuid.lib >> $(PSGEN)dwsetup.tr
822	$(LINK) $(LCT) @$(PSGEN)dwsetup.rsp $(LINKLIBPATH) @$(PSGEN)dwsetup.tr $(PSOBJ)dwsetup.res
823	del $(PSGEN)dwsetup.rsp
824	del $(PSGEN)dwsetup.tr
825!if $(MSVC_VERSION) >= 8
826!ifdef WIN64
827	mt -nologo -manifest $(PSSRC)dwsetup_x64.manifest -outputresource:$(SETUP_XE);#1
828!else
829	mt -nologo -manifest $(PSSRC)dwsetup_x86.manifest -outputresource:$(SETUP_XE);#1
830!endif
831!endif
832
833$(UNINSTALL_XE): $(PSOBJ)dwuninst.obj $(PSOBJ)dwuninst.res $(PSSRC)dwuninst.def $(PSSRC)dwuninst_x86.manifest $(PSSRC)dwuninst_x64.manifest
834	echo /DEF:$(PSSRC)dwuninst.def /OUT:$(UNINSTALL_XE) > $(PSGEN)dwuninst.rsp
835	echo $(PSOBJ)dwuninst.obj >> $(PSGEN)dwuninst.rsp
836	copy $(LIBCTR) $(PSGEN)dwuninst.tr
837	echo ole32.lib >> $(PSGEN)dwuninst.tr
838	echo uuid.lib >> $(PSGEN)dwuninst.tr
839	$(LINK) $(LCT) @$(PSGEN)dwuninst.rsp $(LINKLIBPATH) @$(PSGEN)dwuninst.tr $(PSOBJ)dwuninst.res
840	del $(PSGEN)dwuninst.rsp
841	del $(PSGEN)dwuninst.tr
842!if $(MSVC_VERSION) >= 8
843!ifdef WIN64
844	mt -nologo -manifest $(PSSRC)dwuninst_x64.manifest -outputresource:$(UNINSTALL_XE);#1
845!else
846	mt -nologo -manifest $(PSSRC)dwuninst_x86.manifest -outputresource:$(UNINSTALL_XE);#1
847!endif
848!endif
849
850!endif
851
852# ---------------------- Debug targets ---------------------- #
853# Simply set some definitions and call ourselves back         #
854
855DEBUGDEFS=BINDIR=.\debugbin GLGENDIR=.\debugobj GLOBJDIR=.\debugobj PSLIBDIR=.\lib PSGENDIR=.\debugobj PSOBJDIR=.\debugobj DEBUG=1 TDEBUG=1 SBRDIR=.\debugobj
856debug:
857	nmake -f $(MAKEFILE) $(DEBUGDEFS)
858
859debugclean:
860	nmake -f $(MAKEFILE) $(DEBUGDEFS) clean
861
862debugbsc:
863	nmake -f $(MAKEFILE) $(DEBUGDEFS) bsc
864
865
866
867# ---------------------- Browse information step ---------------------- #
868
869bsc:
870	bscmake /o $(SBRDIR)\ghostscript.bsc /v $(GLOBJDIR)\*.sbr
871
872# end of makefile
873