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