source: trunk/makefile@ 706

Last change on this file since 706 was 703, checked in by John Small, 18 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
RevLine 
[238]1# makefile - build all fm/2 components
[74]2# $Id: makefile 703 2007-06-23 04:32:51Z jbs $
[2]3
[414]4# Copyright (c) 1993-98 M. Kimes
[691]5# Copyright (c) 2002, 2007 Steven H. Levine
[414]6
[147]7# 24 May 05 SHL Add clean and cleanobj target
[211]8# 16 Jun 05 SHL Workaround makeflags wierdness
[238]9# 18 Jul 05 SHL Add bitmap dependencies
10# 20 Jul 05 SHL Add makeres support
[310]11# 16 Apr 06 SHL Add lxlite target
[414]12# 31 Jul 06 SHL Tweak dependencies
[465]13# 26 Aug 06 SHL Add rest of lxlite support
[691]14# 14 Jun 07 SHL Convert to OpenWatcom
[703]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.
[74]18
19# Environment:
20
[703]21# DEBUG 0 = release build, 1 = debug build
[74]22
[15]23BASE = fm3
[2]24
[703]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
[238]64!include makefile_pre.mk
[2]65
[691]66all: dll $(BASE) allexe .symbolic
[589]67
[691]68dist: all lxlite wpi .symbolic
[594]69
[238]70# Only update resources
[691]71res: .symbolic
[238]72 @echo Updating resources only
[691]73 $(MAKE) $(__MAKEOPTS__) MAKERES=1
[238]74
75# make DLL components
76
[691]77dll: .symbolic
[15]78 cd dll
[691]79 $(MAKE) $(__MAKEOPTS__)
[15]80 cd ..
[2]81
[691]82$(BASE): $(BASE).exe $(BASE).res .symbolic
[2]83
[554]84$(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp
[2]85
[554]86$(BASE).obj: $(BASE).c dll\version.h
[2]87
[238]88# make EXE compenents
[2]89
[691]90allexe: *.mak .symbolic
[696]91 @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__)
[238]92
[691]93wpi: .symbolic
[579]94 cd warpin
[703]95 $(MAKE) $(__MAKEOPTS__) FM2_VER=$(FM2_VER) FM2UTILS_VER=$(FM2UTILS_VER) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
[579]96 cd ..
97
[465]98# makefile_post.mk contains lxlite target for $(BASE).exe
99# Apply to each *.mak for other exes
[691]100lxlite:: *.mak .symbolic
[698]101# !$(MAKE) -f $? $(__MAKEOPTS__) lxlite
102 @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) lxlite
[310]103
[465]104# Apply to dlls
[691]105lxlite:: .symbolic
[465]106 cd dll
[691]107 $(MAKE) $(__MAKEOPTS__) lxlite
[465]108 cd ..
109
[691]110cleanobj: .symbolic
[147]111 cd dll
[691]112 $(MAKE) $(__MAKEOPTS__) cleanobj
[147]113 cd ..
114 -del *.obj
115
[691]116clean:: .symbolic
[147]117 cd dll
[691]118 $(MAKE) $(__MAKEOPTS__) clean
[147]119 cd ..
120 -del *.exe
121 -del *.map
122 -del *.obj
123 -del *.res
124 -del fm3res.str
125
[691]126distclean: clean .symbolic
[589]127 cd warpin
[691]128 $(MAKE) $(__MAKEOPTS__) distclean
[589]129 cd ..
130
[238]131!include makefile_post.mk
[15]132
133# The end
Note: See TracBrowser for help on using the repository browser.