source: trunk/makefile@ 1611

Last change on this file since 1611 was 1597, checked in by Gregg Young, 14 years ago

Added comments for last commit.

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