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