source: trunk/makefile@ 1505

Last change on this file since 1505 was 1474, checked in by Gregg Young, 16 years ago

Add disth target for building HIMEM release packages

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