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