1 | # makefile - build all fm/2 components
|
---|
2 | # $Id: makefile 983 2008-02-26 02:51:21Z jbs $
|
---|
3 |
|
---|
4 | # Copyright (c) 1993-98 M. Kimes
|
---|
5 | # Copyright (c) 2002, 2008 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 |
|
---|
22 | # Environment - see makefile_pre.mk
|
---|
23 |
|
---|
24 | BASE = fm3
|
---|
25 |
|
---|
26 | # Pass values for FM2_VER, FM2UTILS_VER and BUILD_FM2UTILS which
|
---|
27 | # have been set on the command line, if any, on to the
|
---|
28 | # warpin\makefile using the WARPIN_OPTS macro.
|
---|
29 |
|
---|
30 | !ifdef FM2_VER # if defined on wmake command, pass it
|
---|
31 | WARPIN_OPTS = FM2_VER=$(FM2_VER)
|
---|
32 | !endif
|
---|
33 |
|
---|
34 | !ifdef FM2UTILS_VER # if defined on wmake command, pass it
|
---|
35 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
|
---|
36 | !endif
|
---|
37 |
|
---|
38 | !ifdef BUILD_FM2UTILS # if defined on wmake command, pass it
|
---|
39 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
|
---|
40 | !endif
|
---|
41 |
|
---|
42 | !include makefile_pre.mk
|
---|
43 |
|
---|
44 |
|
---|
45 | all: dll $(BASE) allexe .symbolic
|
---|
46 |
|
---|
47 | syms: exesyms dllsyms .symbolic
|
---|
48 |
|
---|
49 | dist: all syms lxlite wpi .symbolic
|
---|
50 |
|
---|
51 | # Only update resources
|
---|
52 | res: .symbolic
|
---|
53 | @echo Updating resources only
|
---|
54 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
---|
55 |
|
---|
56 | # make DLL components
|
---|
57 |
|
---|
58 | dll: .symbolic
|
---|
59 | cd dll
|
---|
60 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT)
|
---|
61 | cd ..
|
---|
62 |
|
---|
63 | dllsyms: .symbolic
|
---|
64 | cd dll
|
---|
65 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) dllsyms
|
---|
66 | cd ..
|
---|
67 |
|
---|
68 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
---|
69 |
|
---|
70 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp
|
---|
71 |
|
---|
72 | $(BASE).obj: $(BASE).c dll\version.h
|
---|
73 |
|
---|
74 | # make EXE compenents
|
---|
75 |
|
---|
76 | allexe: *.mak .symbolic
|
---|
77 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT)
|
---|
78 |
|
---|
79 | # make SYM files
|
---|
80 |
|
---|
81 | exesyms: *.mak .symbolic
|
---|
82 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) sym
|
---|
83 |
|
---|
84 | # make WPI files
|
---|
85 |
|
---|
86 | wpi: .symbolic
|
---|
87 | cd warpin
|
---|
88 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
|
---|
89 | cd ..
|
---|
90 |
|
---|
91 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
---|
92 | # Apply to each *.mak for other exes
|
---|
93 | lxlite:: *.mak .symbolic
|
---|
94 | !ifdef DEBUG
|
---|
95 | ! ifeq DEBUG 0
|
---|
96 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
---|
97 | ! endif
|
---|
98 | !else
|
---|
99 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
---|
100 | !endif
|
---|
101 |
|
---|
102 | # Apply to dlls
|
---|
103 | lxlite:: .symbolic
|
---|
104 | cd dll
|
---|
105 | !ifdef DEBUG
|
---|
106 | ! ifeq DEBUG 0
|
---|
107 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
---|
108 | ! endif
|
---|
109 | !else
|
---|
110 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
---|
111 | !endif
|
---|
112 | cd ..
|
---|
113 |
|
---|
114 | cleanobj: .symbolic
|
---|
115 | cd dll
|
---|
116 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
|
---|
117 | cd ..
|
---|
118 | -del *.obj
|
---|
119 |
|
---|
120 | clean:: .symbolic
|
---|
121 | cd dll
|
---|
122 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean
|
---|
123 | cd ..
|
---|
124 | -del *.exe
|
---|
125 | -del *.lrf
|
---|
126 | -del *.map
|
---|
127 | -del *.obj
|
---|
128 | -del *.res
|
---|
129 | -del fm3res.str
|
---|
130 |
|
---|
131 | distclean: clean .symbolic
|
---|
132 | cd warpin
|
---|
133 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
---|
134 | cd ..
|
---|
135 |
|
---|
136 | !include makefile_post.mk
|
---|
137 |
|
---|
138 | # The end
|
---|