source: trunk/makefile_post.mk@ 1908

Last change on this file since 1908 was 1890, checked in by Steven Levine, 6 years ago

Add PMPRINTF enable support to makefiles.
Correct PMPRINTF debug macro enables in sources.

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