1# Copyright (C) 2001-2012 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,
8# modified or distributed except as expressly authorized under the terms
9# of the license contained in the file LICENSE in this distribution.
10#
11# Refer to licensing information at http://www.artifex.com or contact
12# Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134, San Rafael,
13# CA  94903, U.S.A., +1(415)492-9861, for further information.
14#
15#
16# $Id: msvc32.mak 12087 2011-02-01 11:57:26Z robin $
17# makefile for 32-bit Microsoft Visual C++, Windows NT or Windows 95 platform.
18#
19# All configurable options are surrounded by !ifndef/!endif to allow
20# preconfiguration from within another makefile.
21#
22# Optimization /O2 seems OK with MSVC++ 4.1, but not with 5.0.
23# Created 1997-01-24 by Russell Lang from MSVC++ 2.0 makefile.
24# Enhanced 97-05-15 by JD
25# Common code factored out 1997-05-22 by L. Peter Deutsch.
26# Made pre-configurable by JD 6/4/98
27# Revised to use subdirectories 1998-11-13 by lpd.
28
29# Note: If you are planning to make self-extracting executables,
30# see winint.mak to find out about third-party software you will need.
31
32# If we are building MEMENTO=1, then adjust default debug flags
33!if "$(MEMENTO)"=="1"
34!ifndef DEBUG
35DEBUG=1
36!endif
37!ifndef TDEBUG
38TDEBUG=1
39!endif
40!ifndef DEBUGSYM
41DEBUGSYM=1
42!endif
43!endif
44
45# If we are building PROFILE=1, then adjust default debug flags
46!if "$(PROFILE)"=="1"
47!ifndef DEBUG
48DEBUG=0
49!endif
50!ifndef TDEBUG
51TDEBUG=0
52!endif
53!ifndef DEBUGSYM
54DEBUGSYM=1
55!endif
56!endif
57
58# Pick the target architecture file
59!if "$(TARGET_ARCH_FILE)"==""
60!ifdef WIN64
61TARGET_ARCH_FILE=$(GLSRCDIR)\..\arch\windows-x64-msvc.h
62!else
63TARGET_ARCH_FILE=$(GLSRCDIR)\..\arch\windows-x86-msvc.h
64!endif
65!endif
66
67# ------------------------------- Options ------------------------------- #
68
69###### This section is the only part of the file you should need to edit.
70
71# ------ Generic options ------ #
72
73# Define the directory for the final executable, and the
74# source, generated intermediate file, and object directories
75# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
76
77!if "$(MEMENTO)"=="1"
78DEFAULT_OBJ_DIR=.\memobj
79!else
80!if "$(PROFILE)"=="1"
81DEFAULT_OBJ_DIR=.\profobj
82!else
83!if "$(DEBUG)"=="1"
84DEFAULT_OBJ_DIR=.\debugobj
85!else
86DEFAULT_OBJ_DIR=.\obj
87!endif
88!endif
89!endif
90!ifdef WIN64
91DEFAULT_OBJ_DIR=$(DEFAULT_OBJ_DIR)64
92!endif
93
94!ifndef AUXDIR
95AUXDIR=$(DEFAULT_OBJ_DIR)\aux_
96!endif
97
98# Note that 32-bit and 64-bit binaries reside in a common directory
99# since the names are unique
100!ifndef BINDIR
101!if "$(MEMENTO)"=="1"
102BINDIR=.\membin
103!else
104!if "$(DEBUG)"=="1"
105BINDIR=.\debugbin
106!else
107!if "$(DEBUGSYM)"=="1"
108BINDIR=.\profbin
109!else
110BINDIR=.\bin
111!endif
112!endif
113!endif
114!endif
115!ifndef GLSRCDIR
116GLSRCDIR=.\base
117!endif
118!ifndef GLGENDIR
119GLGENDIR=$(DEFAULT_OBJ_DIR)
120!endif
121!ifndef GLOBJDIR
122GLOBJDIR=$(DEFAULT_OBJ_DIR)
123!endif
124!ifndef PSSRCDIR
125PSSRCDIR=.\psi
126!endif
127!ifndef PSLIBDIR
128PSLIBDIR=.\lib
129!endif
130!ifndef PSRESDIR
131PSRESDIR=.\Resource
132!endif
133!ifndef PSGENDIR
134PSGENDIR=$(DEFAULT_OBJ_DIR)
135!endif
136!ifndef PSOBJDIR
137PSOBJDIR=$(DEFAULT_OBJ_DIR)
138!endif
139!ifndef SBRDIR
140SBRDIR=$(DEFAULT_OBJ_DIR)
141!endif
142
143# Define the root directory for Ghostscript installation.
144
145!ifndef AROOTDIR
146AROOTDIR=c:/gs
147!endif
148!ifndef GSROOTDIR
149GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION)
150!endif
151
152# Define the directory that will hold documentation at runtime.
153
154!ifndef GS_DOCDIR
155GS_DOCDIR=$(GSROOTDIR)/doc
156!endif
157
158# Define the default directory/ies for the runtime initialization, resource and
159# font files.  Separate multiple directories with ';'.
160# Use / to indicate directories, not \.
161# MSVC will not allow \'s here because it sees '\;' CPP-style as an
162# illegal escape.
163
164!ifndef GS_LIB_DEFAULT
165GS_LIB_DEFAULT=$(GSROOTDIR)/Resource/Init;$(GSROOTDIR)/lib;$(GSROOTDIR)/Resource/Font;$(AROOTDIR)/fonts
166!endif
167
168# Define whether or not searching for initialization files should always
169# look in the current directory first.  This leads to well-known security
170# and confusion problems, but may be convenient sometimes.
171
172!ifndef SEARCH_HERE_FIRST
173SEARCH_HERE_FIRST=0
174!endif
175
176# Define the name of the interpreter initialization file.
177# (There is no reason to change this.)
178
179!ifndef GS_INIT
180GS_INIT=gs_init.ps
181!endif
182
183# Choose generic configuration options.
184
185# Setting DEBUG=1 includes debugging features in the build:
186# 1. It defines the C preprocessor symbol DEBUG. The latter includes
187#    tracing and self-validation code fragments into compilation.
188#    Particularly it enables the -Z and -T switches in Ghostscript.
189# 2. It compiles code fragments for C stack overflow checks.
190# Code produced with this option is somewhat larger and runs
191# somewhat slower.
192
193!ifndef DEBUG
194DEBUG=0
195!endif
196
197# Setting TDEBUG=1 disables code optimization in the C compiler and
198# includes symbol table information for the debugger.
199# Code is substantially larger and slower.
200
201# NOTE: The MSVC++ 5.0 compiler produces incorrect output code with TDEBUG=0.
202# Also MSVC 6 must be service pack >= 3 to prevent INTERNAL COMPILER ERROR
203
204# Default to 0 anyway since the execution times are so much better.
205!ifndef TDEBUG
206TDEBUG=0
207!endif
208
209# Setting DEBUGSYM=1 is only useful with TDEBUG=0.
210# This option is for advanced developers. It includes symbol table
211# information for the debugger in an optimized (release) build.
212# NOTE: The debugging information generated for the optimized code may be
213# significantly misleading. For general MSVC users we recommend TDEBUG=1.
214
215!ifndef DEBUGSYM
216DEBUGSYM=0
217!endif
218
219
220# We can compile for a 32-bit or 64-bit target
221# WIN32 and WIN64 are mutually exclusive.  WIN32 is the default.
222!if !defined(WIN32) && (!defined(Win64) || !defined(WIN64))
223WIN32=0
224!endif
225
226# We can build either 32-bit or 64-bit target on a 64-bit platform
227# but the location of the binaries differs. Would be nice if the
228# detection of the platform could be automatic.
229#!ifndef BUILD_SYSTEM
230BUILD_SYSTEM=32
231#!endif
232
233# Define the name of the executable file.
234
235!ifndef GS
236!ifdef WIN64
237GS=gswin64
238!else
239GS=gswin32
240!endif
241!endif
242!ifndef GSCONSOLE
243GSCONSOLE=$(GS)c
244!endif
245!ifndef GSDLL
246!ifdef WIN64
247GSDLL=gsdll64
248!else
249GSDLL=gsdll32
250!endif
251!endif
252
253# To build two small executables and a large DLL use MAKEDLL=1
254# To build two large executables use MAKEDLL=0
255
256!ifndef MAKEDLL
257MAKEDLL=1
258!endif
259
260# Define the directory where the FreeType2 library sources are stored.
261# See freetype.mak for more information.
262
263!ifdef UFST_BRIDGE
264!if "$(UFST_BRIDGE)"=="1"
265FT_BRIDGE=0
266!endif
267!endif
268
269!ifndef FT_BRIDGE
270FT_BRIDGE=1
271!endif
272
273!ifndef FTSRCDIR
274FTSRCDIR=freetype
275!endif
276!ifndef FT_CFLAGS
277FT_CFLAGS=-I$(FTSRCDIR)\include
278!endif
279
280!ifdef BITSTREAM_BRIDGE
281FT_BRIDGE=0
282!endif
283
284# Define the directory where the IJG JPEG library sources are stored,
285# and the major version of the library that is stored there.
286# You may need to change this if the IJG library version changes.
287# See jpeg.mak for more information.
288
289!ifndef JSRCDIR
290JSRCDIR=jpeg
291!endif
292
293# Define the directory where the PNG library sources are stored,
294# and the version of the library that is stored there.
295# You may need to change this if the libpng version changes.
296# See png.mak for more information.
297
298!ifndef PNGSRCDIR
299PNGSRCDIR=libpng
300!endif
301
302!ifndef TIFFSRCDIR
303TIFFSRCDIR=tiff$(D)
304TIFFCONFIG_SUFFIX=.vc
305TIFFPLATFORM=win32
306!endif
307
308# Define the directory where the zlib sources are stored.
309# See zlib.mak for more information.
310
311!ifndef ZSRCDIR
312ZSRCDIR=zlib
313!endif
314
315# Define which jbig2 library to use
316!if !defined(JBIG2_LIB) && (!defined(NO_LURATECH) || "$(NO_LURATECH)" != "1")
317!if exist("luratech\ldf_jb2")
318JBIG2_LIB=luratech
319!endif
320!endif
321
322!ifndef JBIG2_LIB
323JBIG2_LIB=jbig2dec
324!endif
325
326!if "$(JBIG2_LIB)" == "luratech" || "$(JBIG2_LIB)" == "ldf_jb2"
327# Set defaults for using the Luratech JB2 implementation
328!ifndef JBIG2SRCDIR
329# CSDK source code location
330JBIG2SRCDIR=luratech\ldf_jb2
331!endif
332!ifndef JBIG2_CFLAGS
333# required compiler flags
334!ifdef WIN64
335JBIG2_CFLAGS=-DUSE_LDF_JB2 -DWIN64
336!else
337JBIG2_CFLAGS=-DUSE_LDF_JB2 -DWIN32
338!endif
339!endif
340!else
341# Use jbig2dec by default. See jbig2.mak for more information.
342!ifndef JBIG2SRCDIR
343# location of included jbig2dec library source
344JBIG2SRCDIR=jbig2dec
345!endif
346!endif
347
348# Alternatively, you can build a separate DLL
349# and define SHARE_JBIG2=1 in src/winlib.mak
350
351# Define which jpeg2k library to use
352!if !defined(JPX_LIB) && (!defined(NO_LURATECH) || "$(NO_LURATECH)" != "1")
353!if exist("luratech\lwf_jp2")
354JPX_LIB=luratech
355!endif
356!endif
357
358!if !defined(JPX_LIB) && (defined(USE_JASPER))
359!if exist("jasper\src")
360JPX_LIB=jasper
361!endif
362!endif
363
364!ifndef JPX_LIB
365JPX_LIB=openjpeg
366!endif
367
368# Alternatively, you can build a separate DLL
369# and define SHARE_JPX=1 in src/winlib.mak
370
371# Define the directory where the lcms source is stored.
372# See lcms.mak for more information
373!ifndef LCMSSRCDIR
374LCMSSRCDIR=lcms
375!endif
376
377# Define the directory where the lcms2 source is stored.
378# See lcms2.mak for more information
379!ifndef LCMS2SRCDIR
380LCMS2SRCDIR=lcms2
381!endif
382
383# Define the directory where the ijs source is stored,
384# and the process forking method to use for the server.
385# See ijs.mak for more information.
386
387!ifndef IJSSRCDIR
388SHARE_IJS=0
389IJS_NAME=
390IJSSRCDIR=ijs
391IJSEXECTYPE=win
392!endif
393
394# Define the directory where the CUPS library sources are stored,
395
396!ifndef LCUPSSRCDIR
397SHARE_LCUPS=0
398LCUPS_NAME=
399LCUPSSRCDIR=cups
400LCUPSBUILDTYPE=win
401CUPS_CC=$(CC) $(CFLAGS) -DWIN32
402!endif
403
404!ifndef LCUPSISRCDIR
405SHARE_LCUPSI=0
406LCUPSI_NAME=
407LCUPSISRCDIR=cups
408CUPS_CC=$(CC) $(CFLAGS) -DWIN32 -DHAVE_BOOLEAN
409!endif
410
411
412# Define any other compilation flags.
413
414# support XCFLAGS for parity with the unix makefiles
415!ifndef XCFLAGS
416XCFLAGS=
417!endif
418
419# To try the UNICODE/UTF8 you can comment out the following
420# or specify USEUNICODE=1 when you invoke nmake
421!if !defined(USEUNICODE) || "$(USEUNICODE)" != "1"
422UNICODECFLAGS=/DWINDOWS_NO_UNICODE
423!else
424UNICODECFLAGS=
425!endif
426
427!ifndef CFLAGS
428CFLAGS=
429!endif
430
431!if "$(MEMENTO)"=="1"
432CFLAGS=$(CFLAGS) -DMEMENTO
433!endif
434
435CFLAGS=$(CFLAGS) $(XCFLAGS) $(UNICODECFLAGS)
436
437# 1 --> Use 64 bits for gx_color_index.  This is required only for
438# non standard devices or DeviceN process color model devices.
439USE_LARGE_COLOR_INDEX=1
440
441!if $(USE_LARGE_COLOR_INDEX) == 1
442# Definitions to force gx_color_index to 64 bits
443LARGEST_UINTEGER_TYPE=unsigned __int64
444GX_COLOR_INDEX_TYPE=$(LARGEST_UINTEGER_TYPE)
445
446CFLAGS=$(CFLAGS) /DGX_COLOR_INDEX_TYPE="$(GX_COLOR_INDEX_TYPE)"
447!endif
448
449# -W3 generates too much noise.
450!ifndef WARNOPT
451WARNOPT=-W2
452!endif
453
454#
455# Do not edit the next group of lines.
456
457#!include $(COMMONDIR)\msvcdefs.mak
458#!include $(COMMONDIR)\pcdefs.mak
459#!include $(COMMONDIR)\generic.mak
460!include $(GLSRCDIR)\version.mak
461# The following is a hack to get around the special treatment of \ at
462# the end of a line.
463NUL=
464DD=$(GLGENDIR)\$(NUL)
465GLD=$(GLGENDIR)\$(NUL)
466PSD=$(PSGENDIR)\$(NUL)
467
468!ifdef SBR
469SBRFLAGS=/FR$(SBRDIR)\$(NUL)
470!endif
471
472# ------ Platform-specific options ------ #
473
474# Define which major version of MSVC is being used
475# (currently, 4, 5, 6, 7, and 8 are supported).
476# Define the minor version of MSVC, currently only
477# used for Microsoft Visual Studio .NET 2003 (7.1)
478
479#MSVC_VERSION=6
480#MSVC_MINOR_VERSION=0
481
482# Make a guess at the version of MSVC in use
483# This will not work if service packs change the version numbers.
484
485!if defined(_NMAKE_VER) && !defined(MSVC_VERSION)
486!if "$(_NMAKE_VER)" == "162"
487MSVC_VERSION=5
488!endif
489!if "$(_NMAKE_VER)" == "6.00.8168.0"
490MSVC_VERSION=6
491!endif
492!if "$(_NMAKE_VER)" == "7.00.9466"
493MSVC_VERSION=7
494!endif
495!if "$(_NMAKE_VER)" == "7.00.9955"
496MSVC_VERSION=7
497!endif
498!if "$(_NMAKE_VER)" == "7.10.3077"
499MSVC_VERSION=7
500MSVC_MINOR_VERSION=1
501!endif
502!if "$(_NMAKE_VER)" == "8.00.40607.16"
503MSVC_VERSION=8
504!endif
505!if "$(_NMAKE_VER)" == "8.00.50727.42"
506MSVC_VERSION=8
507!endif
508!if "$(_NMAKE_VER)" == "8.00.50727.762"
509MSVC_VERSION=8
510!endif
511!if "$(_NMAKE_VER)" == "9.00.21022.08"
512MSVC_VERSION=9
513!endif
514!if "$(_NMAKE_VER)" == "9.00.30729.01"
515MSVC_VERSION=9
516!endif
517!if "$(_NMAKE_VER)" == "10.00.30319.01"
518MSVC_VERSION=10
519!endif
520!endif
521
522!ifndef MSVC_VERSION
523MSVC_VERSION=6
524!endif
525!ifndef MSVC_MINOR_VERSION
526MSVC_MINOR_VERSION=0
527!endif
528
529# Define the drive, directory, and compiler name for the Microsoft C files.
530# COMPDIR contains the compiler and linker (normally \msdev\bin).
531# MSINCDIR contains the include files (normally \msdev\include).
532# LIBDIR contains the library files (normally \msdev\lib).
533# COMP is the full C compiler path name (normally \msdev\bin\cl).
534# COMPCPP is the full C++ compiler path name (normally \msdev\bin\cl).
535# COMPAUX is the compiler name for DOS utilities (normally \msdev\bin\cl).
536# RCOMP is the resource compiler name (normallly \msdev\bin\rc).
537# LINK is the full linker path name (normally \msdev\bin\link).
538# Note that when MSINCDIR and LIBDIR are used, they always get a '\' appended,
539#   so if you want to use the current directory, use an explicit '.'.
540
541!if $(MSVC_VERSION) == 4
542! ifndef DEVSTUDIO
543DEVSTUDIO=c:\msdev
544! endif
545COMPBASE=$(DEVSTUDIO)
546SHAREDBASE=$(DEVSTUDIO)
547!endif
548
549!if $(MSVC_VERSION) == 5
550! ifndef DEVSTUDIO
551DEVSTUDIO=C:\Program Files\Devstudio
552! endif
553!if "$(DEVSTUDIO)"==""
554COMPBASE=
555SHAREDBASE=
556!else
557COMPBASE=$(DEVSTUDIO)\VC
558SHAREDBASE=$(DEVSTUDIO)\SharedIDE
559!endif
560!endif
561
562!if $(MSVC_VERSION) == 6
563! ifndef DEVSTUDIO
564DEVSTUDIO=C:\Program Files\Microsoft Visual Studio
565! endif
566!if "$(DEVSTUDIO)"==""
567COMPBASE=
568SHAREDBASE=
569!else
570COMPBASE=$(DEVSTUDIO)\VC98
571SHAREDBASE=$(DEVSTUDIO)\Common\MSDev98
572!endif
573!endif
574
575!if $(MSVC_VERSION) == 7
576! ifndef DEVSTUDIO
577!if $(MSVC_MINOR_VERSION) == 0
578DEVSTUDIO=C:\Program Files\Microsoft Visual Studio .NET
579!else
580DEVSTUDIO=C:\Program Files\Microsoft Visual Studio .NET 2003
581!endif
582! endif
583!if "$(DEVSTUDIO)"==""
584COMPBASE=
585SHAREDBASE=
586!else
587COMPBASE=$(DEVSTUDIO)\Vc7
588SHAREDBASE=$(DEVSTUDIO)\Vc7
589!endif
590!endif
591
592!if $(MSVC_VERSION) == 8
593! ifndef DEVSTUDIO
594!if $(BUILD_SYSTEM) == 64
595DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 8
596!else
597DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 8
598!endif
599! endif
600!if "$(DEVSTUDIO)"==""
601COMPBASE=
602SHAREDBASE=
603!else
604COMPBASE=$(DEVSTUDIO)\VC
605SHAREDBASE=$(DEVSTUDIO)\VC
606!ifdef WIN64
607COMPDIR64=$(COMPBASE)\bin\amd64
608LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\AMD64"
609!endif
610!endif
611!endif
612
613!if $(MSVC_VERSION) == 9
614! ifndef DEVSTUDIO
615!if $(BUILD_SYSTEM) == 64
616DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 9.0
617!else
618DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 9.0
619!endif
620! endif
621!if "$(DEVSTUDIO)"==""
622COMPBASE=
623SHAREDBASE=
624!else
625# There are at least 4 different values:
626# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
627# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
628! ifdef MSSDK
629RCDIR=$(MSSDK)\bin
630! else
631RCDIR=C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin
632! endif
633COMPBASE=$(DEVSTUDIO)\VC
634SHAREDBASE=$(DEVSTUDIO)\VC
635!ifdef WIN64
636COMPDIR64=$(COMPBASE)\bin\amd64
637LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\AMD64"
638!endif
639!endif
640!endif
641
642!if $(MSVC_VERSION) == 10
643! ifndef DEVSTUDIO
644!if $(BUILD_SYSTEM) == 64
645DEVSTUDIO=C:\Program Files (x86)\Microsoft Visual Studio 10.0
646!else
647DEVSTUDIO=C:\Program Files\Microsoft Visual Studio 10.0
648!endif
649! endif
650!if "$(DEVSTUDIO)"==""
651COMPBASE=
652SHAREDBASE=
653!else
654# There are at least 4 different values:
655# "v6.0"=Vista, "v6.0A"=Visual Studio 2008,
656# "v6.1"=Windows Server 2008, "v7.0"=Windows 7
657! ifdef MSSDK
658!  ifdef WIN64
659RCDIR=$(MSSDK)\bin\x64
660!  else
661RCDIR=$(MSSDK)\bin
662!  endif
663! else
664!ifdef WIN64
665RCDIR=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\bin
666!else
667RCDIR=C:\Program Files\Microsoft SDKs\Windows\v7.0\bin
668!endif
669! endif
670COMPBASE=$(DEVSTUDIO)\VC
671SHAREDBASE=$(DEVSTUDIO)\VC
672!ifdef WIN64
673!if $(BUILD_SYSTEM) == 64
674COMPDIR64=$(COMPBASE)\bin\amd64
675LINKLIBPATH=/LIBPATH:"$(MSSDK)\lib\x64" /LIBPATH:"$(COMPBASE)\lib\amd64"
676!else
677COMPDIR64=$(COMPBASE)\bin\x86_amd64
678LINKLIBPATH=/LIBPATH:"$(COMPBASE)\lib\amd64" /LIBPATH:"$(COMPBASE)\PlatformSDK\Lib\x64"
679!endif
680!endif
681!endif
682!endif
683
684# Some environments don't want to specify the path names for the tools at all.
685# Typical definitions for such an environment would be:
686#   MSINCDIR= LIBDIR= COMP=cl COMPAUX=cl RCOMP=rc LINK=link
687# COMPDIR, LINKDIR, and RCDIR are irrelevant, since they are only used to
688# define COMP, LINK, and RCOMP respectively, but we allow them to be
689# overridden anyway for completeness.
690!ifndef COMPDIR
691!if "$(COMPBASE)"==""
692COMPDIR=
693!else
694!ifdef WIN64
695COMPDIR=$(COMPDIR64)
696!else
697COMPDIR=$(COMPBASE)\bin
698!endif
699!endif
700!endif
701
702!ifndef LINKDIR
703!if "$(COMPBASE)"==""
704LINKDIR=
705!else
706!ifdef WIN64
707LINKDIR=$(COMPDIR64)
708!else
709LINKDIR=$(COMPBASE)\bin
710!endif
711!endif
712!endif
713
714!ifndef RCDIR
715!if "$(SHAREDBASE)"==""
716RCDIR=
717!else
718RCDIR=$(SHAREDBASE)\bin
719!endif
720!endif
721
722!ifndef MSINCDIR
723!if "$(COMPBASE)"==""
724MSINCDIR=
725!else
726MSINCDIR=$(COMPBASE)\include
727!endif
728!endif
729
730!ifndef LIBDIR
731!if "$(COMPBASE)"==""
732LIBDIR=
733!else
734!ifdef WIN64
735LIBDIR=$(COMPBASE)\lib\amd64
736!else
737LIBDIR=$(COMPBASE)\lib
738!endif
739!endif
740!endif
741
742!ifndef COMP
743!if "$(COMPDIR)"==""
744COMP=cl
745!else
746COMP="$(COMPDIR)\cl"
747!endif
748!endif
749!ifndef COMPCPP
750COMPCPP=$(COMP)
751!endif
752!ifndef COMPAUX
753!ifdef WIN64
754COMPAUX=$(COMP)
755!else
756COMPAUX=$(COMP)
757!endif
758!endif
759
760!ifndef RCOMP
761!if "$(RCDIR)"==""
762RCOMP=rc
763!else
764RCOMP="$(RCDIR)\rc"
765!endif
766!endif
767
768!ifndef LINK
769!if "$(LINKDIR)"==""
770LINK=link
771!else
772LINK="$(LINKDIR)\link"
773!endif
774!endif
775
776# nmake does not have a form of .BEFORE or .FIRST which can be used
777# to specify actions before anything else is done.  If LIB and INCLUDE
778# are not defined then we want to define them before we link or
779# compile.  Here is a kludge which allows us to to do what we want.
780# nmake does evaluate preprocessor directives when they are encountered.
781# So the desired set statements are put into dummy preprocessor
782# directives.
783!ifndef INCLUDE
784!if "$(MSINCDIR)"!=""
785!if [set INCLUDE=$(MSINCDIR)]==0
786!endif
787!endif
788!endif
789!ifndef LIB
790!if "$(LIBDIR)"!=""
791!if [set LIB=$(LIBDIR)]==0
792!endif
793!endif
794!endif
795
796!ifndef LINKLIBPATH
797LINKLIBPATH=
798!endif
799
800# Define the processor architecture. (i386, ppc, alpha)
801
802!ifndef CPU_FAMILY
803CPU_FAMILY=i386
804#CPU_FAMILY=ppc
805#CPU_FAMILY=alpha  # not supported yet - we need someone to tweak
806!endif
807
808# Define the processor (CPU) type. Allowable values depend on the family:
809#   i386: 386, 486, 586
810#   ppc: 601, 604, 620
811#   alpha: not currently used.
812
813!ifndef CPU_TYPE
814CPU_TYPE=486
815#CPU_TYPE=601
816!endif
817
818# Define special features of CPUs
819
820# We'll assume that if you have an x86 machine, you've got a modern
821# enough one to have SSE2 instructions. If you don't, then predefine
822# DONT_HAVE_SSE2 when calling this makefile
823!if "$(CPU_FAMILY)" == "i386"
824!ifndef DONT_HAVE_SSE2
825!ifndef HAVE_SSE2
826!message **************************************************************
827!message * Assuming that target has SSE2 instructions available. If   *
828!message * this is NOT the case, define DONT_HAVE_SSE2 when building. *
829!message **************************************************************
830!endif
831HAVE_SSE2=1
832CFLAGS=$(CFLAGS) /DHAVE_SSE2
833!endif
834!endif
835
836# Define the .dev module that implements thread and synchronization
837# primitives for this platform.  Don't change this unless you really know
838# what you're doing.
839
840!ifndef SYNC
841SYNC=winsync
842!endif
843
844# Luratech jp2 flags depend on the compiler version
845#
846!if "$(JPX_LIB)" == "luratech" || "$(JPX_LIB)" == "lwf_jp2"
847# Set defaults for using the Luratech JP2 implementation
848!ifndef JPXSRCDIR
849# CSDK source code location
850JPXSRCDIR=luratech\lwf_jp2
851!endif
852!ifndef JPX_CFLAGS
853# required compiler flags
854!ifdef WIN64
855JPX_CFLAGS=-DUSE_LWF_JP2 -DWIN64 -DNO_ASSEMBLY
856!else
857JPX_CFLAGS=-DUSE_LWF_JP2 -DWIN32 -DNO_ASSEMBLY
858!endif
859!endif
860!endif
861
862# OpenJPEG compiler flags
863#
864!if "$(JPX_LIB)" == "openjpeg"
865!ifndef JPXSRCDIR
866JPXSRCDIR=openjpeg
867!endif
868!ifndef JPX_CFLAGS
869!ifdef WIN64
870JPX_CFLAGS=-DUSE_OPENJPEG_JP2 -DWIN64
871!else
872JPX_CFLAGS=-DUSE_OPENJPEG_JP2 -DWIN32
873!endif
874!else
875JPX_CFLAGS = $JPX_CFLAGS -DUSE_OPENJPEG_JP2
876!endif
877!endif
878
879# Use jasper if nothing else works. See jasper.mak for more information.
880!ifndef JPXSRCDIR
881JPXSRCDIR=jasper
882!endif
883
884
885# ------ Devices and features ------ #
886
887# Choose the language feature(s) to include.  See gs.mak for details.
888
889!ifndef FEATURE_DEVS
890FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.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 $(PSD)winutf8.dev
891!endif
892
893# Choose whether to compile the .ps initialization files into the executable.
894# See gs.mak for details.
895
896!ifndef COMPILE_INITS
897COMPILE_INITS=1
898!endif
899
900# Choose whether to store band lists on files or in memory.
901# The choices are 'file' or 'memory'.
902
903!ifndef BAND_LIST_STORAGE
904BAND_LIST_STORAGE=file
905!endif
906
907# Choose which compression method to use when storing band lists in memory.
908# The choices are 'lzw' or 'zlib'.
909
910!ifndef BAND_LIST_COMPRESSOR
911BAND_LIST_COMPRESSOR=zlib
912!endif
913
914# Choose the implementation of file I/O: 'stdio', 'fd', or 'both'.
915# See gs.mak and sfxfd.c for more details.
916
917!ifndef FILE_IMPLEMENTATION
918FILE_IMPLEMENTATION=stdio
919!endif
920
921# Choose the implementation of stdio: '' for file I/O and 'c' for callouts
922# See gs.mak and ziodevs.c/ziodevsc.c for more details.
923
924!ifndef STDIO_IMPLEMENTATION
925STDIO_IMPLEMENTATION=c
926!endif
927
928# Choose the device(s) to include.  See devs.mak for details,
929# devs.mak and contrib.mak for the list of available devices.
930
931!ifndef DEVICE_DEVS
932DEVICE_DEVS=$(DD)display.dev $(DD)mswindll.dev $(DD)mswinpr2.dev
933DEVICE_DEVS2=$(DD)epson.dev $(DD)eps9high.dev $(DD)eps9mid.dev $(DD)epsonc.dev $(DD)ibmpro.dev
934DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev
935DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev
936DEVICE_DEVS5=$(DD)uniprint.dev $(DD)djet500c.dev $(DD)declj250.dev $(DD)lj250.dev $(DD)ijs.dev
937DEVICE_DEVS6=$(DD)st800.dev $(DD)stcolor.dev $(DD)bj10e.dev $(DD)bj200.dev
938DEVICE_DEVS7=$(DD)t4693d2.dev $(DD)t4693d4.dev $(DD)t4693d8.dev $(DD)tek4696.dev
939DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
940DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pkmraw.dev
941DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
942DEVICE_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 $(DD)tiffscaled.dev $(DD)tiffscaled8.dev $(DD)tiffscaled24.dev
943DEVICE_DEVS12=$(DD)psmono.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
944DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pngmonod.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
945DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev
946DEVICE_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
947DEVICE_DEVS16=$(DD)bbox.dev $(DD)cups.dev $(DD)plib.dev $(DD)plibg.dev $(DD)plibm.dev $(DD)plibc.dev $(DD)plibk.dev $(DD)plan.dev $(DD)plang.dev $(DD)planm.dev $(DD)planc.dev $(DD)plank.dev
948# Overflow for DEVS3,4,5,6,9
949DEVICE_DEVS17=$(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev
950DEVICE_DEVS18=$(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev $(DD)jetp3852.dev $(DD)r4081.dev
951DEVICE_DEVS19=$(DD)lbp8.dev $(DD)m8510.dev $(DD)necp6.dev $(DD)bjc600.dev $(DD)bjc800.dev
952DEVICE_DEVS20=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pamcmyk32.dev $(DD)pamcmyk4.dev
953DEVICE_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
954!endif
955
956# FAPI compilation options :
957UFST_CFLAGS=-DMSVC
958
959BITSTREAM_CFLAGS=
960
961# ---------------------------- End of options ---------------------------- #
962
963# Define the name of the makefile -- used in dependencies.
964
965MAKEFILE=$(PSSRCDIR)\msvc32.mak
966TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)\msvccmd.mak $(GLSRCDIR)\msvctail.mak $(GLSRCDIR)\winlib.mak $(PSSRCDIR)\winint.mak
967
968# Define the files to be removed by `make clean'.
969# nmake expands macros when encountered, not when used,
970# so this must precede the !include statements.
971
972BEGINFILES2=$(GLGENDIR)\lib.rsp\
973 $(GLOBJDIR)\*.exp $(GLOBJDIR)\*.ilk $(GLOBJDIR)\*.pdb $(GLOBJDIR)\*.lib\
974 $(BINDIR)\*.exp $(BINDIR)\*.ilk $(BINDIR)\*.pdb $(BINDIR)\*.lib obj.pdb\
975 obj.idb $(GLOBJDIR)\gs.pch $(SBRDIR)\*.sbr $(GLOBJDIR)\cups\*.h
976
977!ifdef BSCFILE
978BEGINFILES2=$(BEGINFILES2) $(BSCFILE)
979!endif
980
981!include $(GLSRCDIR)\msvccmd.mak
982# psromfs.mak must precede lib.mak
983!include $(PSSRCDIR)\psromfs.mak
984!include $(GLSRCDIR)\winlib.mak
985!include $(GLSRCDIR)\msvctail.mak
986!include $(PSSRCDIR)\winint.mak
987
988# ----------------------------- Main program ------------------------------ #
989
990GSCONSOLE_XE=$(BINDIR)\$(GSCONSOLE).exe
991GSDLL_DLL=$(BINDIR)\$(GSDLL).dll
992GSDLL_OBJS=$(PSOBJ)gsdll.$(OBJ) $(GLOBJ)gp_msdll.$(OBJ)
993
994!if $(TDEBUG) != 0
995$(PSGEN)lib.rsp: $(TOP_MAKEFILES)
996	echo /NODEFAULTLIB:LIBC.lib > $(PSGEN)lib.rsp
997	echo /NODEFAULTLIB:LIBCMT.lib >> $(PSGEN)lib.rsp
998	echo LIBCMTD.lib >> $(PSGEN)lib.rsp
999!else
1000$(PSGEN)lib.rsp: $(TOP_MAKEFILES)
1001	echo /NODEFAULTLIB:LIBC.lib > $(PSGEN)lib.rsp
1002	echo /NODEFAULTLIB:LIBCMTD.lib >> $(PSGEN)lib.rsp
1003	echo LIBCMT.lib >> $(PSGEN)lib.rsp
1004!endif
1005
1006
1007!if $(MAKEDLL)
1008# The graphical small EXE loader
1009$(GS_XE): $(GSDLL_DLL)  $(DWOBJ) $(GSCONSOLE_XE) $(GLOBJ)gp_wutf8.$(OBJ)
1010	echo /SUBSYSTEM:WINDOWS > $(PSGEN)gswin.rsp
1011!if "$(PROFILE)"=="1"
1012	echo /PROFILE >> $(PSGEN)gswin.rsp
1013!endif
1014!ifdef WIN64
1015	echo /DEF:$(PSSRCDIR)\dwmain64.def /OUT:$(GS_XE) >> $(PSGEN)gswin.rsp
1016!else
1017	echo /DEF:$(PSSRCDIR)\dwmain32.def /OUT:$(GS_XE) >> $(PSGEN)gswin.rsp
1018!endif
1019	$(LINK) $(LCT) @$(PSGEN)gswin.rsp $(DWOBJ) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res $(GLOBJ)gp_wutf8.$(OBJ)
1020	del $(PSGEN)gswin.rsp
1021
1022# The console mode small EXE loader
1023$(GSCONSOLE_XE): $(OBJC) $(GS_OBJ).res $(PSSRCDIR)\dw64c.def $(PSSRCDIR)\dw32c.def $(GLOBJ)gp_wutf8.$(OBJ)
1024	echo /SUBSYSTEM:CONSOLE > $(PSGEN)gswin.rsp
1025!if "$(PROFILE)"=="1"
1026	echo /PROFILE >> $(PSGEN)gswin.rsp
1027!endif
1028!ifdef WIN64
1029	echo  /DEF:$(PSSRCDIR)\dw64c.def /OUT:$(GSCONSOLE_XE) >> $(PSGEN)gswin.rsp
1030!else
1031	echo  /DEF:$(PSSRCDIR)\dw32c.def /OUT:$(GSCONSOLE_XE) >> $(PSGEN)gswin.rsp
1032!endif
1033	$(LINK) $(LCT) @$(PSGEN)gswin.rsp $(OBJC) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res $(GLOBJ)gp_wutf8.$(OBJ)
1034	del $(PSGEN)gswin.rsp
1035
1036# The big DLL
1037$(GSDLL_DLL): $(GS_ALL) $(DEVS_ALL) $(GSDLL_OBJS) $(GSDLL_OBJ).res $(PSGEN)lib.rsp $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
1038	echo /DLL /DEF:$(PSSRCDIR)\$(GSDLL).def /OUT:$(GSDLL_DLL) > $(PSGEN)gswin.rsp
1039!if "$(PROFILE)"=="1"
1040	echo /PROFILE >> $(PSGEN)gswin.rsp
1041!endif
1042	$(LINK) $(LCT) @$(PSGEN)gswin.rsp $(GSDLL_OBJS) @$(ld_tr) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) @$(PSGEN)lib.rsp $(LINKLIBPATH) @$(LIBCTR) $(GSDLL_OBJ).res
1043	del $(PSGEN)gswin.rsp
1044
1045!else
1046# The big graphical EXE
1047$(GS_XE): $(GSCONSOLE_XE) $(GS_ALL) $(DEVS_ALL) $(GSDLL_OBJS) $(DWOBJNO) $(GSDLL_OBJ).res $(PSSRCDIR)\dwmain32.def\
1048		$(PSSRCDIR)\dwmain64.def $(PSGEN)lib.rsp $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
1049	copy $(ld_tr) $(PSGEN)gswin.tr
1050	echo $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) >> $(PSGEN)gswin.tr
1051	echo $(PSOBJ)dwnodll.obj >> $(PSGEN)gswin.tr
1052	echo $(GLOBJ)dwimg.obj >> $(PSGEN)gswin.tr
1053	echo $(PSOBJ)dwmain.obj >> $(PSGEN)gswin.tr
1054	echo $(GLOBJ)dwtext.obj >> $(PSGEN)gswin.tr
1055	echo $(GLOBJ)dwreg.obj >> $(PSGEN)gswin.tr
1056!ifdef WIN64
1057	echo /DEF:$(PSSRCDIR)\dwmain64.def /OUT:$(GS_XE) > $(PSGEN)gswin.rsp
1058!else
1059	echo /DEF:$(PSSRCDIR)\dwmain32.def /OUT:$(GS_XE) > $(PSGEN)gswin.rsp
1060!endif
1061!if "$(PROFILE)"=="1"
1062	echo /PROFILE >> $(PSGEN)gswin.rsp
1063!endif
1064	$(LINK) $(LCT) @$(PSGEN)gswin.rsp $(GLOBJ)gsdll @$(PSGEN)gswin.tr $(LINKLIBPATH) @$(LIBCTR) @$(PSGEN)lib.rsp $(GSDLL_OBJ).res $(DWTRACE)
1065	del $(PSGEN)gswin.tr
1066	del $(PSGEN)gswin.rsp
1067
1068# The big console mode EXE
1069$(GSCONSOLE_XE): $(GS_ALL) $(DEVS_ALL) $(GSDLL_OBJS) $(OBJCNO) $(GS_OBJ).res $(PSSRCDIR)\dw64c.def $(PSSRCDIR)\dw32c.def $(PSGEN)lib.rsp $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ)
1070	copy $(ld_tr) $(PSGEN)gswin.tr
1071	echo $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) >> $(PSGEN)gswin.tr
1072	echo $(PSOBJ)dwnodllc.obj >> $(PSGEN)gswin.tr
1073	echo $(GLOBJ)dwimg.obj >> $(PSGEN)gswin.tr
1074	echo $(PSOBJ)dwmainc.obj >> $(PSGEN)gswin.tr
1075	echo $(PSOBJ)dwreg.obj >> $(PSGEN)gswin.tr
1076	echo /SUBSYSTEM:CONSOLE > $(PSGEN)gswin.rsp
1077!ifdef WIN64
1078	echo /DEF:$(PSSRCDIR)\dw64c.def /OUT:$(GSCONSOLE_XE) >> $(PSGEN)gswin.rsp
1079!else
1080	echo /DEF:$(PSSRCDIR)\dw32c.def /OUT:$(GSCONSOLE_XE) >> $(PSGEN)gswin.rsp
1081!endif
1082	$(LINK) $(LCT) @$(PSGEN)gswin.rsp $(GLOBJ)gsdll @$(PSGEN)gswin.tr $(LINKLIBPATH) @$(LIBCTR) @$(PSGEN)lib.rsp $(GS_OBJ).res $(DWTRACE)
1083	del $(PSGEN)gswin.rsp
1084	del $(PSGEN)gswin.tr
1085!endif
1086
1087# ---------------------- Debug targets ---------------------- #
1088# Simply set some definitions and call ourselves back         #
1089
1090!ifdef WIN64
1091WINDEFS=WIN64= BUILD_SYSTEM="$(BUILD_SYSTEM)"
1092!else
1093WINDEFS=BUILD_SYSTEM="$(BUILD_SYSTEM)"
1094!endif
1095
1096DEBUGDEFS=DEBUG=1 TDEBUG=1
1097
1098debug:
1099	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(DEBUGDEFS) $(WINDEFS)
1100
1101debugclean:
1102	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(DEBUGDEFS) $(WINDEFS) clean
1103
1104debugbsc:
1105	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(DEBUGDEFS) $(WINDEFS) bsc
1106
1107# --------------------- Memento targets --------------------- #
1108# Simply set some definitions and call ourselves back         #
1109
1110MEMENTODEFS=$(DEBUGDEFS) MEMENTO=1
1111
1112memento-target:
1113	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(MEMENTODEFS) $(WINDEFS)
1114
1115mementoclean:
1116	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(MEMENTODEFS) $(WINDEFS) clean
1117
1118mementobsc:
1119	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(MEMENTODEFS) $(WINDEFS) bsc
1120
1121# --------------------- Profile targets --------------------- #
1122# Simply set some definitions and call ourselves back         #
1123
1124PROFILEDEFS=PROFILE=1
1125
1126profile:
1127	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(PROFILEDEFS) $(WINDEFS)
1128
1129profileclean:
1130	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(PROFILEDEFS) $(WINDEFS) clean
1131
1132profilebsc:
1133	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" FT_BRIDGE=$(FT_BRIDGE) $(PROFILEDEFS) $(WINDEFS) bsc
1134
1135
1136
1137# ---------------------- UFST targets ---------------------- #
1138# Simply set some definitions and call ourselves back        #
1139
1140!ifndef UFST_ROOT
1141UFST_ROOT=C:\ufst
1142!endif
1143
1144UFST_ROMFS_ARGS=-b \
1145   -P $(UFST_ROOT)/fontdata/mtfonts/pcl45/mt3/ -d fontdata/mtfonts/pcl45/mt3/ pcl___xj.fco plug__xi.fco wd____xh.fco \
1146   -P $(UFST_ROOT)/fontdata/mtfonts/pclps2/mt3/ -d fontdata/mtfonts/pclps2/mt3/ pclp2_xj.fco \
1147   -c -P $(PSSRCDIR)/../lib/ -d Resource/Init/ FAPIconfig-FCO
1148
1149UFSTROMFONTDIR=\\\"%%%%%rom%%%%%fontdata/\\\"
1150UFSTDISCFONTDIR="$(UFST_ROOT)/fontdata"
1151
1152UFSTBASEDEFS=UFST_BRIDGE=1 FT_BRIDGE=1 UFST_ROOT="$(UFST_ROOT)" UFST_ROMFS_ARGS="$(UFST_ROMFS_ARGS)" UFSTFONTDIR="$(UFSTFONTDIR)" UFSTROMFONTDIR="$(UFSTROMFONTDIR)"
1153
1154!ifdef WIN64
1155UFSTDEBUGDEFS=BINDIR=.\ufstdebugbin GLGENDIR=.\ufstdebugobj64 GLOBJDIR=.\ufstdebugobj64 PSLIBDIR=.\lib PSGENDIR=.\ufstdebugobj64 PSOBJDIR=.\ufstdebugobj64 DEBUG=1 TDEBUG=1 SBRDIR=.\ufstdebugobj64
1156UFSTDEFS=BINDIR=.\ufstbin GLGENDIR=.\ufstobj64 GLOBJDIR=.\ufstobj64 PSLIBDIR=.\lib PSGENDIR=.\ufstobj64 PSOBJDIR=.\ufstobj64 SBRDIR=.\ufstobj64
1157!else
1158UFSTDEBUGDEFS=BINDIR=.\ufstdebugbin GLGENDIR=.\ufstdebugobj GLOBJDIR=.\ufstdebugobj PSLIBDIR=.\lib PSGENDIR=.\ufstdebugobj PSOBJDIR=.\ufstdebugobj DEBUG=1 TDEBUG=1 SBRDIR=.\ufstdebugobj
1159UFSTDEFS=BINDIR=.\ufstbin GLGENDIR=.\ufstobj GLOBJDIR=.\ufstobj PSLIBDIR=.\lib PSGENDIR=.\ufstobj PSOBJDIR=.\ufstobj SBRDIR=.\ufstobj
1160!endif
1161
1162ufst-lib:
1163#	Could make this call a makefile in the ufst code?
1164#	cd $(UFST_ROOT)\rts\lib
1165#	nmake -f makefile.artifex fco_lib.a if_lib.a psi_lib.a tt_lib.a
1166
1167ufst-debug: ufst-lib
1168	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" $(UFSTBASEDEFS) $(UFSTDEBUGDEFS) UFST_CFLAGS="$(UFST_CFLAGS)" $(WINDEFS)
1169
1170ufst-debugclean: ufst-lib
1171	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" $(UFSTBASEDEFS) $(UFSTDEBUGDEFS) UFST_CFLAGS="$(UFST_CFLAGS)" $(WINDEFS) clean
1172
1173ufst-debugbsc: ufst-lib
1174	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" $(UFSTBASEDEFS) $(UFSTDEBUGDEFS) UFST_CFLAGS="$(UFST_CFLAGS)" $(WINDEFS) bsc
1175
1176ufst: ufst-lib
1177	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" $(UFSTBASEDEFS) $(UFSTDEFS) UFST_CFLAGS="$(UFST_CFLAGS)" $(WINDEFS)
1178
1179ufst-clean: ufst-lib
1180	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" $(UFSTBASEDEFS) $(UFSTDEFS) UFST_CFLAGS="$(UFST_CFLAGS)" $(WINDEFS) clean
1181
1182ufst-bsc: ufst-lib
1183	nmake -f $(MAKEFILE) DEVSTUDIO="$(DEVSTUDIO)" $(UFSTBASEDEFS) $(UFSTDEFS) UFST_CFLAGS="$(UFST_CFLAGS)" $(WINDEFS) bsc
1184
1185# ---------------------- Browse information step ---------------------- #
1186
1187bsc:
1188	bscmake /o $(SBRDIR)\ghostscript.bsc /v $(GLOBJDIR)\*.sbr
1189
1190# end of makefile
1191