1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
# Copyright (C) 1997-2007 Artifex Software, Inc.
# All Rights Reserved.
#
# This software is provided AS-IS with no warranty, either express or
# implied.
#
# This software is distributed under license and may not be copied, modified
# or distributed except as expressly authorized under the terms of that
# license. Refer to licensing information at http://www.artifex.com/
# or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
# San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
#
# msvc_top.mak
# Generic top-level makefile for Win32 Microsoft Visual C (ver >= 4.1)
# The product-specific top-level makefile defines the following:
# MAKEFILE, COMMONDIR, CONFIG, DEBUG, DEVICE_DEVS, GSDIR, MAIN_OBJ,
# NOPRIVATE, TDEBUG, TARGET_DEVS, TARGET_XE, MSVC_VERSION
# It also must include the product-specific *.mak.
# XE isn't defined yet.
default: $(TARGET_XE).exe
# Define the ANSI-to-K&R dependency. Borland C, Microsoft C and
# Watcom C all accept ANSI syntax, but we need to preconstruct ccf32.tr
# to get around the limit on the maximum length of a command line.
AK=$(GLGENDIR)\ccf32.tr
# clean gs files using the, we also clean up the platform files here
# this should be separate. TODO remove genarch.ilk and genarch.pdb as
# well.
clean_gs:
nmake /f $(GLSRCDIR)\msvclib.mak \
GLSRCDIR=$(GLSRCDIR) GLGENDIR=$(GLGENDIR) \
GLOBJDIR=$(GLOBJDIR) clean
erase $(TARGET_XE).ilk
erase $(TARGET_XE).pdb
erase $(TARGET_XE).exp
erase $(TARGET_XE).lib
# Define names of utility programs
AUXGENDIR=$(GLGENDIR)
AUXGEN=$(AUXGENDIR)$(D)
ANSI2KNR_XE=$(AUXGEN)ansi2knr.exe
ECHOGS_XE=$(AUXGEN)echogs.exe
GENARCH_XE=$(AUXGEN)genarch.exe
GENCONF_XE=$(AUXGEN)genconf.exe
GENDEV_XE=$(AUXGEN)gendev.exe
GENINIT_XE=$(AUXGEN)geninit.exe
GENHT_XE=$(AUXGEN)genht.exe
MKROMFS_XE=$(AUXGEN)mkromfs$(XEAUX)
# Platform specification
#**************** PATCHES expected by some of the GS files
JGENDIR=$(GLGENDIR)
JOBJDIR=$(GLOBJDIR)
PNGGENDIR=$(GLGENDIR)
PNGOBJDIR=$(GLOBJDIR)
ZGENDIR=$(GLGENDIR)
ZOBJDIR=$(GLOBJDIR)
GLSRC=$(GLSRCDIR)$(D)
GLGEN=$(GLGENDIR)$(D)
GLOBJ=$(GLOBJDIR)$(D)
#**************** END PATCHES
!if "$(PSICFLAGS)" == "/DPSI_INCLUDED"
# 1 --> Use 64 bits for gx_color_index. This is required only for
# non standard devices or DeviceN process color model devices.
USE_LARGE_COLOR_INDEX=1
!if $(USE_LARGE_COLOR_INDEX) == 1
# Definitions to force gx_color_index to 64 bits
LARGEST_UINTEGER_TYPE=unsigned __int64
GX_COLOR_INDEX_TYPE=$(LARGEST_UINTEGER_TYPE)
CFLAGS=$(CFLAGS) /DGX_COLOR_INDEX_TYPE="$(GX_COLOR_INDEX_TYPE)"
!endif
!endif # psi included.
!include $(COMMONDIR)\msvcdefs.mak
!include $(COMMONDIR)\pcdefs.mak
!include $(COMMONDIR)\generic.mak
!include $(GLSRCDIR)\msvccmd.mak
!include $(GLSRCDIR)\lib.mak
!include $(GLSRCDIR)\msvctail.mak
!IF "$(PSICFLAGS)" == "/DPSI_INCLUDED"
# Build the required GS library files. It's simplest always to build
# the floating point emulator, even though we don't always link it in.
# HACK * HACK * HACK - we force this make to occur since we have no
# way to determine if gs .c files are out of date.
FORCE:
$(GENDIR)/ldgs.tr: FORCE
-mkdir $(GLGENDIR)
-mkdir $(GLOBJDIR)
$(MAKE) /F $(GLSRCDIR)\msvc32.mak MSVC_VERSION="$(MSVC_VERSION)" \
GLSRCDIR="$(GLSRCDIR)" DEBUG=$(DEBUG) NOPRIVATE=$(NOPRIVATE) \
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" \
ICCSRCDIR="$(ICCSRCDIR)" IMDISRCDIR="$(IMDISRCDIR)" \
PNGSRCDIR="$(PNGSRCDIR)" \
SHARE_LIBPNG="$(SHARE_LIBPNG)" \
JSRCDIR="$(JSRCDIR)" \
ZSRCDIR="$(ZSRCDIR)" ZGENDIR="$(ZGENDIR)" ZOBJDIR="$(ZOBJDIR)" ZLIB_NAME="$(ZLIB_NAME)" SHARE_ZLIB="$(SHARE_ZLIB)" \
PSSRCDIR=$(PSSRCDIR) PSGENDIR=$(GENDIR) \
PSLIBDIR=$(PSLIBDIR) PSRESDIR=$(PSRESDIR)\
DEVSTUDIO="$(DEVSTUDIO)" \
XCFLAGS="$(XCFLAGS)" \
COMPILE_INITS=$(COMPILE_INITS) PCLXL_ROMFS_ARGS="$(PCLXL_ROMFS_ARGS)" PJL_ROMFS_ARGS="$(PJL_ROMFS_ARGS)" \
UFST_ROOT=$(UFST_ROOT) UFST_BRIDGE=$(UFST_BRIDGE) UFST_LIB_EXT=$(UFST_LIB_EXT) \
UFST_ROMFS_ARGS="$(UFST_ROMFS_ARGS)" \
UFST_CFLAGS="$(UFST_CFLAGS)" \
FEATURE_DEVS="$(FEATURE_DEVS)" DEVICE_DEVS="$(DEVICE_DEVS)" \
BAND_LIST_STORAGE=$(BAND_LIST_STORAGE) BAND_LIST_COMPRESSOR=$(BAND_LIST_COMPRESSOR) \
CPU_TYPE="$(CPU_TYPE)" CONFIG="$(CONFIG)" \
$(GLOBJDIR)\gsargs.$(OBJ) $(GLOBJDIR)\echogs.exe \
$(GLOBJDIR)\ld.tr $(GLOBJDIR)\gconfig.$(OBJ) \
$(GLOBJDIR)\gscdefs.$(OBJ) $(GLOBJDIR)\iconfig.$(OBJ) \
$(GLOBJDIR)\iccinit$(COMPILE_INITS).$(OBJ) $(GLOBJDIR)\gsromfs$(COMPILE_INITS).$(OBJ)
$(CP_) $(GENDIR)\ld.tr $(GENDIR)\ldgs.tr
!ELSE
FORCE:
# Build the required GS library files. It's simplest always to build
# the floating point emulator, even though we don't always link it in.
# HACK * HACK * HACK - we force this make to occur since we have no
# way to determine if gs .c files are out of date.
# We make a dummy gs_init.ps since this is hard coded as a dependency of gsromfs.c
# to avoid having to define everything in the top level makefiles (also of a hack)
$(GENDIR)/ldgs.tr: FORCE
-echo $(PSICFLAGS)
-mkdir $(GLGENDIR)
-mkdir $(GLOBJDIR)
echo > $(GLOBJDIR)/gs_init.ps
$(MAKE) /F $(GLSRCDIR)\msvclib.mak MSVC_VERSION="$(MSVC_VERSION)" \
GLSRCDIR="$(GLSRCDIR)" DEBUG=$(DEBUG) NOPRIVATE=$(NOPRIVATE) \
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" \
ICCSRCDIR="$(ICCSRCDIR)" IMDISRCDIR="$(IMDISRCDIR)" \
PNGSRCDIR="$(PNGSRCDIR)" \
SHARE_LIBPNG="$(SHARE_LIBPNG)" \
JSRCDIR="$(JSRCDIR)" \
ZSRCDIR="$(ZSRCDIR)" ZGENDIR="$(ZGENDIR)" ZOBJDIR="$(ZOBJDIR)" ZLIB_NAME="$(ZLIB_NAME)" SHARE_ZLIB="$(SHARE_ZLIB)" \
PSSRCDIR=$(PSSRCDIR) PSGENDIR=$(GENDIR) \
PSLIBDIR=$(PSLIBDIR) PSRESDIR=$(PSRESDIR)\
DEVSTUDIO="$(DEVSTUDIO)" \
XCFLAGS="$(XCFLAGS)" \
COMPILE_INITS=$(COMPILE_INITS) PCLXL_ROMFS_ARGS="$(PCLXL_ROMFS_ARGS)" PJL_ROMFS_ARGS="$(PJL_ROMFS_ARGS)" \
UFST_ROOT=$(UFST_ROOT) UFST_BRIDGE=$(UFST_BRIDGE) UFST_LIB_EXT=$(UFST_LIB_EXT) \
UFST_ROMFS_ARGS="$(UFST_ROMFS_ARGS)" \
UFST_CFLAGS="$(UFST_CFLAGS)" \
PSD="$(GENDIR)/" \
FEATURE_DEVS="$(FEATURE_DEVS)" DEVICE_DEVS="$(DEVICE_DEVS)" \
BAND_LIST_STORAGE=$(BAND_LIST_STORAGE) BAND_LIST_COMPRESSOR=$(BAND_LIST_COMPRESSOR) \
GLOBJ=$(GLOBJ) GLGEN=$(GLGEN) \
CPU_TYPE="$(CPU_TYPE)" CONFIG="$(CONFIG)" \
$(GLOBJDIR)\gsargs.$(OBJ) $(GLOBJDIR)\echogs.exe \
$(GLOBJDIR)\ld.tr $(GLOBJDIR)\gconfig.$(OBJ) \
$(GLOBJDIR)\gscdefs.$(OBJ) $(GLOBJDIR)\gsromfs$(COMPILE_INITS).$(OBJ)
$(CP_) $(GENDIR)\ld.tr $(GENDIR)\ldgs.tr
!ENDIF
# Build the configuration file.
$(GENDIR)\pconf.h $(GENDIR)\ldconf.tr: $(TARGET_DEVS) $(GLOBJDIR)\genconf$(XE)
$(GLOBJDIR)\genconf -n - $(TARGET_DEVS) -h $(GENDIR)\pconf.h -ol $(GENDIR)\ldconf.tr
!if "$(TDEBUG)" == "1"
$(GENDIR)\lib32.rsp: $(MAKEFILE)
echo /NODEFAULTLIB:LIBC.lib > $(GENDIR)\lib32.rsp
echo /NODEFAULTLIB:LIBCMT.lib >> $(GENDIR)\lib32.rsp
echo LIBCMTD.lib >> $(GENDIR)\lib32.rsp
!else
$(GENDIR)\lib32.rsp: $(MAKEFILE)
echo /NODEFAULTLIB:LIBC.lib > $(GENDIR)\lib32.rsp
echo /NODEFAULTLIB:LIBCMTD.lib >> $(GENDIR)\lib32.rsp
echo LIBCMT.lib >> $(GENDIR)\lib32.rsp
!endif
# Link an MS executable.
$(GENDIR)\ldall.tr: $(MAKEFILE) $(GENDIR)\ldgs.tr $(GENDIR)\ldconf.tr $(GENDIR)\lib32.rsp
echo /SUBSYSTEM:CONSOLE >$(GENDIR)\ldall.tr
$(CP_) $(GENDIR)\ldall.tr+$(GENDIR)\ldgs.tr $(GENDIR)\ldall.tr
echo $(GLOBJDIR)\gsargs.$(OBJ) >>$(GENDIR)\ldall.tr
echo $(GLOBJDIR)\gconfig.$(OBJ) >>$(GENDIR)\ldall.tr
echo $(GLOBJDIR)\gscdefs.$(OBJ) >>$(GENDIR)\ldall.tr
echo $(GLOBJDIR)\gsromfs$(COMPILE_INITS).$(OBJ) >>$(GENDIR)\ldall.tr
$(CP_) $(GENDIR)\ldall.tr+$(GENDIR)\ldconf.tr $(GENDIR)\ldall.tr
# AGFA Workaround to add needed ufst font libraries.
!IF "$(PL_SCALER)" == "ufst"
FONTLIB=$(GENDIR)\fontlib.tr
$(FONTLIB): $(MAKEFILE)
echo $(UFST_LIB)\fco_lib.lib >>$(FONTLIB)
echo $(UFST_LIB)\if_lib.lib >>$(FONTLIB)
echo $(UFST_LIB)\tt_lib.lib >>$(FONTLIB)
$(TARGET_XE)$(XE): $(GENDIR)\ldall.tr $(MAIN_OBJ) $(TOP_OBJ) $(LIBCTR) $(FONTLIB)
$(LINK_SETUP)
$(LINK) $(LCT) /OUT:$(TARGET_XE)$(XE) $(MAIN_OBJ) $(TOP_OBJ) @$(GENDIR)\ldall.tr @$(GENDIR)\lib32.rsp @$(LIBCTR) $(FONTLIB)
!ELSE
$(TARGET_XE)$(XE): $(GENDIR)\ldall.tr $(MAIN_OBJ) $(TOP_OBJ) $(LIBCTR)
$(LINK_SETUP)
$(LINK) $(LCT) /OUT:$(TARGET_XE)$(XE) $(MAIN_OBJ) $(TOP_OBJ) @$(GENDIR)\ldall.tr @$(GENDIR)\lib32.rsp @$(LIBCTR)
!ENDIF
|