| 1 | # makefile - build all fm/2 components | 
|---|
| 2 | # $Id: makefile 723 2007-07-05 09:34:51Z jbs $ | 
|---|
| 3 |  | 
|---|
| 4 | # Copyright (c) 1993-98 M. Kimes | 
|---|
| 5 | # Copyright (c) 2002, 2007 Steven H. Levine | 
|---|
| 6 |  | 
|---|
| 7 | # 24 May 05 SHL Add clean and cleanobj target | 
|---|
| 8 | # 16 Jun 05 SHL Workaround makeflags wierdness | 
|---|
| 9 | # 18 Jul 05 SHL Add bitmap dependencies | 
|---|
| 10 | # 20 Jul 05 SHL Add makeres support | 
|---|
| 11 | # 16 Apr 06 SHL Add lxlite target | 
|---|
| 12 | # 31 Jul 06 SHL Tweak dependencies | 
|---|
| 13 | # 26 Aug 06 SHL Add rest of lxlite support | 
|---|
| 14 | # 14 Jun 07 SHL Convert to OpenWatcom | 
|---|
| 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. | 
|---|
| 18 | # 04 Jul 07 SHL Pass DEBUG settings to sub-make | 
|---|
| 19 |  | 
|---|
| 20 | # Environment - see makefile_pre.mk | 
|---|
| 21 |  | 
|---|
| 22 | BASE = fm3 | 
|---|
| 23 |  | 
|---|
| 24 | # Pass values for FM2_VER, FM2UTILS_VER and BUILD_FM2UTILS which | 
|---|
| 25 | # have been set on the command line, if any, on to the | 
|---|
| 26 | # warpin\makefile using the WARPIN_OPTS macro. | 
|---|
| 27 |  | 
|---|
| 28 | !ifdef FM2_VER                  # if defined on wmake command, pass it | 
|---|
| 29 | WARPIN_OPTS = FM2_VER=$(FM2_VER) | 
|---|
| 30 | !endif | 
|---|
| 31 |  | 
|---|
| 32 | !ifdef FM2UTILS_VER             # if defined on wmake command, pass it | 
|---|
| 33 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER) | 
|---|
| 34 | !endif | 
|---|
| 35 |  | 
|---|
| 36 | !ifdef BUILD_FM2UTILS           # if defined on wmake command, pass it | 
|---|
| 37 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS) | 
|---|
| 38 | !endif | 
|---|
| 39 |  | 
|---|
| 40 | !include makefile_pre.mk | 
|---|
| 41 |  | 
|---|
| 42 | all: dll $(BASE) allexe .symbolic | 
|---|
| 43 |  | 
|---|
| 44 | dist: all lxlite wpi .symbolic | 
|---|
| 45 |  | 
|---|
| 46 | # Only update resources | 
|---|
| 47 | res: .symbolic | 
|---|
| 48 | @echo Updating resources only | 
|---|
| 49 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1 | 
|---|
| 50 |  | 
|---|
| 51 | # make DLL components | 
|---|
| 52 |  | 
|---|
| 53 | dll: .symbolic | 
|---|
| 54 | cd dll | 
|---|
| 55 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) | 
|---|
| 56 | cd .. | 
|---|
| 57 |  | 
|---|
| 58 | $(BASE): $(BASE).exe $(BASE).res .symbolic | 
|---|
| 59 |  | 
|---|
| 60 | $(BASE).res: $(BASE).rc  icons\$(BASE).ico bitmaps\*.bmp | 
|---|
| 61 |  | 
|---|
| 62 | $(BASE).obj: $(BASE).c dll\version.h | 
|---|
| 63 |  | 
|---|
| 64 | # make EXE compenents | 
|---|
| 65 |  | 
|---|
| 66 | allexe: *.mak .symbolic | 
|---|
| 67 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) | 
|---|
| 68 |  | 
|---|
| 69 | wpi: .symbolic | 
|---|
| 70 | cd warpin | 
|---|
| 71 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS) | 
|---|
| 72 | cd .. | 
|---|
| 73 |  | 
|---|
| 74 | # makefile_post.mk contains lxlite target for $(BASE).exe | 
|---|
| 75 | # Apply to each *.mak for other exes | 
|---|
| 76 | lxlite:: *.mak .symbolic | 
|---|
| 77 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite | 
|---|
| 78 |  | 
|---|
| 79 | # Apply to dlls | 
|---|
| 80 | lxlite:: .symbolic | 
|---|
| 81 | cd dll | 
|---|
| 82 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite | 
|---|
| 83 | cd .. | 
|---|
| 84 |  | 
|---|
| 85 | cleanobj: .symbolic | 
|---|
| 86 | cd dll | 
|---|
| 87 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj | 
|---|
| 88 | cd .. | 
|---|
| 89 | -del *.obj | 
|---|
| 90 |  | 
|---|
| 91 | clean:: .symbolic | 
|---|
| 92 | cd dll | 
|---|
| 93 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean | 
|---|
| 94 | cd .. | 
|---|
| 95 | -del *.exe | 
|---|
| 96 | -del *.map | 
|---|
| 97 | -del *.obj | 
|---|
| 98 | -del *.res | 
|---|
| 99 | -del fm3res.str | 
|---|
| 100 |  | 
|---|
| 101 | distclean: clean .symbolic | 
|---|
| 102 | cd warpin | 
|---|
| 103 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean | 
|---|
| 104 | cd .. | 
|---|
| 105 |  | 
|---|
| 106 | !include makefile_post.mk | 
|---|
| 107 |  | 
|---|
| 108 | # The end | 
|---|