| [236] | 1 | # makefile_post.mk - common makefile suffix settings for all makefiles
|
|---|
| 2 | # $Id: makefile_post.mk 1890 2020-01-30 06:39:42Z stevenhl $
|
|---|
| [9] | 3 |
|
|---|
| [1890] | 4 | # Copyright (c) 2002-2020 Steven H. Levine
|
|---|
| [1468] | 5 |
|
|---|
| [252] | 6 | # 16 Aug 05 SHL Clean up
|
|---|
| [310] | 7 | # 16 Apr 06 SHL Add lxlite target
|
|---|
| [691] | 8 | # 02 Jun 07 SHL Convert to OpenWatcom
|
|---|
| [976] | 9 | # 23 Feb 08 JBS Add support for building SYM files (Ticket 226)
|
|---|
| [1259] | 10 | # 25 Oct 08 JBS Rework DEBUG usage to match what C code expects
|
|---|
| [1281] | 11 | # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
|
|---|
| [1285] | 12 | # 19 Nov 08 JBS Ticket 297: Removed bldlevel calls
|
|---|
| [1406] | 13 | # 14 Dec 08 SHL Drop EXCEPTQ support - will not be used
|
|---|
| [1468] | 14 | # 24 Jul 09 SHL Comments
|
|---|
| [1576] | 15 | # 21 Jun 11 GKY Add exceptq .xqs support
|
|---|
| 16 | # 21 Jun 11 GKY Make high memory builds the default resources only for exes
|
|---|
| [1597] | 17 | # 04 Jul 11 GKY Make xqs files an explicit target so they will be rebuild if lost somehow.
|
|---|
| [1661] | 18 | # 25 Jan 12 SHL Renamae LOW -> NOHIGHMEM and allow set from enviroment
|
|---|
| [1730] | 19 | # 17 Jan 14 JBS Ticket 500: Stop setting exe objects to high-memory
|
|---|
| [1890] | 20 | # 25 Jan 20 SHL Comments
|
|---|
| [252] | 21 |
|
|---|
| [236] | 22 | !ifndef MAKERES
|
|---|
| 23 |
|
|---|
| [691] | 24 | # Build executable
|
|---|
| 25 | # Common parameters go in .lrf
|
|---|
| 26 | # Executable specific paramters go in .def
|
|---|
| [1890] | 27 | # Put 32-bit data in high memory unless overridden
|
|---|
| [691] | 28 |
|
|---|
| [1661] | 29 | !ifndef NOHIGHMEM
|
|---|
| 30 | !ifdef %NOHIGHMEM
|
|---|
| 31 | NOHIGHMEM=$(%NOHIGHMEM)
|
|---|
| 32 | !endif
|
|---|
| 33 | !endif
|
|---|
| 34 |
|
|---|
| [1396] | 35 | $(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
|
|---|
| [1406] | 36 | @echo Linking $(BASE).exe
|
|---|
| [719] | 37 | $(LINK) @$(BASE).lrf @$(BASE).def
|
|---|
| [1282] | 38 | @echo.
|
|---|
| [1468] | 39 | @echo Attaching resources to $@
|
|---|
| [1282] | 40 | @echo.
|
|---|
| [691] | 41 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
|---|
| [1730] | 42 | # !ifndef NOHIGHMEM
|
|---|
| 43 | # !exehdr /highmem:3 $@
|
|---|
| 44 | # !endif
|
|---|
| [9] | 45 |
|
|---|
| [1661] | 46 | # 2012-01-25 SHL fixme to be gone - does not undefine
|
|---|
| 47 | # NOHIGHMEM =
|
|---|
| [1624] | 48 |
|
|---|
| [691] | 49 | $(BASE).lrf: $(__MAKEFILES__) .explicit
|
|---|
| 50 | @%write $^@ $(LFLAGS)
|
|---|
| 51 | @%append $^@ name $(BASE)
|
|---|
| 52 | @%append $^@ file $(BASE).obj
|
|---|
| 53 | @%append $^@ library dll\fm3dll.lib
|
|---|
| 54 | @%append $^@ library os2386.lib
|
|---|
| 55 |
|
|---|
| [1596] | 56 | $(BASE).xqs: $(BASE).map .explicit
|
|---|
| [1584] | 57 | @echo Processing: $?
|
|---|
| 58 | -mapxqs $?
|
|---|
| 59 |
|
|---|
| [1596] | 60 | $(BASE).sym: $(BASE).map .explicit
|
|---|
| 61 | @echo Processing: $?
|
|---|
| [1661] | 62 | -perl debugtools\mapsymw.pl $?
|
|---|
| [1596] | 63 |
|
|---|
| [236] | 64 | !else
|
|---|
| 65 |
|
|---|
| [691] | 66 | # Replace resources
|
|---|
| 67 | $(BASE).exe: $(BASE).res .explicit
|
|---|
| [252] | 68 | @if not exist $@ echo $@ missing
|
|---|
| [1259] | 69 | !ifndef DEBUG
|
|---|
| [980] | 70 | lxlite $@ /x+ /b-
|
|---|
| 71 | lxlite $@ /c:minstub
|
|---|
| 72 | !endif
|
|---|
| [1282] | 73 | @echo.
|
|---|
| [1468] | 74 | @echo Attaching resources to $@
|
|---|
| [1282] | 75 | @echo.
|
|---|
| [691] | 76 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
|---|
| [1259] | 77 | !ifndef DEBUG
|
|---|
| [252] | 78 | lxlite $@ /x- /b-
|
|---|
| [980] | 79 | !endif
|
|---|
| [236] | 80 |
|
|---|
| 81 | !endif
|
|---|
| 82 |
|
|---|
| [691] | 83 | lxlite:: $(BASE).exe .symbolic .explicit
|
|---|
| [1259] | 84 | !ifndef DEBUG
|
|---|
| [310] | 85 | lxlite /x- /b- $?
|
|---|
| [980] | 86 | !endif
|
|---|
| [310] | 87 |
|
|---|
| [691] | 88 | clean:: .symbolic .explicit
|
|---|
| [236] | 89 | -del $(BASE).exe
|
|---|
| 90 | -del $(BASE).lrf
|
|---|
| 91 | -del $(BASE).map
|
|---|
| 92 | -del $(BASE).obj
|
|---|
| 93 | -del $(BASE).res
|
|---|
| [1576] | 94 | -del $(BASE).sym
|
|---|
| 95 | -del $(BASE).xqs
|
|---|
| [236] | 96 |
|
|---|
| [9] | 97 | # The end
|
|---|