1 | # makefile - build all fm/2 components
|
---|
2 | # $Id: makefile 1620 2011-08-13 23:08:44Z gyoung $
|
---|
3 |
|
---|
4 | # Copyright (c) 1993-98 M. Kimes
|
---|
5 | # Copyright (c) 2002, 2010 Steven H. Levine
|
---|
6 |
|
---|
7 | # 24 May 05 SHL Add clean and cleanobj target
|
---|
8 | # 16 Jun 05 SHL Workaround makeflags wierdness
|
---|
9 | # 18 Jul 05 SHL Add bitmap dependencies
|
---|
10 | # 20 Jul 05 SHL Add makeres support
|
---|
11 | # 16 Apr 06 SHL Add lxlite target
|
---|
12 | # 31 Jul 06 SHL Tweak dependencies
|
---|
13 | # 26 Aug 06 SHL Add rest of lxlite support
|
---|
14 | # 14 Jun 07 SHL Convert to OpenWatcom
|
---|
15 | # 22 Jun 07 JBS Moved some macro-handling code to this
|
---|
16 | # file from warpin\makefile because of some
|
---|
17 | # differences in how Watcom handles macros.
|
---|
18 | # 04 Jul 07 SHL Pass DEBUG settings to sub-make
|
---|
19 | # 21 Jan 08 SHL Add *.lrf to clean target
|
---|
20 | # 22 Feb 08 JBS Suppress lxlite processing when DEBUG=1
|
---|
21 | # 08 Jul 08 SHL Avoid extra work for wmake -a dist
|
---|
22 | # 22 Jul 08 SHL Change from dll\dllsyms to dll\syms target for consistency
|
---|
23 | # 22 Jul 08 SHL Pass FORTIFY options to subordinate makefiles
|
---|
24 | # 25 Oct 08 SHL Sanitize DEBUG usage
|
---|
25 | # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
|
---|
26 | # 14 Dec 08 SHL Build fm3.sym
|
---|
27 | # 12 Jul 09 GKY Allow FM/2 to load in high memory call exehdr /hi
|
---|
28 | # 13 Apr 10 SHL Drop HIMEM support
|
---|
29 | # 21 Jun 11 GKY Add exceptq .xqs support
|
---|
30 | # 21 Jun 11 GKY Make high memory builds the default (resources only for exes)
|
---|
31 | # 04 Jul 11 GKY Make xqs files an explicit target so they will be rebuild if lost somehow.
|
---|
32 | # 04 Jul 11 GKY Add eFTE backup files (*~) to clean target
|
---|
33 | # 13 Aug 11 GKY Build xqs and sym files as part of dll and all targets
|
---|
34 |
|
---|
35 | # Environment - see makefile_pre.mk and dll\makefile
|
---|
36 |
|
---|
37 | BASE = fm3
|
---|
38 |
|
---|
39 | # Pass values for FM2_VER, FM2UTILS_VER and BUILD_FM2UTILS which
|
---|
40 | # have been set on the command line, if any, on to the
|
---|
41 | # warpin\makefile using the WARPIN_OPTS macro.
|
---|
42 |
|
---|
43 | !ifdef FM2_VER # if defined on wmake command, pass it
|
---|
44 | WARPIN_OPTS = FM2_VER=$(FM2_VER)
|
---|
45 | !endif
|
---|
46 |
|
---|
47 | !ifdef FM2UTILS_VER # if defined on wmake command, pass it
|
---|
48 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
|
---|
49 | !endif
|
---|
50 |
|
---|
51 | !ifdef BUILD_FM2UTILS # if defined on wmake command, pass it
|
---|
52 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
|
---|
53 | !endif
|
---|
54 |
|
---|
55 | !include makefile_pre.mk
|
---|
56 |
|
---|
57 | all: dll $(BASE) allexe fm3.sym fm3.xqs exesyms .symbolic
|
---|
58 |
|
---|
59 | syms: fm3.sym fm3.xqs exesyms dllsyms .symbolic
|
---|
60 |
|
---|
61 | dist: all syms lxlite wpi .symbolic
|
---|
62 |
|
---|
63 | disth: $(BASE) allexe syms lxlite wpi .symbolic
|
---|
64 |
|
---|
65 | # Only update resources
|
---|
66 | res: .symbolic
|
---|
67 | @echo Updating resources only
|
---|
68 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
---|
69 |
|
---|
70 | # make DLL components
|
---|
71 |
|
---|
72 | dll: .symbolic
|
---|
73 | cd dll
|
---|
74 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
---|
75 | cd ..
|
---|
76 |
|
---|
77 | dllsyms: .symbolic
|
---|
78 | cd dll
|
---|
79 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
|
---|
80 | cd ..
|
---|
81 |
|
---|
82 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
---|
83 |
|
---|
84 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp .autodepend
|
---|
85 |
|
---|
86 | $(BASE).obj: $(BASE).c dll\version.h .autodepend
|
---|
87 |
|
---|
88 | # make EXE compenents
|
---|
89 |
|
---|
90 | allexe: *.mak .symbolic
|
---|
91 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
---|
92 |
|
---|
93 | # make SYM files
|
---|
94 |
|
---|
95 | exesyms: *.mak .symbolic
|
---|
96 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
|
---|
97 |
|
---|
98 | # make WPI files
|
---|
99 |
|
---|
100 | wpi: .symbolic
|
---|
101 | cd warpin
|
---|
102 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
|
---|
103 | cd ..
|
---|
104 |
|
---|
105 | lxlite:: lxlitedll lxliteexe .symbolic
|
---|
106 |
|
---|
107 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
---|
108 | # Apply to each *.mak for other exes
|
---|
109 | lxliteexe: *.mak .symbolic
|
---|
110 | !ifndef DEBUG
|
---|
111 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
---|
112 | !endif
|
---|
113 |
|
---|
114 | # Apply to dlls
|
---|
115 | lxlitedll: .symbolic
|
---|
116 | !ifndef DEBUG
|
---|
117 | cd dll
|
---|
118 | $(MAKE) -h lxlite
|
---|
119 | # $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
---|
120 | cd ..
|
---|
121 | !endif
|
---|
122 |
|
---|
123 | cleanobj: .symbolic
|
---|
124 | cd dll
|
---|
125 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
|
---|
126 | cd ..
|
---|
127 | -del *.obj
|
---|
128 |
|
---|
129 | clean:: .symbolic
|
---|
130 | cd dll
|
---|
131 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) clean
|
---|
132 | cd ..
|
---|
133 | -del *.exe
|
---|
134 | -del *.lrf
|
---|
135 | -del *.map
|
---|
136 | -del *.obj
|
---|
137 | -del *.res
|
---|
138 | -del *.sym
|
---|
139 | -del *.xqs
|
---|
140 | -del *~
|
---|
141 |
|
---|
142 | distclean: clean .symbolic
|
---|
143 | cd warpin
|
---|
144 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
---|
145 | cd ..
|
---|
146 |
|
---|
147 | !include makefile_post.mk
|
---|
148 |
|
---|
149 | # The end
|
---|