| [238] | 1 | # makefile - build all fm/2 components
 | 
|---|
| [74] | 2 | # $Id: makefile 1133 2008-08-30 04:27:29Z 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
 | 
|---|
| [977] | 20 | # 22 Feb 08 JBS Suppress lxlite processing when DEBUG=1
 | 
|---|
| [1133] | 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
 | 
|---|
| [74] | 24 | 
 | 
|---|
| [719] | 25 | # Environment - see makefile_pre.mk
 | 
|---|
| [74] | 26 | 
 | 
|---|
| [15] | 27 | BASE = fm3
 | 
|---|
| [2] | 28 | 
 | 
|---|
| [723] | 29 | # Pass values for FM2_VER, FM2UTILS_VER and BUILD_FM2UTILS which
 | 
|---|
 | 30 | # have been set on the command line, if any, on to the
 | 
|---|
 | 31 | # warpin\makefile using the WARPIN_OPTS macro.
 | 
|---|
| [703] | 32 | 
 | 
|---|
| [723] | 33 | !ifdef FM2_VER                  # if defined on wmake command, pass it
 | 
|---|
 | 34 | WARPIN_OPTS = FM2_VER=$(FM2_VER)
 | 
|---|
| [703] | 35 | !endif
 | 
|---|
 | 36 | 
 | 
|---|
| [723] | 37 | !ifdef FM2UTILS_VER             # if defined on wmake command, pass it
 | 
|---|
 | 38 | WARPIN_OPTS = $(WARPIN_OPTS) FM2UTILS_VER=$(FM2UTILS_VER)
 | 
|---|
| [703] | 39 | !endif
 | 
|---|
 | 40 | 
 | 
|---|
| [723] | 41 | !ifdef BUILD_FM2UTILS           # if defined on wmake command, pass it
 | 
|---|
 | 42 | WARPIN_OPTS = $(WARPIN_OPTS) BUILD_FM2UTILS=$(BUILD_FM2UTILS)
 | 
|---|
| [703] | 43 | !endif
 | 
|---|
 | 44 | 
 | 
|---|
| [238] | 45 | !include makefile_pre.mk
 | 
|---|
| [2] | 46 | 
 | 
|---|
| [691] | 47 | all: dll $(BASE) allexe .symbolic
 | 
|---|
| [589] | 48 | 
 | 
|---|
| [983] | 49 | syms: exesyms dllsyms .symbolic
 | 
|---|
| [594] | 50 | 
 | 
|---|
| [1133] | 51 | dist: lxlitedll $(BASE) lxliteexe syms wpi .symbolic
 | 
|---|
| [983] | 52 | 
 | 
|---|
| [238] | 53 | # Only update resources
 | 
|---|
| [691] | 54 | res: .symbolic
 | 
|---|
| [238] | 55 |   @echo Updating resources only
 | 
|---|
| [720] | 56 |   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
 | 
|---|
| [238] | 57 | 
 | 
|---|
 | 58 | # make DLL components
 | 
|---|
 | 59 | 
 | 
|---|
| [691] | 60 | dll: .symbolic
 | 
|---|
| [15] | 61 |   cd dll
 | 
|---|
| [1133] | 62 |   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
 | 
|---|
| [15] | 63 |   cd ..
 | 
|---|
| [2] | 64 | 
 | 
|---|
| [983] | 65 | dllsyms: .symbolic
 | 
|---|
 | 66 |   cd dll
 | 
|---|
| [1133] | 67 |   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
 | 
|---|
| [983] | 68 |   cd ..
 | 
|---|
 | 69 | 
 | 
|---|
| [691] | 70 | $(BASE): $(BASE).exe $(BASE).res .symbolic
 | 
|---|
| [2] | 71 | 
 | 
|---|
| [1133] | 72 | $(BASE).res: $(BASE).rc  icons\$(BASE).ico bitmaps\*.bmp  .autodepend
 | 
|---|
| [2] | 73 | 
 | 
|---|
| [1133] | 74 | $(BASE).obj: $(BASE).c dll\version.h .autodepend
 | 
|---|
| [2] | 75 | 
 | 
|---|
| [238] | 76 | # make EXE compenents
 | 
|---|
| [2] | 77 | 
 | 
|---|
| [691] | 78 | allexe: *.mak .symbolic
 | 
|---|
| [1133] | 79 |    @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
 | 
|---|
| [238] | 80 | 
 | 
|---|
| [983] | 81 | # make SYM files
 | 
|---|
 | 82 | 
 | 
|---|
 | 83 | exesyms: *.mak .symbolic
 | 
|---|
| [1133] | 84 |    @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
 | 
|---|
| [983] | 85 | 
 | 
|---|
 | 86 | # make WPI files
 | 
|---|
 | 87 | 
 | 
|---|
| [691] | 88 | wpi: .symbolic
 | 
|---|
| [579] | 89 |    cd warpin
 | 
|---|
| [723] | 90 |    $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
 | 
|---|
| [579] | 91 |    cd ..
 | 
|---|
 | 92 | 
 | 
|---|
| [1133] | 93 | lxlite:: lxlitedll lxliteexe .symbolic
 | 
|---|
 | 94 | 
 | 
|---|
| [465] | 95 | # makefile_post.mk contains lxlite target for $(BASE).exe
 | 
|---|
 | 96 | # Apply to each *.mak for other exes
 | 
|---|
| [1133] | 97 | lxliteexe: *.mak .symbolic
 | 
|---|
| [970] | 98 | !ifdef DEBUG
 | 
|---|
 | 99 | !  ifeq DEBUG 0
 | 
|---|
| [1133] | 100 |      @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
 | 
|---|
| [970] | 101 | !  endif
 | 
|---|
 | 102 | !else
 | 
|---|
| [1133] | 103 |      @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
 | 
|---|
| [970] | 104 | !endif
 | 
|---|
| [310] | 105 | 
 | 
|---|
| [465] | 106 | # Apply to dlls
 | 
|---|
| [1133] | 107 | lxlitedll: .symbolic
 | 
|---|
| [465] | 108 |   cd dll
 | 
|---|
| [970] | 109 | !ifdef DEBUG
 | 
|---|
 | 110 | !  ifeq DEBUG 0
 | 
|---|
| [1133] | 111 |       $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
 | 
|---|
 | 112 | #     $(MAKE) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
 | 
|---|
| [970] | 113 | !  endif
 | 
|---|
 | 114 | !else
 | 
|---|
| [1133] | 115 |    $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
 | 
|---|
 | 116 | #  $(MAKE) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
 | 
|---|
| [970] | 117 | !endif
 | 
|---|
| [465] | 118 |   cd ..
 | 
|---|
 | 119 | 
 | 
|---|
| [691] | 120 | cleanobj: .symbolic
 | 
|---|
| [147] | 121 |   cd dll
 | 
|---|
| [720] | 122 |   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
 | 
|---|
| [147] | 123 |   cd ..
 | 
|---|
 | 124 |   -del *.obj
 | 
|---|
 | 125 | 
 | 
|---|
| [691] | 126 | clean:: .symbolic
 | 
|---|
| [147] | 127 |   cd dll
 | 
|---|
| [720] | 128 |   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean
 | 
|---|
| [147] | 129 |   cd ..
 | 
|---|
 | 130 |   -del *.exe
 | 
|---|
| [936] | 131 |   -del *.lrf
 | 
|---|
| [147] | 132 |   -del *.map
 | 
|---|
 | 133 |   -del *.obj
 | 
|---|
 | 134 |   -del *.res
 | 
|---|
| [1054] | 135 |   -del *.sym
 | 
|---|
| [147] | 136 |   -del fm3res.str
 | 
|---|
 | 137 | 
 | 
|---|
| [691] | 138 | distclean: clean .symbolic
 | 
|---|
| [589] | 139 |   cd warpin
 | 
|---|
| [720] | 140 |   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean
 | 
|---|
| [589] | 141 |   cd ..
 | 
|---|
 | 142 | 
 | 
|---|
| [238] | 143 | !include makefile_post.mk
 | 
|---|
| [15] | 144 | 
 | 
|---|
 | 145 | # The end
 | 
|---|