source: trunk/makefile_post.mk@ 1672

Last change on this file since 1672 was 1661, checked in by Steven Levine, 14 years ago

Rework makefiles to allow highmem suppress from command line
See NOHIGHMEM

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1# makefile_post.mk - common makefile suffix settings for all makefiles
2# $Id: makefile_post.mk 1661 2012-01-26 00:00:12Z stevenhl $
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
20!ifndef MAKERES
21
22# Build executable
23# Common parameters go in .lrf
24# Executable specific paramters go in .def
25# Put 32-bit data in high memoryt unless overridden
26
27!ifndef NOHIGHMEM
28!ifdef %NOHIGHMEM
29NOHIGHMEM=$(%NOHIGHMEM)
30!endif
31!endif
32
33$(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
34 @echo Linking $(BASE).exe
35 $(LINK) @$(BASE).lrf @$(BASE).def
36 @echo.
37 @echo Attaching resources to $@
38 @echo.
39 $(RC) $(RCFLAGS2) $(BASE).res $@
40!ifndef NOHIGHMEM
41 !exehdr /highmem:3 $@
42!endif
43
44# 2012-01-25 SHL fixme to be gone - does not undefine
45# NOHIGHMEM =
46
47$(BASE).lrf: $(__MAKEFILES__) .explicit
48 @%write $^@ $(LFLAGS)
49 @%append $^@ name $(BASE)
50 @%append $^@ file $(BASE).obj
51 @%append $^@ library dll\fm3dll.lib
52 @%append $^@ library os2386.lib
53
54$(BASE).xqs: $(BASE).map .explicit
55 @echo Processing: $?
56 -mapxqs $?
57
58$(BASE).sym: $(BASE).map .explicit
59 @echo Processing: $?
60 -perl debugtools\mapsymw.pl $?
61
62!else
63
64# Replace resources
65$(BASE).exe: $(BASE).res .explicit
66 @if not exist $@ echo $@ missing
67!ifndef DEBUG
68 lxlite $@ /x+ /b-
69 lxlite $@ /c:minstub
70!endif
71 @echo.
72 @echo Attaching resources to $@
73 @echo.
74 $(RC) $(RCFLAGS2) $(BASE).res $@
75!ifndef DEBUG
76 lxlite $@ /x- /b-
77!endif
78
79!endif
80
81lxlite:: $(BASE).exe .symbolic .explicit
82!ifndef DEBUG
83 lxlite /x- /b- $?
84!endif
85
86clean:: .symbolic .explicit
87 -del $(BASE).exe
88 -del $(BASE).lrf
89 -del $(BASE).map
90 -del $(BASE).obj
91 -del $(BASE).res
92 -del $(BASE).sym
93 -del $(BASE).xqs
94
95# The end
Note: See TracBrowser for help on using the repository browser.