source: trunk/makefile@ 1194

Last change on this file since 1194 was 1133, checked in by Steven Levine, 17 years ago

Optimize makefiles
Change from dllsyms to syms target for consistency
Avoid extra work for wmake -a dist
Pass FORTIFY options to subordinate makefiles

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