[238] | 1 | # makefile - build all fm/2 components
|
---|
[74] | 2 | # $Id: makefile 1516 2010-04-17 09:46:11Z jbs $
|
---|
[2] | 3 |
|
---|
[414] | 4 | # Copyright (c) 1993-98 M. Kimes
|
---|
[1514] | 5 | # Copyright (c) 2002, 2010 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
|
---|
[1514] | 28 | # 13 Apr 10 SHL Drop HIMEM support
|
---|
[74] | 29 |
|
---|
[1259] | 30 | # Environment - see makefile_pre.mk and dll\makefile
|
---|
[74] | 31 |
|
---|
[15] | 32 | BASE = fm3
|
---|
[2] | 33 |
|
---|
[723] | 34 | # Pass values for FM2_VER, FM2UTILS_VER and BUILD_FM2UTILS which
|
---|
| 35 | # have been set on the command line, if any, on to the
|
---|
| 36 | # warpin\makefile using the WARPIN_OPTS macro.
|
---|
[703] | 37 |
|
---|
[723] | 38 | !ifdef FM2_VER # if defined on wmake command, pass it
|
---|
| 39 | WARPIN_OPTS = FM2_VER=$(FM2_VER)
|
---|
[703] | 40 | !endif
|
---|
| 41 |
|
---|
[723] | 42 | !ifdef FM2UTILS_VER # if defined on wmake command, pass it
|
---|
| 43 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
|
---|
[703] | 44 | !endif
|
---|
| 45 |
|
---|
[723] | 46 | !ifdef BUILD_FM2UTILS # if defined on wmake command, pass it
|
---|
| 47 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
|
---|
[703] | 48 | !endif
|
---|
| 49 |
|
---|
[238] | 50 | !include makefile_pre.mk
|
---|
[2] | 51 |
|
---|
[691] | 52 | all: dll $(BASE) allexe .symbolic
|
---|
[589] | 53 |
|
---|
[1343] | 54 | syms: fm3.sym exesyms dllsyms .symbolic
|
---|
[594] | 55 |
|
---|
[1281] | 56 | dist: all syms lxlite wpi .symbolic
|
---|
[983] | 57 |
|
---|
[1514] | 58 | disth: $(BASE) allexe syms lxlite wpi .symbolic
|
---|
[1474] | 59 |
|
---|
[238] | 60 | # Only update resources
|
---|
[691] | 61 | res: .symbolic
|
---|
[238] | 62 | @echo Updating resources only
|
---|
[1281] | 63 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
---|
[238] | 64 |
|
---|
| 65 | # make DLL components
|
---|
| 66 |
|
---|
[691] | 67 | dll: .symbolic
|
---|
[15] | 68 | cd dll
|
---|
[1281] | 69 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
---|
[15] | 70 | cd ..
|
---|
[2] | 71 |
|
---|
[983] | 72 | dllsyms: .symbolic
|
---|
| 73 | cd dll
|
---|
[1281] | 74 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
|
---|
[983] | 75 | cd ..
|
---|
| 76 |
|
---|
[691] | 77 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
---|
[2] | 78 |
|
---|
[1133] | 79 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp .autodepend
|
---|
[2] | 80 |
|
---|
[1133] | 81 | $(BASE).obj: $(BASE).c dll\version.h .autodepend
|
---|
[2] | 82 |
|
---|
[238] | 83 | # make EXE compenents
|
---|
[2] | 84 |
|
---|
[691] | 85 | allexe: *.mak .symbolic
|
---|
[1281] | 86 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
---|
[238] | 87 |
|
---|
[983] | 88 | # make SYM files
|
---|
| 89 |
|
---|
| 90 | exesyms: *.mak .symbolic
|
---|
[1281] | 91 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
|
---|
[983] | 92 |
|
---|
| 93 | # make WPI files
|
---|
| 94 |
|
---|
[691] | 95 | wpi: .symbolic
|
---|
[1259] | 96 | cd warpin
|
---|
[1281] | 97 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
|
---|
[1259] | 98 | cd ..
|
---|
[579] | 99 |
|
---|
[1133] | 100 | lxlite:: lxlitedll lxliteexe .symbolic
|
---|
| 101 |
|
---|
[465] | 102 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
---|
| 103 | # Apply to each *.mak for other exes
|
---|
[1133] | 104 | lxliteexe: *.mak .symbolic
|
---|
[1259] | 105 | !ifndef DEBUG
|
---|
[1281] | 106 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
---|
[970] | 107 | !endif
|
---|
[310] | 108 |
|
---|
[465] | 109 | # Apply to dlls
|
---|
[1133] | 110 | lxlitedll: .symbolic
|
---|
[1259] | 111 | !ifndef DEBUG
|
---|
[465] | 112 | cd dll
|
---|
[1474] | 113 | $(MAKE) -h lxlite
|
---|
| 114 | # $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
---|
[1259] | 115 | cd ..
|
---|
[970] | 116 | !endif
|
---|
[465] | 117 |
|
---|
[691] | 118 | cleanobj: .symbolic
|
---|
[147] | 119 | cd dll
|
---|
[1281] | 120 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
|
---|
[147] | 121 | cd ..
|
---|
| 122 | -del *.obj
|
---|
| 123 |
|
---|
[691] | 124 | clean:: .symbolic
|
---|
[147] | 125 | cd dll
|
---|
[1281] | 126 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) clean
|
---|
[147] | 127 | cd ..
|
---|
| 128 | -del *.exe
|
---|
[936] | 129 | -del *.lrf
|
---|
[147] | 130 | -del *.map
|
---|
| 131 | -del *.obj
|
---|
| 132 | -del *.res
|
---|
[1054] | 133 | -del *.sym
|
---|
[147] | 134 |
|
---|
[691] | 135 | distclean: clean .symbolic
|
---|
[589] | 136 | cd warpin
|
---|
[1281] | 137 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
---|
[589] | 138 | cd ..
|
---|
| 139 |
|
---|
[238] | 140 | !include makefile_post.mk
|
---|
[15] | 141 |
|
---|
| 142 | # The end
|
---|