| [238] | 1 | # makefile - build all fm/2 components
|
|---|
| [74] | 2 | # $Id: makefile 970 2008-02-22 22:16:17Z 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
|
|---|
| [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 |
|
|---|
| [970] | 43 |
|
|---|
| [691] | 44 | all: dll $(BASE) allexe .symbolic
|
|---|
| [589] | 45 |
|
|---|
| [691] | 46 | dist: all lxlite wpi .symbolic
|
|---|
| [594] | 47 |
|
|---|
| [238] | 48 | # Only update resources
|
|---|
| [691] | 49 | res: .symbolic
|
|---|
| [238] | 50 | @echo Updating resources only
|
|---|
| [720] | 51 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
|---|
| [238] | 52 |
|
|---|
| 53 | # make DLL components
|
|---|
| 54 |
|
|---|
| [691] | 55 | dll: .symbolic
|
|---|
| [15] | 56 | cd dll
|
|---|
| [720] | 57 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT)
|
|---|
| [15] | 58 | cd ..
|
|---|
| [2] | 59 |
|
|---|
| [691] | 60 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
|---|
| [2] | 61 |
|
|---|
| [554] | 62 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp
|
|---|
| [2] | 63 |
|
|---|
| [554] | 64 | $(BASE).obj: $(BASE).c dll\version.h
|
|---|
| [2] | 65 |
|
|---|
| [238] | 66 | # make EXE compenents
|
|---|
| [2] | 67 |
|
|---|
| [691] | 68 | allexe: *.mak .symbolic
|
|---|
| [720] | 69 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT)
|
|---|
| [238] | 70 |
|
|---|
| [691] | 71 | wpi: .symbolic
|
|---|
| [579] | 72 | cd warpin
|
|---|
| [723] | 73 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
|
|---|
| [579] | 74 | cd ..
|
|---|
| 75 |
|
|---|
| [465] | 76 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
|---|
| 77 | # Apply to each *.mak for other exes
|
|---|
| [691] | 78 | lxlite:: *.mak .symbolic
|
|---|
| [970] | 79 | !ifdef DEBUG
|
|---|
| 80 | ! ifeq DEBUG 0
|
|---|
| 81 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
|---|
| 82 | ! endif
|
|---|
| 83 | !else
|
|---|
| 84 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
|---|
| 85 | !endif
|
|---|
| [310] | 86 |
|
|---|
| [465] | 87 | # Apply to dlls
|
|---|
| [691] | 88 | lxlite:: .symbolic
|
|---|
| [465] | 89 | cd dll
|
|---|
| [970] | 90 | !ifdef DEBUG
|
|---|
| 91 | ! ifeq DEBUG 0
|
|---|
| 92 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
|---|
| 93 | ! endif
|
|---|
| 94 | !else
|
|---|
| [720] | 95 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
|---|
| [970] | 96 | !endif
|
|---|
| [465] | 97 | cd ..
|
|---|
| 98 |
|
|---|
| [691] | 99 | cleanobj: .symbolic
|
|---|
| [147] | 100 | cd dll
|
|---|
| [720] | 101 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
|
|---|
| [147] | 102 | cd ..
|
|---|
| 103 | -del *.obj
|
|---|
| 104 |
|
|---|
| [691] | 105 | clean:: .symbolic
|
|---|
| [147] | 106 | cd dll
|
|---|
| [720] | 107 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean
|
|---|
| [147] | 108 | cd ..
|
|---|
| 109 | -del *.exe
|
|---|
| [936] | 110 | -del *.lrf
|
|---|
| [147] | 111 | -del *.map
|
|---|
| 112 | -del *.obj
|
|---|
| 113 | -del *.res
|
|---|
| 114 | -del fm3res.str
|
|---|
| 115 |
|
|---|
| [691] | 116 | distclean: clean .symbolic
|
|---|
| [589] | 117 | cd warpin
|
|---|
| [720] | 118 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
|---|
| [589] | 119 | cd ..
|
|---|
| 120 |
|
|---|
| [238] | 121 | !include makefile_post.mk
|
|---|
| [15] | 122 |
|
|---|
| 123 | # The end
|
|---|