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