[236] | 1 | # makefile_post.mk - common makefile suffix settings for all makefiles
|
---|
| 2 | # $Id: makefile_post.mk 1730 2014-02-18 00:12:44Z jbs $
|
---|
[9] | 3 |
|
---|
[1661] | 4 | # Copyright (c) 2002, 2012 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
|
---|
[252] | 20 |
|
---|
[236] | 21 | !ifndef MAKERES
|
---|
| 22 |
|
---|
[691] | 23 | # Build executable
|
---|
| 24 | # Common parameters go in .lrf
|
---|
| 25 | # Executable specific paramters go in .def
|
---|
[1661] | 26 | # Put 32-bit data in high memoryt unless overridden
|
---|
[691] | 27 |
|
---|
[1661] | 28 | !ifndef NOHIGHMEM
|
---|
| 29 | !ifdef %NOHIGHMEM
|
---|
| 30 | NOHIGHMEM=$(%NOHIGHMEM)
|
---|
| 31 | !endif
|
---|
| 32 | !endif
|
---|
| 33 |
|
---|
[1396] | 34 | $(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
|
---|
[1406] | 35 | @echo Linking $(BASE).exe
|
---|
[719] | 36 | $(LINK) @$(BASE).lrf @$(BASE).def
|
---|
[1282] | 37 | @echo.
|
---|
[1468] | 38 | @echo Attaching resources to $@
|
---|
[1282] | 39 | @echo.
|
---|
[691] | 40 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
---|
[1730] | 41 | # !ifndef NOHIGHMEM
|
---|
| 42 | # !exehdr /highmem:3 $@
|
---|
| 43 | # !endif
|
---|
[9] | 44 |
|
---|
[1661] | 45 | # 2012-01-25 SHL fixme to be gone - does not undefine
|
---|
| 46 | # NOHIGHMEM =
|
---|
[1624] | 47 |
|
---|
[691] | 48 | $(BASE).lrf: $(__MAKEFILES__) .explicit
|
---|
| 49 | @%write $^@ $(LFLAGS)
|
---|
| 50 | @%append $^@ name $(BASE)
|
---|
| 51 | @%append $^@ file $(BASE).obj
|
---|
| 52 | @%append $^@ library dll\fm3dll.lib
|
---|
| 53 | @%append $^@ library os2386.lib
|
---|
| 54 |
|
---|
[1596] | 55 | $(BASE).xqs: $(BASE).map .explicit
|
---|
[1584] | 56 | @echo Processing: $?
|
---|
| 57 | -mapxqs $?
|
---|
| 58 |
|
---|
[1596] | 59 | $(BASE).sym: $(BASE).map .explicit
|
---|
| 60 | @echo Processing: $?
|
---|
[1661] | 61 | -perl debugtools\mapsymw.pl $?
|
---|
[1596] | 62 |
|
---|
[236] | 63 | !else
|
---|
| 64 |
|
---|
[691] | 65 | # Replace resources
|
---|
| 66 | $(BASE).exe: $(BASE).res .explicit
|
---|
[252] | 67 | @if not exist $@ echo $@ missing
|
---|
[1259] | 68 | !ifndef DEBUG
|
---|
[980] | 69 | lxlite $@ /x+ /b-
|
---|
| 70 | lxlite $@ /c:minstub
|
---|
| 71 | !endif
|
---|
[1282] | 72 | @echo.
|
---|
[1468] | 73 | @echo Attaching resources to $@
|
---|
[1282] | 74 | @echo.
|
---|
[691] | 75 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
---|
[1259] | 76 | !ifndef DEBUG
|
---|
[252] | 77 | lxlite $@ /x- /b-
|
---|
[980] | 78 | !endif
|
---|
[236] | 79 |
|
---|
| 80 | !endif
|
---|
| 81 |
|
---|
[691] | 82 | lxlite:: $(BASE).exe .symbolic .explicit
|
---|
[1259] | 83 | !ifndef DEBUG
|
---|
[310] | 84 | lxlite /x- /b- $?
|
---|
[980] | 85 | !endif
|
---|
[310] | 86 |
|
---|
[691] | 87 | clean:: .symbolic .explicit
|
---|
[236] | 88 | -del $(BASE).exe
|
---|
| 89 | -del $(BASE).lrf
|
---|
| 90 | -del $(BASE).map
|
---|
| 91 | -del $(BASE).obj
|
---|
| 92 | -del $(BASE).res
|
---|
[1576] | 93 | -del $(BASE).sym
|
---|
| 94 | -del $(BASE).xqs
|
---|
[236] | 95 |
|
---|
[9] | 96 | # The end
|
---|