source: trunk/makefile @ 703

Last change on this file since 703 was 703, checked in by John Small, 13 years ago
  • Watcom handles macros differently so some of the previous

warpin/makefile code has been broken since the conversion.
So the code was improved and moved to the base makefile to
make it work better.

  • fm2.wis was added as a dependant to the WPI target in the

warpin/makefile file.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1# makefile - build all fm/2 components
2# $Id: makefile 703 2007-06-23 04:32:51Z jbs $
3
4# Copyright (c) 1993-98 M. Kimes
5# Copyright (c) 2002, 2007 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
19# Environment:
20
21# DEBUG 0 = release build, 1 = debug build
22
23BASE = fm3
24
25# FM2_VER defines fm/2 WPI file name suffix
26# e.g. FM2_VER=-3-5-9 results in FM2-3-5-9.wpi being built
27# If FM2_VER is empty, then FM2.wpi is built
28# NOTE: Start the variable with '-'
29
30!ifndef FM2_VER                  # if defined on wmake command, use it
31FM2_VER=-3-6-0                   # default value
32!ifdef %FM2_VER                  # if defined via env. var.
33FM2_VER=$(%FM2_VER)              #     use the env. var.
34!endif
35!endif
36
37# FM2UTILS_VER defines the fm2utils WPI file name suffix.
38# e.g. FM2UTILS_VER=-1-0 results in FM2Utils-1.0.wpi being built
39# If FM2UTILS_VER is empty, then FM2UTILS.wpi is built
40# NOTE: Start the variable with '-'
41
42!ifndef FM2UTILS_VER             # if defined on wmake command, use it
43FM2UTILS_VER=-1-1                # default value
44!ifdef %FM2UTILS_VER             # if defined via env. var.
45FM2UTILS_VER=$(%FM2UTILS_VER)    #     use the env. var.
46!endif
47!endif
48
49# If BUILD_FM2UTILS = 1, build FM2UTILS*.wpi and FM2*.wpi
50# Otherwise build just FM2*.wpi
51
52!ifndef BUILD_FM2UTILS           # if defined on wmake command, use it
53!ifdef %BUILD_FM2UTILS           # else if defined via env. var.
54!ifneq %BUILD_FM2UTILS 1         #     if env. var. is anything but 1
55BUILD_FM2UTILS=0                 #     use a value of 0
56!else
57BUILD_FM2UTILS=1
58!endif
59!else
60BUILD_FM2UTILS=0                 # use default value if not defined via env. or command line
61!endif
62!endif
63
64!include makefile_pre.mk
65
66all: dll $(BASE) allexe .symbolic
67
68dist: all lxlite wpi .symbolic
69
70# Only update resources
71res: .symbolic
72  @echo Updating resources only
73  $(MAKE) $(__MAKEOPTS__) MAKERES=1
74
75# make DLL components
76
77dll: .symbolic
78  cd dll
79  $(MAKE) $(__MAKEOPTS__)
80  cd ..
81
82$(BASE): $(BASE).exe $(BASE).res .symbolic
83
84$(BASE).res: $(BASE).rc  icons\$(BASE).ico bitmaps\*.bmp
85
86$(BASE).obj: $(BASE).c dll\version.h
87
88# make EXE compenents
89
90allexe: *.mak .symbolic
91   @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__)
92
93wpi: .symbolic
94   cd warpin
95   $(MAKE) $(__MAKEOPTS__) FM2_VER=$(FM2_VER) FM2UTILS_VER=$(FM2UTILS_VER) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
96   cd ..
97
98# makefile_post.mk contains lxlite target for $(BASE).exe
99# Apply to each *.mak for other exes
100lxlite:: *.mak .symbolic
101#  !$(MAKE) -f $? $(__MAKEOPTS__) lxlite
102   @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) lxlite
103
104# Apply to dlls
105lxlite:: .symbolic
106  cd dll
107  $(MAKE) $(__MAKEOPTS__) lxlite
108  cd ..
109
110cleanobj: .symbolic
111  cd dll
112  $(MAKE) $(__MAKEOPTS__) cleanobj
113  cd ..
114  -del *.obj
115
116clean:: .symbolic
117  cd dll
118  $(MAKE) $(__MAKEOPTS__) clean
119  cd ..
120  -del *.exe
121  -del *.map
122  -del *.obj
123  -del *.res
124  -del fm3res.str
125
126distclean: clean .symbolic
127  cd warpin
128  $(MAKE) $(__MAKEOPTS__) distclean
129  cd ..
130
131!include makefile_post.mk
132
133# The end
Note: See TracBrowser for help on using the repository browser.