[238] | 1 | # makefile - build all fm/2 components
|
---|
[74] | 2 | # $Id: makefile 1474 2009-10-25 23:22:14Z gyoung $
|
---|
[2] | 3 |
|
---|
[414] | 4 | # Copyright (c) 1993-98 M. Kimes
|
---|
[936] | 5 | # Copyright (c) 2002, 2008 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.
|
---|
[720] | 18 | # 04 Jul 07 SHL Pass DEBUG settings to sub-make
|
---|
[936] | 19 | # 21 Jan 08 SHL Add *.lrf to clean target
|
---|
[977] | 20 | # 22 Feb 08 JBS Suppress lxlite processing when DEBUG=1
|
---|
[1133] | 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
|
---|
[1259] | 24 | # 25 Oct 08 SHL Sanitize DEBUG usage
|
---|
[1281] | 25 | # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
|
---|
[1343] | 26 | # 14 Dec 08 SHL Build fm3.sym
|
---|
[1439] | 27 | # 12 Jul 09 GKY Allow FM/2 to load in high memory call exehdr /hi
|
---|
[74] | 28 |
|
---|
[1259] | 29 | # Environment - see makefile_pre.mk and dll\makefile
|
---|
[74] | 30 |
|
---|
[15] | 31 | BASE = fm3
|
---|
[2] | 32 |
|
---|
[723] | 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.
|
---|
[703] | 36 |
|
---|
[723] | 37 | !ifdef FM2_VER # if defined on wmake command, pass it
|
---|
| 38 | WARPIN_OPTS = FM2_VER=$(FM2_VER)
|
---|
[703] | 39 | !endif
|
---|
| 40 |
|
---|
[723] | 41 | !ifdef FM2UTILS_VER # if defined on wmake command, pass it
|
---|
| 42 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
|
---|
[703] | 43 | !endif
|
---|
| 44 |
|
---|
[723] | 45 | !ifdef BUILD_FM2UTILS # if defined on wmake command, pass it
|
---|
| 46 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
|
---|
[703] | 47 | !endif
|
---|
| 48 |
|
---|
[238] | 49 | !include makefile_pre.mk
|
---|
[2] | 50 |
|
---|
[691] | 51 | all: dll $(BASE) allexe .symbolic
|
---|
[589] | 52 |
|
---|
[1343] | 53 | syms: fm3.sym exesyms dllsyms .symbolic
|
---|
[594] | 54 |
|
---|
[1281] | 55 | dist: all syms lxlite wpi .symbolic
|
---|
[983] | 56 |
|
---|
[1474] | 57 | disth: $(BASE) allexe highmem syms lxlite wpi .symbolic
|
---|
| 58 |
|
---|
[238] | 59 | # Only update resources
|
---|
[691] | 60 | res: .symbolic
|
---|
[238] | 61 | @echo Updating resources only
|
---|
[1281] | 62 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
---|
[238] | 63 |
|
---|
| 64 | # make DLL components
|
---|
| 65 |
|
---|
[691] | 66 | dll: .symbolic
|
---|
[15] | 67 | cd dll
|
---|
[1281] | 68 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
---|
[15] | 69 | cd ..
|
---|
[2] | 70 |
|
---|
[983] | 71 | dllsyms: .symbolic
|
---|
| 72 | cd dll
|
---|
[1281] | 73 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
|
---|
[983] | 74 | cd ..
|
---|
| 75 |
|
---|
[691] | 76 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
---|
[2] | 77 |
|
---|
[1133] | 78 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp .autodepend
|
---|
[2] | 79 |
|
---|
[1133] | 80 | $(BASE).obj: $(BASE).c dll\version.h .autodepend
|
---|
[2] | 81 |
|
---|
[1439] | 82 | highmem: .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 |
|
---|
[238] | 91 | # make EXE compenents
|
---|
[2] | 92 |
|
---|
[691] | 93 | allexe: *.mak .symbolic
|
---|
[1281] | 94 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
---|
[238] | 95 |
|
---|
[983] | 96 | # make SYM files
|
---|
| 97 |
|
---|
| 98 | exesyms: *.mak .symbolic
|
---|
[1281] | 99 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
|
---|
[983] | 100 |
|
---|
| 101 | # make WPI files
|
---|
| 102 |
|
---|
[691] | 103 | wpi: .symbolic
|
---|
[1259] | 104 | cd warpin
|
---|
[1281] | 105 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
|
---|
[1259] | 106 | cd ..
|
---|
[579] | 107 |
|
---|
[1133] | 108 | lxlite:: lxlitedll lxliteexe .symbolic
|
---|
| 109 |
|
---|
[465] | 110 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
---|
| 111 | # Apply to each *.mak for other exes
|
---|
[1133] | 112 | lxliteexe: *.mak .symbolic
|
---|
[1259] | 113 | !ifndef DEBUG
|
---|
[1281] | 114 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
---|
[970] | 115 | !endif
|
---|
[310] | 116 |
|
---|
[465] | 117 | # Apply to dlls
|
---|
[1133] | 118 | lxlitedll: .symbolic
|
---|
[1259] | 119 | !ifndef DEBUG
|
---|
[465] | 120 | cd dll
|
---|
[1474] | 121 | $(MAKE) -h lxlite
|
---|
| 122 | # $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
---|
[1259] | 123 | cd ..
|
---|
[970] | 124 | !endif
|
---|
[465] | 125 |
|
---|
[691] | 126 | cleanobj: .symbolic
|
---|
[147] | 127 | cd dll
|
---|
[1281] | 128 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
|
---|
[147] | 129 | cd ..
|
---|
| 130 | -del *.obj
|
---|
| 131 |
|
---|
[691] | 132 | clean:: .symbolic
|
---|
[147] | 133 | cd dll
|
---|
[1281] | 134 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) clean
|
---|
[147] | 135 | cd ..
|
---|
| 136 | -del *.exe
|
---|
[936] | 137 | -del *.lrf
|
---|
[147] | 138 | -del *.map
|
---|
| 139 | -del *.obj
|
---|
| 140 | -del *.res
|
---|
[1054] | 141 | -del *.sym
|
---|
[147] | 142 | -del fm3res.str
|
---|
| 143 |
|
---|
[691] | 144 | distclean: clean .symbolic
|
---|
[589] | 145 | cd warpin
|
---|
[1281] | 146 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
---|
[589] | 147 | cd ..
|
---|
| 148 |
|
---|
[238] | 149 | !include makefile_post.mk
|
---|
[15] | 150 |
|
---|
| 151 | # The end
|
---|