source: trunk/makefile@ 1125

Last change on this file since 1125 was 1054, checked in by Gregg Young, 17 years ago

Add *.sym to files removed by clean; removed mkstr.map & mkstr.sym from debug package since the exe is an internal build tool only.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1# makefile - build all fm/2 components
2# $Id: makefile 1054 2008-07-08 14:32:46Z gyoung $
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
24BASE = 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
31WARPIN_OPTS = FM2_VER=$(FM2_VER)
32!endif
33
34!ifdef FM2UTILS_VER # if defined on wmake command, pass it
35WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
36!endif
37
38!ifdef BUILD_FM2UTILS # if defined on wmake command, pass it
39WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
40!endif
41
42!include makefile_pre.mk
43
44
45all: dll $(BASE) allexe .symbolic
46
47syms: exesyms dllsyms .symbolic
48
49dist: all syms lxlite wpi .symbolic
50
51# Only update resources
52res: .symbolic
53 @echo Updating resources only
54 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
55
56# make DLL components
57
58dll: .symbolic
59 cd dll
60 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT)
61 cd ..
62
63dllsyms: .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
76allexe: *.mak .symbolic
77 @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT)
78
79# make SYM files
80
81exesyms: *.mak .symbolic
82 @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) sym
83
84# make WPI files
85
86wpi: .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
93lxlite:: *.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
103lxlite:: .symbolic
104 cd dll
105!ifdef DEBUG
106! ifeq DEBUG 0
107# $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
108 $(MAKE) $(DEBUG_OPT) lxlite
109! endif
110!else
111# $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
112 $(MAKE) $(DEBUG_OPT) lxlite
113!endif
114 cd ..
115
116cleanobj: .symbolic
117 cd dll
118 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
119 cd ..
120 -del *.obj
121
122clean:: .symbolic
123 cd dll
124 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean
125 cd ..
126 -del *.exe
127 -del *.lrf
128 -del *.map
129 -del *.obj
130 -del *.res
131 -del *.sym
132 -del fm3res.str
133
134distclean: clean .symbolic
135 cd warpin
136 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean
137 cd ..
138
139!include makefile_post.mk
140
141# The end
Note: See TracBrowser for help on using the repository browser.