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