1 | # makefile_post.mk - common makefile suffix settings for all makefiles
|
---|
2 | # $Id: makefile_post.mk 1730 2014-02-18 00:12:44Z jbs $
|
---|
3 |
|
---|
4 | # Copyright (c) 2002, 2012 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 | # 25 Jan 12 SHL Renamae LOW -> NOHIGHMEM and allow set from enviroment
|
---|
19 | # 17 Jan 14 JBS Ticket 500: Stop setting exe objects to high-memory
|
---|
20 |
|
---|
21 | !ifndef MAKERES
|
---|
22 |
|
---|
23 | # Build executable
|
---|
24 | # Common parameters go in .lrf
|
---|
25 | # Executable specific paramters go in .def
|
---|
26 | # Put 32-bit data in high memoryt unless overridden
|
---|
27 |
|
---|
28 | !ifndef NOHIGHMEM
|
---|
29 | !ifdef %NOHIGHMEM
|
---|
30 | NOHIGHMEM=$(%NOHIGHMEM)
|
---|
31 | !endif
|
---|
32 | !endif
|
---|
33 |
|
---|
34 | $(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
|
---|
35 | @echo Linking $(BASE).exe
|
---|
36 | $(LINK) @$(BASE).lrf @$(BASE).def
|
---|
37 | @echo.
|
---|
38 | @echo Attaching resources to $@
|
---|
39 | @echo.
|
---|
40 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
---|
41 | # !ifndef NOHIGHMEM
|
---|
42 | # !exehdr /highmem:3 $@
|
---|
43 | # !endif
|
---|
44 |
|
---|
45 | # 2012-01-25 SHL fixme to be gone - does not undefine
|
---|
46 | # NOHIGHMEM =
|
---|
47 |
|
---|
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 |
|
---|
55 | $(BASE).xqs: $(BASE).map .explicit
|
---|
56 | @echo Processing: $?
|
---|
57 | -mapxqs $?
|
---|
58 |
|
---|
59 | $(BASE).sym: $(BASE).map .explicit
|
---|
60 | @echo Processing: $?
|
---|
61 | -perl debugtools\mapsymw.pl $?
|
---|
62 |
|
---|
63 | !else
|
---|
64 |
|
---|
65 | # Replace resources
|
---|
66 | $(BASE).exe: $(BASE).res .explicit
|
---|
67 | @if not exist $@ echo $@ missing
|
---|
68 | !ifndef DEBUG
|
---|
69 | lxlite $@ /x+ /b-
|
---|
70 | lxlite $@ /c:minstub
|
---|
71 | !endif
|
---|
72 | @echo.
|
---|
73 | @echo Attaching resources to $@
|
---|
74 | @echo.
|
---|
75 | $(RC) $(RCFLAGS2) $(BASE).res $@
|
---|
76 | !ifndef DEBUG
|
---|
77 | lxlite $@ /x- /b-
|
---|
78 | !endif
|
---|
79 |
|
---|
80 | !endif
|
---|
81 |
|
---|
82 | lxlite:: $(BASE).exe .symbolic .explicit
|
---|
83 | !ifndef DEBUG
|
---|
84 | lxlite /x- /b- $?
|
---|
85 | !endif
|
---|
86 |
|
---|
87 | clean:: .symbolic .explicit
|
---|
88 | -del $(BASE).exe
|
---|
89 | -del $(BASE).lrf
|
---|
90 | -del $(BASE).map
|
---|
91 | -del $(BASE).obj
|
---|
92 | -del $(BASE).res
|
---|
93 | -del $(BASE).sym
|
---|
94 | -del $(BASE).xqs
|
---|
95 |
|
---|
96 | # The end
|
---|