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