| 1 | # makefile - build all fm/2 components
|
|---|
| 2 | # $Id: makefile 1281 2008-11-18 17:19:46Z jbs $
|
|---|
| 3 |
|
|---|
| 4 | # Copyright (c) 1993-98 M. Kimes
|
|---|
| 5 | # Copyright (c) 2002, 2008 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 | # 21 Jan 08 SHL Add *.lrf to clean target
|
|---|
| 20 | # 22 Feb 08 JBS Suppress lxlite processing when DEBUG=1
|
|---|
| 21 | # 08 Jul 08 SHL Avoid extra work for wmake -a dist
|
|---|
| 22 | # 22 Jul 08 SHL Change from dll\dllsyms to dll\syms target for consistency
|
|---|
| 23 | # 22 Jul 08 SHL Pass FORTIFY options to subordinate makefiles
|
|---|
| 24 | # 25 Oct 08 SHL Sanitize DEBUG usage
|
|---|
| 25 | # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
|
|---|
| 26 |
|
|---|
| 27 | # Environment - see makefile_pre.mk and dll\makefile
|
|---|
| 28 |
|
|---|
| 29 | BASE = fm3
|
|---|
| 30 |
|
|---|
| 31 | # Pass values for FM2_VER, FM2UTILS_VER and BUILD_FM2UTILS which
|
|---|
| 32 | # have been set on the command line, if any, on to the
|
|---|
| 33 | # warpin\makefile using the WARPIN_OPTS macro.
|
|---|
| 34 |
|
|---|
| 35 | !ifdef FM2_VER # if defined on wmake command, pass it
|
|---|
| 36 | WARPIN_OPTS = FM2_VER=$(FM2_VER)
|
|---|
| 37 | !endif
|
|---|
| 38 |
|
|---|
| 39 | !ifdef FM2UTILS_VER # if defined on wmake command, pass it
|
|---|
| 40 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
|
|---|
| 41 | !endif
|
|---|
| 42 |
|
|---|
| 43 | !ifdef BUILD_FM2UTILS # if defined on wmake command, pass it
|
|---|
| 44 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
|
|---|
| 45 | !endif
|
|---|
| 46 |
|
|---|
| 47 | !include makefile_pre.mk
|
|---|
| 48 |
|
|---|
| 49 | all: dll $(BASE) allexe .symbolic
|
|---|
| 50 |
|
|---|
| 51 | syms: exesyms dllsyms .symbolic
|
|---|
| 52 |
|
|---|
| 53 | dist: all syms lxlite wpi .symbolic
|
|---|
| 54 |
|
|---|
| 55 | # Only update resources
|
|---|
| 56 | res: .symbolic
|
|---|
| 57 | @echo Updating resources only
|
|---|
| 58 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
|
|---|
| 59 |
|
|---|
| 60 | # make DLL components
|
|---|
| 61 |
|
|---|
| 62 | dll: .symbolic
|
|---|
| 63 | cd dll
|
|---|
| 64 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
|---|
| 65 | cd ..
|
|---|
| 66 |
|
|---|
| 67 | dllsyms: .symbolic
|
|---|
| 68 | cd dll
|
|---|
| 69 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
|
|---|
| 70 | cd ..
|
|---|
| 71 |
|
|---|
| 72 | $(BASE): $(BASE).exe $(BASE).res .symbolic
|
|---|
| 73 |
|
|---|
| 74 | $(BASE).res: $(BASE).rc icons\$(BASE).ico bitmaps\*.bmp .autodepend
|
|---|
| 75 |
|
|---|
| 76 | $(BASE).obj: $(BASE).c dll\version.h .autodepend
|
|---|
| 77 |
|
|---|
| 78 | # make EXE compenents
|
|---|
| 79 |
|
|---|
| 80 | allexe: *.mak .symbolic
|
|---|
| 81 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
|
|---|
| 82 |
|
|---|
| 83 | # make SYM files
|
|---|
| 84 |
|
|---|
| 85 | exesyms: *.mak .symbolic
|
|---|
| 86 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
|
|---|
| 87 |
|
|---|
| 88 | # make WPI files
|
|---|
| 89 |
|
|---|
| 90 | wpi: .symbolic
|
|---|
| 91 | cd warpin
|
|---|
| 92 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
|
|---|
| 93 | cd ..
|
|---|
| 94 |
|
|---|
| 95 | lxlite:: lxlitedll lxliteexe .symbolic
|
|---|
| 96 |
|
|---|
| 97 | # makefile_post.mk contains lxlite target for $(BASE).exe
|
|---|
| 98 | # Apply to each *.mak for other exes
|
|---|
| 99 | lxliteexe: *.mak .symbolic
|
|---|
| 100 | !ifndef DEBUG
|
|---|
| 101 | @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
|---|
| 102 | !endif
|
|---|
| 103 |
|
|---|
| 104 | # Apply to dlls
|
|---|
| 105 | lxlitedll: .symbolic
|
|---|
| 106 | !ifndef DEBUG
|
|---|
| 107 | cd dll
|
|---|
| 108 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
|
|---|
| 109 | cd ..
|
|---|
| 110 | !endif
|
|---|
| 111 |
|
|---|
| 112 | cleanobj: .symbolic
|
|---|
| 113 | cd dll
|
|---|
| 114 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
|
|---|
| 115 | cd ..
|
|---|
| 116 | -del *.obj
|
|---|
| 117 |
|
|---|
| 118 | clean:: .symbolic
|
|---|
| 119 | cd dll
|
|---|
| 120 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) clean
|
|---|
| 121 | cd ..
|
|---|
| 122 | -del *.exe
|
|---|
| 123 | -del *.lrf
|
|---|
| 124 | -del *.map
|
|---|
| 125 | -del *.obj
|
|---|
| 126 | -del *.res
|
|---|
| 127 | -del *.sym
|
|---|
| 128 | -del fm3res.str
|
|---|
| 129 |
|
|---|
| 130 | distclean: clean .symbolic
|
|---|
| 131 | cd warpin
|
|---|
| 132 | $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) distclean
|
|---|
| 133 | cd ..
|
|---|
| 134 |
|
|---|
| 135 | !include makefile_post.mk
|
|---|
| 136 |
|
|---|
| 137 | # The end
|
|---|