1 | #
|
---|
2 | # setup.in:
|
---|
3 | # this is included from all makefiles in the subdirectories
|
---|
4 | # (via the NMAKE !INCLUDE directive) to set up variables
|
---|
5 | # common to all makefiles.
|
---|
6 | #
|
---|
7 |
|
---|
8 | # set up PROJECT_BASE_DIR, which is required by other
|
---|
9 | # makefiles (and most importantly by xwphelpers)
|
---|
10 | PROJECT_BASE_DIR = $(CVS_WORK_ROOT)\$(WPIDIR)
|
---|
11 | # this should give us something like K:\cvs\xworkplace
|
---|
12 |
|
---|
13 |
|
---|
14 | # OUTPUT DIRECTORIES
|
---|
15 | # ------------------
|
---|
16 |
|
---|
17 | # Unless you have specified an explicit path in
|
---|
18 | # XWP_OUTPUT_ROOT from the environment, this
|
---|
19 | # defaults to the bin\ subdir.
|
---|
20 |
|
---|
21 | !ifndef WPI_OUTPUT_ROOT
|
---|
22 | WPI_OUTPUT_ROOT = $(PROJECT_BASE_DIR)\bin
|
---|
23 | !endif
|
---|
24 |
|
---|
25 | PROJECT_OUTPUT_DIR = $(WPI_OUTPUT_ROOT)
|
---|
26 |
|
---|
27 | MODULESDIR = $(PROJECT_BASE_DIR)
|
---|
28 |
|
---|
29 | # import library: all executables will be linked against
|
---|
30 | # this one... this is contained in all the object lists below
|
---|
31 | HELPERSLIB=\
|
---|
32 | !ifndef EMX
|
---|
33 | # for VAC: use import library for WarpIN runtime DLL (dynamic linking)
|
---|
34 | $(WPI_OUTPUT_ROOT)\wpirtli.lib
|
---|
35 | !else
|
---|
36 | # for EMX: do static linking...
|
---|
37 | $(WPI_OUTPUT_ROOT)\subsys\libbz2.lib \
|
---|
38 | $(WPI_OUTPUT_ROOT)\exe_st\wiarchive.lib \
|
---|
39 | $(WPI_OUTPUT_ROOT)\helpers\helpers.lib
|
---|
40 | !endif
|
---|
41 |
|
---|
42 | # more directory definitions
|
---|
43 | MAPDIR = $(PROJECT_OUTPUT_DIR)\map
|
---|
44 | HELPERS_OUTPUT_DIR_MT = $(PROJECT_OUTPUT_DIR)\helpers
|
---|
45 | HELPERS_OUTPUT_DIR_ST = $(PROJECT_OUTPUT_DIR)\subsys
|
---|
46 |
|
---|
47 | !ifndef WPI_RELEASE
|
---|
48 | WPI_RELEASE = $(PROJECT_BASE_DIR)\release
|
---|
49 | !endif
|
---|
50 |
|
---|
51 | # HELPERS DIRECTORIES
|
---|
52 | # -------------------
|
---|
53 |
|
---|
54 | # XWorkplace uses lots of generic OS/2 helpers code, which
|
---|
55 | # I have developed over time. Since this code is shared with
|
---|
56 | # WarpIN and other projects might want to use it too, this
|
---|
57 | # has been extracted to a separate CVS archive. We assume
|
---|
58 | # it's in the CVS tree also, so we derive this from $(CVS_WORK_ROOT).
|
---|
59 |
|
---|
60 | !ifndef HELPERS_BASE_DIR
|
---|
61 | HELPERS_BASE_DIR=$(CVS_WORK_ROOT)\$(XWPHELPERSDIR)
|
---|
62 | !endif
|
---|
63 |
|
---|
64 | MAKE_INCLUDE_DIR = $(HELPERS_BASE_DIR)\make
|
---|
65 |
|
---|
66 | HELPERS_OUTPUT_DIR=$(PROJECT_OUTPUT_DIR)
|
---|
67 |
|
---|
68 | HELPERS_DLL_DEF=$(PROJECT_BASE_DIR)\src\frontend\wpirtl.def
|
---|
69 |
|
---|
70 | HELPERS_DLL_NAME=wpirtl
|
---|
71 |
|
---|
72 | # file stem of the WarpIN runtime DLL
|
---|
73 | RTL_DLL_NAME=wpirtl
|
---|
74 |
|
---|
75 |
|
---|
76 | # COMPILER TO USE
|
---|
77 | # ---------------
|
---|
78 |
|
---|
79 | # It should be possible to use either EMX/GCC or IBM VAC++ 3.0
|
---|
80 | # to compile WarpIN. If the following is uncommented, EMX is
|
---|
81 | # used (and the rest of this file reacts accordingly);
|
---|
82 | # otherwise IBM VAC++ 3.0 will be assumed.
|
---|
83 |
|
---|
84 | # WARNING (UM 99-10-23): if you change this flag, you need to
|
---|
85 | # delete the "bin" directory to enforce a complete rebuild,
|
---|
86 | # because the makefiles don't react to changes of "setup.in".
|
---|
87 |
|
---|
88 | # EMX = YOO-HAH
|
---|
89 | # changed from YEP (UM 99-12-23)
|
---|
90 |
|
---|
91 |
|
---|
92 | # WPI_DEBUG CODE
|
---|
93 | # --------------
|
---|
94 |
|
---|
95 | # If WPI_DEBUG is defined (set to anything), we will produce debug
|
---|
96 | # code. Otherwise, release code is produced.
|
---|
97 | # Also, if WPI_DEBUG is defined, __DEBUG__ is #define'd by the
|
---|
98 | # makefiles thru the compiler command lines, to which the code
|
---|
99 | # files will react. Most importantly, this will include PmPrintf
|
---|
100 | # debugging code (doesn't work with EMX).
|
---|
101 | #
|
---|
102 | # Note: The makefiles won't recompile everything if this file
|
---|
103 | # is changed, so you best delete the bin\ directory after
|
---|
104 | # changing this.
|
---|
105 |
|
---|
106 | # WPI_DEBUG=YES
|
---|
107 |
|
---|
108 |
|
---|
109 | # DOCUMENTATION
|
---|
110 | # -------------
|
---|
111 |
|
---|
112 | # If the following is uncommented, the makefiles will
|
---|
113 | # automatically build the INF user guides. However, this
|
---|
114 | # requires that you have IBM's IPFC.EXE on your PATH,
|
---|
115 | # otherwise the makefiles will fail.
|
---|
116 |
|
---|
117 | BUILD_DOCS=YES
|
---|
118 |
|
---|
119 |
|
---|
120 | # INCLUDES
|
---|
121 | # --------
|
---|
122 |
|
---|
123 | # Extend the include path for the compiler.
|
---|
124 | # This is only used from the subdirectories of SRC,
|
---|
125 | # so the relative paths are relative to the respective
|
---|
126 | # subdirectories (e.g. src\main).
|
---|
127 | # For IBM VAC++ 3.0, we also require an additional Standard
|
---|
128 | # Template Library (STL) header directory.
|
---|
129 | # EMX has the STL included, so we just skip it if EMX is used.
|
---|
130 |
|
---|
131 | !ifdef EMX
|
---|
132 | PROJECT_INCLUDE=-I $(PROJECT_BASE_DIR)\include -I $(HELPERS_BASE_DIR)\include -I $(ACPITKBASE)\h
|
---|
133 | !else
|
---|
134 | PROJECT_INCLUDE = $(TKBASE)\h;$(VACBASE)\include;$(PROJECT_BASE_DIR)\include;$(HELPERS_BASE_DIR)\include;$(ACPITKBASE)\h
|
---|
135 | !endif
|
---|
136 |
|
---|
137 | RC_INCLUDE = -i . -i $(TKBASE)\h -i $(PROJECT_BASE_DIR)\include
|
---|
138 |
|
---|
139 |
|
---|
140 | # TOOLS SETUP
|
---|
141 | # -----------
|
---|
142 |
|
---|
143 | RUN_FASTDEP = $(HELPERS_BASE_DIR)\fastdep.exe -i .;$(PROJECT_INCLUDE) -o $(OUTPUTDIR)
|
---|
144 |
|
---|
145 | RUN_BLDLEVEL = $(PROJECT_BASE_DIR)\BuildLevel.cmd
|
---|
146 |
|
---|
147 | RUN_UNLOCK = $(CVS_WORK_ROOT)\$(XWPDIR)\tools\unlock.exe
|
---|
148 |
|
---|
149 | RUN_STRRPL = $(CVS_WORK_ROOT)\$(XWPDIR)\tools\strrpl.exe
|
---|
150 |
|
---|
151 | COPY = copy
|
---|
152 |
|
---|
153 |
|
---|
154 | # PRECOMPILED HEADERS
|
---|
155 | # -------------------
|
---|
156 |
|
---|
157 | # The following is the directory for precompiled header files.
|
---|
158 | # This is a feature of VAC++ 3.0 to speed up compilation. If
|
---|
159 | # the PRECH variable is not defined, precompiled header files
|
---|
160 | # will not be used. I strongly recommend using a RAM disk for
|
---|
161 | # this (as for TEMP files in general).
|
---|
162 | #
|
---|
163 | # On my system, I use RAMFS.IFS for the RAM disk, which is much
|
---|
164 | # more reliable than OS/2's VDISK.SYS.
|
---|
165 | # TEMP is globally set to "R:\temp", which I create at each bootup
|
---|
166 | # from CONFIG.SYS. VAC++ has some problems when specifying a
|
---|
167 | # root directory (e.g. "R:\") as a temp directory.
|
---|
168 | #
|
---|
169 | # Note that we create a _separate_ precompiled header file for each
|
---|
170 | # source file (in the $(PRECH) directory). This eats up a lot
|
---|
171 | # of disk space (I have about 46 MB after a complete WarpIN build),
|
---|
172 | # but makes sure that the precompiled header does not get recreated
|
---|
173 | # for each source file.
|
---|
174 | #
|
---|
175 | # So be warned: if you have TEMP on a RAM disk, this better be
|
---|
176 | # able to hold more than 50 MBs.
|
---|
177 | #
|
---|
178 | # If you don't like this, comment out the following line, which
|
---|
179 | # will automatically disable precompilation completely.
|
---|
180 | # That'll be slower though.
|
---|
181 | #
|
---|
182 | # This should NOT be enabled if EMX compiling is on
|
---|
183 |
|
---|
184 | !ifndef EMX
|
---|
185 | PRECH=$(TEMP)
|
---|
186 | !endif
|
---|
187 |
|
---|
188 |
|
---|
189 | # COMPILER OPTIONS
|
---|
190 | # ----------------
|
---|
191 |
|
---|
192 | # Compiler macro. This is used for each .OBJ file to be created.
|
---|
193 | # If the WPI_DEBUG environment variable was set to anything, we'll
|
---|
194 | # produce debug code.
|
---|
195 | # Note: We define "CC" for compiling C++ files (using /tdp),
|
---|
196 | # and "CC_C" for compiling plain C files, which is needed
|
---|
197 | # for the compression library (libbz2).
|
---|
198 |
|
---|
199 | #
|
---|
200 | # ----> VAC++ 3.0 compiler setup
|
---|
201 | #
|
---|
202 | CC_WARNINGS=/w2
|
---|
203 | # /Wcls- /Wcmp- /Wcnd- /Wcns+ /Wcpy+ /Wgen- /Wini- /Wobs- /Word- /Wpro- /Wrea- /Wret- /Wund- /Wuni- /Wuse-
|
---|
204 | # "Some" ;-) VisualAge C++ compiler options explained:
|
---|
205 | # /Wcls: class problems
|
---|
206 | # /Wcnd: conditional exprs problems (= / == etc.)
|
---|
207 | # /Wcmp: possible unsigned comparison redundancies
|
---|
208 | # /Wcns: operations involving constants
|
---|
209 | # /Wcnv: conversions
|
---|
210 | # /Wcpy: copy constructor problems
|
---|
211 | # /Weff: statements with no effect (annoying)
|
---|
212 | # /Wgen: generic debugging msgs
|
---|
213 | # /Wobs: obsolete features
|
---|
214 | # /Word: unspecified evaluation order
|
---|
215 | # /Wpar: list non-referenced parameters (annoying)
|
---|
216 | # /Wppc: list possible preprocessor problems (.h dependencies)
|
---|
217 | # /Wpro: warn if funcs have not been prototyped
|
---|
218 | # /Wrea: mark code that cannot be reached
|
---|
219 | # /Wret: check consistency of return levels
|
---|
220 | # /Wuni: uninitialized variables
|
---|
221 | # /Wuse: unused variables
|
---|
222 | # /w2: produce error and warning messages, but no infos
|
---|
223 | # !if [echo PROJECT_INCLUDE is $(PROJECT_INCLUDE)]
|
---|
224 | # !endif
|
---|
225 | CC_BASE=/c /gi+ /q+ /se /ss /gd- /ol- /ft$(PROJECT_OUTPUT_DIR) /I$(PROJECT_INCLUDE)
|
---|
226 | # V0.9.9 (2001-01-29) [umoeller]: added /g5
|
---|
227 | # /c: compile only, no link (we'll call the linker explicitly)
|
---|
228 | # /fi+: precompile header files
|
---|
229 | # /ft+: template resolution files
|
---|
230 | # /g3|4|5: optimize for 386/486/Pentium
|
---|
231 | # /gd-: link runtime statically
|
---|
232 | # /ge-: create DLL code
|
---|
233 | # /gi+: fast integer execution
|
---|
234 | # /Gl+: remove unreferenced functions (when comp.+link in 1 step)
|
---|
235 | # /Gx+: remove C++ exception handling information
|
---|
236 | # /gm+: multithread libraries
|
---|
237 | # /kc+: produce preprocessor warnings
|
---|
238 | # /o+: optimization (inlining etc.)
|
---|
239 | # /oi-: no inlining (?)
|
---|
240 | # /ol+: use intermediate linker; do _not_ use with debug code
|
---|
241 | # /q+: suppress icc logo
|
---|
242 | # /re : don't use subsystem libraries (!= Rn)
|
---|
243 | # /se: all language extensions
|
---|
244 | # /si+: allow use of precompiled header files
|
---|
245 | # /ss: allow double slashes comments in C too
|
---|
246 | # /ti+: debug code
|
---|
247 | # /tdp: compile everything as C++, even if it has a .C suffix
|
---|
248 | # /tm: use debug memory management (malloc etc.)
|
---|
249 | # /tn: add source line numbers to object files (for mapfile)
|
---|
250 | CC_SHARED=$(CC_BASE) $(CC_WARNINGS)
|
---|
251 | !ifdef WPI_DEBUG
|
---|
252 | # debug code
|
---|
253 | DEBUG_MEM =
|
---|
254 | !ifdef KLIB_LIBS
|
---|
255 | DEBUG_MEM = /D__KLIB_LIBS__
|
---|
256 | !endif
|
---|
257 | # /tm+
|
---|
258 | CC_C=icc $(CC_SHARED) /o- $(DEBUG_MEM) /tn+ /ti+ /D__DEBUG__ /gm+
|
---|
259 | # single-thread: without /gm+
|
---|
260 | CC_ST_TEMP=icc $(CC_SHARED) /o- $(DEBUG_MEM) /tn+ /ti+ /D__DEBUG__
|
---|
261 |
|
---|
262 | CC_SUBSYS=$(CC_ST)
|
---|
263 | #
|
---|
264 | !else
|
---|
265 |
|
---|
266 | !ifdef WPI_DEBUG_SYM
|
---|
267 | # no pmprintf debug code:
|
---|
268 | # V1.0.15 (2007-03-19) [shl]
|
---|
269 | CC_C=icc $(CC_SHARED) /o- /tn+ /gm+ /g5 /ti+
|
---|
270 | CC_ST_TEMP=icc $(CC_SHARED) /o+ /oi- /oc+ /tn+ /gm- /ti+
|
---|
271 | CC_SUBSYS=$(CC_ST) /rn /Gx+ /ti+
|
---|
272 | !else
|
---|
273 | # no debug code:
|
---|
274 | # V1.0.7 (2005-05-15) disabled optimizer because of weird crashes in bs_config.cpp
|
---|
275 | CC_C=icc $(CC_SHARED) /o- /tn+ /gm+ /g5
|
---|
276 | # V0.9.7 (2000-12-10) [umoeller]: added /tn+, or we won't get line numbers
|
---|
277 | # in the map files for the release version...
|
---|
278 | CC_ST_TEMP=icc $(CC_SHARED) /o+ /oi- /oc+ /tn+ /gm-
|
---|
279 | # /gu+
|
---|
280 | CC_SUBSYS=$(CC_ST) /rn /Gx+
|
---|
281 | !endif
|
---|
282 |
|
---|
283 | !endif
|
---|
284 | # WPI_DEBUG
|
---|
285 |
|
---|
286 | CC_ST = $(CC_ST_TEMP) /g5
|
---|
287 | CC_TINY=$(CC_ST_TEMP) /rn /g3 /gx+ /gs- /os- /DBUILDING_STUB_CODE
|
---|
288 | CC_MT = $(CC_C)
|
---|
289 |
|
---|
290 | # compiler options for helpers;
|
---|
291 | # this is necessary because the helpers will also be used for XWorkplace
|
---|
292 | !ifndef EMX
|
---|
293 | CC_HELPERS=$(CC_MT) /ge-
|
---|
294 | !else
|
---|
295 | CC_HELPERS=$(CC_MT)
|
---|
296 | !endif
|
---|
297 |
|
---|
298 | # compiler options for without memory debugging:
|
---|
299 | CC_NODEBUG=$(CC_MT)
|
---|
300 | !ifndef EMX
|
---|
301 | !ifdef WPI_DEBUG
|
---|
302 | CC_NODEBUG=icc $(CC_COMMON) /ti+ $(CC_WARNINGS) /D__DEBUG__
|
---|
303 | # only used with EMX and xdoc presently... ### remove this!!
|
---|
304 | !endif
|
---|
305 | !endif
|
---|
306 |
|
---|
307 | # LINK OPTIONS
|
---|
308 | # ------------
|
---|
309 |
|
---|
310 | # Link macro. This is used for final linking.
|
---|
311 | # If we're supposed to do the release version, we'll turn
|
---|
312 | # off debugging and optimize and pack the resulting files.
|
---|
313 |
|
---|
314 | !ifdef EMX
|
---|
315 | #
|
---|
316 | # --> EMX linker
|
---|
317 | #
|
---|
318 | LINK=gcc -Zomf -lstdcpp -Zstack 65536 -Zmtd
|
---|
319 | # LINK=emxomfld -lstdcpp -los2 -LJ:\emx\lib -Zmtd
|
---|
320 | !ifndef WPI_DEBUG
|
---|
321 | LINK=$(LINK) -s
|
---|
322 | !endif
|
---|
323 | #
|
---|
324 | # EMX linker options:
|
---|
325 | # -Zomf invoke LINK386 (must use -Zomf with compiler also)
|
---|
326 | # -l.... link with .... library (from LIBRARY_PATH)
|
---|
327 | # -Zstack stack size
|
---|
328 | # -s strip (don't use) debug code from object files
|
---|
329 | # -Zmtd multithread libraries
|
---|
330 | !else
|
---|
331 | #
|
---|
332 | # --> VAC++ 3.0 linker
|
---|
333 | #
|
---|
334 | LIBDIRS = $(TKBASE)\lib\ "$(VACBASE)\lib\"
|
---|
335 | !ifndef WARPIN_LINKER
|
---|
336 | WARPIN_LINKER = ilink
|
---|
337 | !endif
|
---|
338 |
|
---|
339 | !ifdef WPI_DEBUG
|
---|
340 | LINK = $(WARPIN_LINKER) /nologo /noi /debug /map:$(PROJECT_OUTPUT_DIR)\map\$(@B).map /linenumbers $(LIBDIRS)
|
---|
341 | !else
|
---|
342 | # V1.0.15 (2007-03-19) [shl]
|
---|
343 | !ifdef WPI_DEBUG_SYM
|
---|
344 | LINK = $(WARPIN_LINKER) /nologo /noi /debug /optfunc /map:$(PROJECT_OUTPUT_DIR)\map\$(@B).map /exepack:2 /packcode /packdata /linenumbers $(LIBDIRS)
|
---|
345 | !else
|
---|
346 | LINK = $(WARPIN_LINKER) /nologo /noi /nodebug /optfunc /map:$(PROJECT_OUTPUT_DIR)\map\$(@B).map /exepack:2 /packcode /packdata /linenumbers $(LIBDIRS)
|
---|
347 | !endif
|
---|
348 | !endif
|
---|
349 |
|
---|
350 | !endif
|
---|
351 |
|
---|
352 | LINK_EXE = $(LINK) /base:0x00010000
|
---|
353 |
|
---|
354 | # Some LINK386 cmd line options
|
---|
355 | # (Visual Age ILINK understands these too if /nofree is specified):
|
---|
356 | # /align: executable pages align factor (in bytes)
|
---|
357 | # /noe: no extended dictionary. Required for replacing _DLL_InitTerm.
|
---|
358 | # Can slightly increase executable's size.
|
---|
359 | # /noi: no ignore case (necc. for C)
|
---|
360 | # /map: list public symbols (create MAP file); we always need this,
|
---|
361 | # because we produce a .SYM file later.
|
---|
362 | # /linenumbers: include linenumbers in MAP file
|
---|
363 | # /nod: no default library search (explicitly specify libs)
|
---|
364 | # /nol: no logo (link386 startup)
|
---|
365 | # /packcode: group neighboring code segments (enabled per default)
|
---|
366 | # /packdata: group neighboring data segments (disabled per default)
|
---|
367 | # /debug: include debug code
|
---|
368 | # /optfunc: optimize code arrangement (takes some extra time)
|
---|
369 | # /exepack:2 use Warp 3 executable compression
|
---|
370 |
|
---|
371 |
|
---|
372 | # RESOURCE COMPILER
|
---|
373 | # -----------------
|
---|
374 |
|
---|
375 | # changed (UM 99-12-23)
|
---|
376 |
|
---|
377 | RC = rc -n -p -x2 $(RC_INCLUDE)
|
---|
378 |
|
---|
379 | RC_NOPACK=rc -n -p $(RC_INCLUDE)
|
---|
380 |
|
---|
381 |
|
---|