source: trunk/makefile@ 982

Last change on this file since 982 was 977, checked in by John Small, 18 years ago

Added a comment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1# makefile - build all fm/2 components
2# $Id: makefile 977 2008-02-23 20:11:01Z 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
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
47dist: all lxlite wpi .symbolic
48
49# Only update resources
50res: .symbolic
51 @echo Updating resources only
52 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
53
54# make DLL components
55
56dll: .symbolic
57 cd dll
58 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT)
59 cd ..
60
61$(BASE): $(BASE).exe $(BASE).res .symbolic
62
63$(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp
64
65$(BASE).obj: $(BASE).c dll\version.h
66
67# make EXE compenents
68
69allexe: *.mak .symbolic
70 @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT)
71
72wpi: .symbolic
73 cd warpin
74 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
75 cd ..
76
77# makefile_post.mk contains lxlite target for $(BASE).exe
78# Apply to each *.mak for other exes
79lxlite:: *.mak .symbolic
80!ifdef DEBUG
81! ifeq DEBUG 0
82 @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
83! endif
84!else
85 @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
86!endif
87
88# Apply to dlls
89lxlite:: .symbolic
90 cd dll
91!ifdef DEBUG
92! ifeq DEBUG 0
93 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
94! endif
95!else
96 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
97!endif
98 cd ..
99
100cleanobj: .symbolic
101 cd dll
102 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
103 cd ..
104 -del *.obj
105
106clean:: .symbolic
107 cd dll
108 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean
109 cd ..
110 -del *.exe
111 -del *.lrf
112 -del *.map
113 -del *.obj
114 -del *.res
115 -del fm3res.str
116
117distclean: clean .symbolic
118 cd warpin
119 $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean
120 cd ..
121
122!include makefile_post.mk
123
124# The end
Note: See TracBrowser for help on using the repository browser.