| [236] | 1 | # makefile_post.mk - common makefile suffix settings for all makefiles
|
|---|
| 2 | # $Id: makefile_post.mk 1576 2011-06-21 14:42:11Z gyoung $
|
|---|
| [9] | 3 |
|
|---|
| [1468] | 4 | # Copyright (c) 2002, 2009 Steven H. Levine
|
|---|
| 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
|
|---|
| [252] | 17 |
|
|---|
| [236] | 18 | !ifndef MAKERES
|
|---|
| 19 |
|
|---|
| [691] | 20 | # Build executable
|
|---|
| 21 | # Common parameters go in .lrf
|
|---|
| 22 | # Executable specific paramters go in .def
|
|---|
| 23 |
|
|---|
| [1396] | 24 | $(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
|
|---|
| [1406] | 25 | @echo Linking $(BASE).exe
|
|---|
| [719] | 26 | $(LINK) @$(BASE).lrf @$(BASE).def
|
|---|
| [1282] | 27 | @echo.
|
|---|
| [1468] | 28 | @echo Attaching resources to $@
|
|---|
| [1282] | 29 | @echo.
|
|---|
| [691] | 30 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
|---|
| [1576] | 31 | !exehdr /hi:3 $@
|
|---|
| [9] | 32 |
|
|---|
| [691] | 33 | $(BASE).lrf: $(__MAKEFILES__) .explicit
|
|---|
| 34 | @%write $^@ $(LFLAGS)
|
|---|
| 35 | @%append $^@ name $(BASE)
|
|---|
| 36 | @%append $^@ file $(BASE).obj
|
|---|
| 37 | @%append $^@ library dll\fm3dll.lib
|
|---|
| 38 | @%append $^@ library os2386.lib
|
|---|
| 39 |
|
|---|
| [1576] | 40 | $(BASE).sym: $(BASE).map $(BASE).xqs .explicit
|
|---|
| [987] | 41 | @echo Processing: $?
|
|---|
| [1576] | 42 | -perl debugtools\mapsymw.pl $?
|
|---|
| 43 | -mapxqs $?
|
|---|
| [976] | 44 |
|
|---|
| [236] | 45 | !else
|
|---|
| 46 |
|
|---|
| [691] | 47 | # Replace resources
|
|---|
| 48 | $(BASE).exe: $(BASE).res .explicit
|
|---|
| [252] | 49 | @if not exist $@ echo $@ missing
|
|---|
| [1259] | 50 | !ifndef DEBUG
|
|---|
| [980] | 51 | lxlite $@ /x+ /b-
|
|---|
| 52 | lxlite $@ /c:minstub
|
|---|
| 53 | !endif
|
|---|
| [1282] | 54 | @echo.
|
|---|
| [1468] | 55 | @echo Attaching resources to $@
|
|---|
| [1282] | 56 | @echo.
|
|---|
| [691] | 57 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
|---|
| [1259] | 58 | !ifndef DEBUG
|
|---|
| [252] | 59 | lxlite $@ /x- /b-
|
|---|
| [980] | 60 | !endif
|
|---|
| [236] | 61 |
|
|---|
| 62 | !endif
|
|---|
| 63 |
|
|---|
| [691] | 64 | lxlite:: $(BASE).exe .symbolic .explicit
|
|---|
| [1259] | 65 | !ifndef DEBUG
|
|---|
| [310] | 66 | lxlite /x- /b- $?
|
|---|
| [980] | 67 | !endif
|
|---|
| [310] | 68 |
|
|---|
| [691] | 69 | clean:: .symbolic .explicit
|
|---|
| [236] | 70 | -del $(BASE).exe
|
|---|
| 71 | -del $(BASE).lrf
|
|---|
| 72 | -del $(BASE).map
|
|---|
| 73 | -del $(BASE).obj
|
|---|
| 74 | -del $(BASE).res
|
|---|
| [1576] | 75 | -del $(BASE).sym
|
|---|
| 76 | -del $(BASE).xqs
|
|---|
| [236] | 77 |
|
|---|
| [9] | 78 | # The end
|
|---|