| [238] | 1 | # makefile - build all fm/2 components
|
|---|
| [74] | 2 | # $Id: makefile 1897 2022-08-14 19:14:53Z gyoung $
|
|---|
| [2] | 3 |
|
|---|
| [414] | 4 | # Copyright (c) 1993-98 M. Kimes
|
|---|
| [1890] | 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
|
|---|
| [1576] | 29 | # 21 Jun 11 GKY Add exceptq .xqs support
|
|---|
| 30 | # 21 Jun 11 GKY Make high memory builds the default (resources only for exes)
|
|---|
| [1597] | 31 | # 04 Jul 11 GKY Make xqs files an explicit target so they will be rebuild if lost somehow.
|
|---|
| 32 | # 04 Jul 11 GKY Add eFTE backup files (*~) to clean target
|
|---|
| [1620] | 33 | # 13 Aug 11 GKY Build xqs and sym files as part of dll and all targets
|
|---|
| [1890] | 34 | # 25 Jan 20 SHL Add PMPRINTF support - PMPRINTF_OPT
|
|---|
| [1897] | 35 | # 06 Aug 22 GKY Add FM4_NOWARN_DSPACE - FM4_NOWARN_DSPACE_OPT
|
|---|
| [74] | 36 |
|
|---|
| [1259] | 37 | # Environment - see makefile_pre.mk and dll\makefile
|
|---|
| [74] | 38 |
|
|---|
| [15] | 39 | BASE = fm3
|
|---|
| [2] | 40 |
|
|---|
| [723] | 41 | # Pass values for FM2_VER, FM2UTILS_VER and BUILD_FM2UTILS which
|
|---|
| 42 | # have been set on the command line, if any, on to the
|
|---|
| 43 | # warpin\makefile using the WARPIN_OPTS macro.
|
|---|
| [703] | 44 |
|
|---|
| [723] | 45 | !ifdef FM2_VER # if defined on wmake command, pass it
|
|---|
| 46 | WARPIN_OPTS = FM2_VER=$(FM2_VER)
|
|---|
| [703] | 47 | !endif
|
|---|
| 48 |
|
|---|
| [723] | 49 | !ifdef FM2UTILS_VER # if defined on wmake command, pass it
|
|---|
| 50 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
|
|---|
| [703] | 51 | !endif
|
|---|
| 52 |
|
|---|
| [723] | 53 | !ifdef BUILD_FM2UTILS # if defined on wmake command, pass it
|
|---|
| 54 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
|
|---|
| [703] | 55 | !endif
|
|---|
| 56 |
|
|---|
| [238] | 57 | !include makefile_pre.mk
|
|---|
| [2] | 58 |
|
|---|
| [1620] | 59 | all: dll $(BASE) allexe fm3.sym fm3.xqs exesyms .symbolic
|
|---|
| [589] | 60 |
|
|---|
| [1584] | 61 | syms: fm3.sym fm3.xqs exesyms dllsyms .symbolic
|
|---|
| [594] | 62 |
|
|---|
| [1281] | 63 | dist: all syms lxlite wpi .symbolic
|
|---|
| [983] | 64 |
|
|---|
| [1514] | 65 | disth: $(BASE) allexe syms lxlite wpi .symbolic
|
|---|
| [1474] | 66 |
|
|---|
| [238] | 67 | # Only update resources
|
|---|
| [691] | 68 | res: .symbolic
|
|---|
| [238] | 69 | @echo Updating resources only
|
|---|
| [1281] | 70 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
|---|
| [238] | 71 |
|
|---|
| 72 | # make DLL components
|
|---|
| 73 |
|
|---|
| [691] | 74 | dll: .symbolic
|
|---|
| [15] | 75 | cd dll
|
|---|
| [1897] | 76 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) $(PMPRINTF_OPT) $(FM4_NOWARN_DSPACE)
|
|---|
| [15] | 77 | cd ..
|
|---|
| [2] | 78 |
|
|---|
| [983] | 79 | dllsyms: .symbolic
|
|---|
| 80 | cd dll
|
|---|
| [1897] | 81 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) $(PMPRINTF_OPT) $(FM4_NOWARN_DSPACE) syms
|
|---|
| [983] | 82 | cd ..
|
|---|
| 83 |
|
|---|
| [691] | 84 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
|---|
| [2] | 85 |
|
|---|
| [1133] | 86 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp .autodepend
|
|---|
| [2] | 87 |
|
|---|
| [1133] | 88 | $(BASE).obj: $(BASE).c dll\version.h .autodepend
|
|---|
| [2] | 89 |
|
|---|
| [238] | 90 | # make EXE compenents
|
|---|
| [2] | 91 |
|
|---|
| [691] | 92 | allexe: *.mak .symbolic
|
|---|
| [1897] | 93 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) $(PMPRINTF_OPT) $(FM4_NOWARN_DSPACE)
|
|---|
| [238] | 94 |
|
|---|
| [983] | 95 | # make SYM files
|
|---|
| 96 |
|
|---|
| 97 | exesyms: *.mak .symbolic
|
|---|
| [1897] | 98 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) $(PMPRINTF_OPT) $(FM4_NOWARN_DSPACE) sym
|
|---|
| [983] | 99 |
|
|---|
| 100 | # make WPI files
|
|---|
| 101 |
|
|---|
| [691] | 102 | wpi: .symbolic
|
|---|
| [1259] | 103 | cd warpin
|
|---|
| [1281] | 104 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
|
|---|
| [1259] | 105 | cd ..
|
|---|
| [579] | 106 |
|
|---|
| [1133] | 107 | lxlite:: lxlitedll lxliteexe .symbolic
|
|---|
| 108 |
|
|---|
| [465] | 109 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
|---|
| 110 | # Apply to each *.mak for other exes
|
|---|
| [1133] | 111 | lxliteexe: *.mak .symbolic
|
|---|
| [1259] | 112 | !ifndef DEBUG
|
|---|
| [1897] | 113 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) $(PMPRINTF_OPT) $(FM4_NOWARN_DSPACE) lxlite
|
|---|
| [970] | 114 | !endif
|
|---|
| [310] | 115 |
|
|---|
| [465] | 116 | # Apply to dlls
|
|---|
| [1133] | 117 | lxlitedll: .symbolic
|
|---|
| [1259] | 118 | !ifndef DEBUG
|
|---|
| [465] | 119 | cd dll
|
|---|
| [1474] | 120 | $(MAKE) -h lxlite
|
|---|
| [1890] | 121 | # FIXME to be gone
|
|---|
| [1897] | 122 | # $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) $(PMPRINTF_OPT) $(FM4_NOWARN_DSPACE) 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
|
|---|
| [1576] | 142 | -del *.xqs
|
|---|
| [1596] | 143 | -del *~
|
|---|
| [147] | 144 |
|
|---|
| [691] | 145 | distclean: clean .symbolic
|
|---|
| [589] | 146 | cd warpin
|
|---|
| [1281] | 147 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
|---|
| [589] | 148 | cd ..
|
|---|
| 149 |
|
|---|
| [238] | 150 | !include makefile_post.mk
|
|---|
| [15] | 151 |
|
|---|
| [1890] | 152 | # eof
|
|---|