| 1 | # makefile - build all fm/2 components
|
|---|
| 2 | # $Id: makefile 720 2007-07-04 22:01:34Z stevenhl $
|
|---|
| 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 | # FM2_VER defines fm/2 WPI file name suffix
|
|---|
| 25 | # e.g. FM2_VER=-3-5-9 results in FM2-3-5-9.wpi being built
|
|---|
| 26 | # If FM2_VER is empty, then FM2.wpi is built
|
|---|
| 27 | # NOTE: Start the value with '-'
|
|---|
| 28 |
|
|---|
| 29 | !ifndef FM2_VER # if defined on wmake command, use it
|
|---|
| 30 | FM2_VER=-3-6-0 # default value
|
|---|
| 31 | !ifdef %FM2_VER # if defined via env. var.
|
|---|
| 32 | FM2_VER=$(%FM2_VER) # use the env. var.
|
|---|
| 33 | !endif
|
|---|
| 34 | !endif
|
|---|
| 35 |
|
|---|
| 36 | # FM2UTILS_VER defines the fm2utils WPI file name suffix.
|
|---|
| 37 | # e.g. FM2UTILS_VER=-1-0 results in FM2Utils-1.0.wpi being built
|
|---|
| 38 | # If FM2UTILS_VER is empty, then FM2UTILS.wpi is built
|
|---|
| 39 | # NOTE: Start the value with '-'
|
|---|
| 40 |
|
|---|
| 41 | !ifndef FM2UTILS_VER # if defined on wmake command, use it
|
|---|
| 42 | FM2UTILS_VER=-1-1 # default value
|
|---|
| 43 | !ifdef %FM2UTILS_VER # if defined via env. var.
|
|---|
| 44 | FM2UTILS_VER=$(%FM2UTILS_VER) # use the env. var.
|
|---|
| 45 | !endif
|
|---|
| 46 | !endif
|
|---|
| 47 |
|
|---|
| 48 | # If BUILD_FM2UTILS = 1, build FM2UTILS*.wpi and FM2*.wpi
|
|---|
| 49 | # Otherwise build just FM2*.wpi
|
|---|
| 50 |
|
|---|
| 51 | !ifndef BUILD_FM2UTILS # if defined on wmake command, use it
|
|---|
| 52 | !ifdef %BUILD_FM2UTILS # else if defined via env. var.
|
|---|
| 53 | !ifneq %BUILD_FM2UTILS 1 # if env. var. is anything but 1
|
|---|
| 54 | BUILD_FM2UTILS=0 # use a value of 0
|
|---|
| 55 | !else
|
|---|
| 56 | BUILD_FM2UTILS=1
|
|---|
| 57 | !endif
|
|---|
| 58 | !else
|
|---|
| 59 | BUILD_FM2UTILS=0 # use default value if not defined via env. or command line
|
|---|
| 60 | !endif
|
|---|
| 61 | !endif
|
|---|
| 62 |
|
|---|
| 63 | !include makefile_pre.mk
|
|---|
| 64 |
|
|---|
| 65 | all: dll $(BASE) allexe .symbolic
|
|---|
| 66 |
|
|---|
| 67 | dist: all lxlite wpi .symbolic
|
|---|
| 68 |
|
|---|
| 69 | # Only update resources
|
|---|
| 70 | res: .symbolic
|
|---|
| 71 | @echo Updating resources only
|
|---|
| 72 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
|---|
| 73 |
|
|---|
| 74 | # make DLL components
|
|---|
| 75 |
|
|---|
| 76 | dll: .symbolic
|
|---|
| 77 | cd dll
|
|---|
| 78 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT)
|
|---|
| 79 | cd ..
|
|---|
| 80 |
|
|---|
| 81 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
|---|
| 82 |
|
|---|
| 83 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp
|
|---|
| 84 |
|
|---|
| 85 | $(BASE).obj: $(BASE).c dll\version.h
|
|---|
| 86 |
|
|---|
| 87 | # make EXE compenents
|
|---|
| 88 |
|
|---|
| 89 | allexe: *.mak .symbolic
|
|---|
| 90 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT)
|
|---|
| 91 |
|
|---|
| 92 | wpi: .symbolic
|
|---|
| 93 | cd warpin
|
|---|
| 94 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) FM2_VER=$(FM2_VER) FM2UTILS_VER=$(FM2UTILS_VER) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
|
|---|
| 95 | cd ..
|
|---|
| 96 |
|
|---|
| 97 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
|---|
| 98 | # Apply to each *.mak for other exes
|
|---|
| 99 | lxlite:: *.mak .symbolic
|
|---|
| 100 | @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
|---|
| 101 |
|
|---|
| 102 | # Apply to dlls
|
|---|
| 103 | lxlite:: .symbolic
|
|---|
| 104 | cd dll
|
|---|
| 105 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
|
|---|
| 106 | cd ..
|
|---|
| 107 |
|
|---|
| 108 | cleanobj: .symbolic
|
|---|
| 109 | cd dll
|
|---|
| 110 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
|
|---|
| 111 | cd ..
|
|---|
| 112 | -del *.obj
|
|---|
| 113 |
|
|---|
| 114 | clean:: .symbolic
|
|---|
| 115 | cd dll
|
|---|
| 116 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean
|
|---|
| 117 | cd ..
|
|---|
| 118 | -del *.exe
|
|---|
| 119 | -del *.map
|
|---|
| 120 | -del *.obj
|
|---|
| 121 | -del *.res
|
|---|
| 122 | -del fm3res.str
|
|---|
| 123 |
|
|---|
| 124 | distclean: clean .symbolic
|
|---|
| 125 | cd warpin
|
|---|
| 126 | $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
|---|
| 127 | cd ..
|
|---|
| 128 |
|
|---|
| 129 | !include makefile_post.mk
|
|---|
| 130 |
|
|---|
| 131 | # The end
|
|---|