1 | # makefile_post.mk - common makefile suffix settings for all makefiles
|
---|
2 | # $Id: makefile_post.mk 1624 2011-08-20 20:28:56Z gyoung $
|
---|
3 |
|
---|
4 | # Copyright (c) 2002, 2009 Steven H. Levine
|
---|
5 |
|
---|
6 | # 16 Aug 05 SHL Clean up
|
---|
7 | # 16 Apr 06 SHL Add lxlite target
|
---|
8 | # 02 Jun 07 SHL Convert to OpenWatcom
|
---|
9 | # 23 Feb 08 JBS Add support for building SYM files (Ticket 226)
|
---|
10 | # 25 Oct 08 JBS Rework DEBUG usage to match what C code expects
|
---|
11 | # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
|
---|
12 | # 19 Nov 08 JBS Ticket 297: Removed bldlevel calls
|
---|
13 | # 14 Dec 08 SHL Drop EXCEPTQ support - will not be used
|
---|
14 | # 24 Jul 09 SHL Comments
|
---|
15 | # 21 Jun 11 GKY Add exceptq .xqs support
|
---|
16 | # 21 Jun 11 GKY Make high memory builds the default resources only for exes
|
---|
17 | # 04 Jul 11 GKY Make xqs files an explicit target so they will be rebuild if lost somehow.
|
---|
18 |
|
---|
19 | !ifndef MAKERES
|
---|
20 |
|
---|
21 | # Build executable
|
---|
22 | # Common parameters go in .lrf
|
---|
23 | # Executable specific paramters go in .def
|
---|
24 |
|
---|
25 | $(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
|
---|
26 | @echo Linking $(BASE).exe
|
---|
27 | $(LINK) @$(BASE).lrf @$(BASE).def
|
---|
28 | @echo.
|
---|
29 | @echo Attaching resources to $@
|
---|
30 | @echo.
|
---|
31 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
---|
32 | !ifndef LOW
|
---|
33 | !exehdr /hi:3 $@
|
---|
34 | !endif
|
---|
35 |
|
---|
36 | LOW =
|
---|
37 |
|
---|
38 | $(BASE).lrf: $(__MAKEFILES__) .explicit
|
---|
39 | @%write $^@ $(LFLAGS)
|
---|
40 | @%append $^@ name $(BASE)
|
---|
41 | @%append $^@ file $(BASE).obj
|
---|
42 | @%append $^@ library dll\fm3dll.lib
|
---|
43 | @%append $^@ library os2386.lib
|
---|
44 |
|
---|
45 | $(BASE).xqs: $(BASE).map .explicit
|
---|
46 | @echo Processing: $?
|
---|
47 | -mapxqs $?
|
---|
48 |
|
---|
49 | $(BASE).sym: $(BASE).map .explicit
|
---|
50 | @echo Processing: $?
|
---|
51 | -perl debugtools\mapsymw.pl $?
|
---|
52 |
|
---|
53 | !else
|
---|
54 |
|
---|
55 | # Replace resources
|
---|
56 | $(BASE).exe: $(BASE).res .explicit
|
---|
57 | @if not exist $@ echo $@ missing
|
---|
58 | !ifndef DEBUG
|
---|
59 | lxlite $@ /x+ /b-
|
---|
60 | lxlite $@ /c:minstub
|
---|
61 | !endif
|
---|
62 | @echo.
|
---|
63 | @echo Attaching resources to $@
|
---|
64 | @echo.
|
---|
65 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
---|
66 | !ifndef DEBUG
|
---|
67 | lxlite $@ /x- /b-
|
---|
68 | !endif
|
---|
69 |
|
---|
70 | !endif
|
---|
71 |
|
---|
72 | lxlite:: $(BASE).exe .symbolic .explicit
|
---|
73 | !ifndef DEBUG
|
---|
74 | lxlite /x- /b- $?
|
---|
75 | !endif
|
---|
76 |
|
---|
77 | clean:: .symbolic .explicit
|
---|
78 | -del $(BASE).exe
|
---|
79 | -del $(BASE).lrf
|
---|
80 | -del $(BASE).map
|
---|
81 | -del $(BASE).obj
|
---|
82 | -del $(BASE).res
|
---|
83 | -del $(BASE).sym
|
---|
84 | -del $(BASE).xqs
|
---|
85 |
|
---|
86 | # The end
|
---|