source: trunk/makefile_post.mk@ 1608

Last change on this file since 1608 was 1597, checked in by Gregg Young, 14 years ago

Added comments for last commit.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1# makefile_post.mk - common makefile suffix settings for all makefiles
2# $Id: makefile_post.mk 1597 2011-07-04 19:16:27Z 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 !exehdr /hi:3 $@
33
34$(BASE).lrf: $(__MAKEFILES__) .explicit
35 @%write $^@ $(LFLAGS)
36 @%append $^@ name $(BASE)
37 @%append $^@ file $(BASE).obj
38 @%append $^@ library dll\fm3dll.lib
39 @%append $^@ library os2386.lib
40
41$(BASE).xqs: $(BASE).map .explicit
42 @echo Processing: $?
43 -mapxqs $?
44
45$(BASE).sym: $(BASE).map .explicit
46 @echo Processing: $?
47 -perl debugtools\mapsymw.pl $?
48
49!else
50
51# Replace resources
52$(BASE).exe: $(BASE).res .explicit
53 @if not exist $@ echo $@ missing
54!ifndef DEBUG
55 lxlite $@ /x+ /b-
56 lxlite $@ /c:minstub
57!endif
58 @echo.
59 @echo Attaching resources to $@
60 @echo.
61 $(RC) $(RCFLAGS2) $(BASE).res $@
62!ifndef DEBUG
63 lxlite $@ /x- /b-
64!endif
65
66!endif
67
68lxlite:: $(BASE).exe .symbolic .explicit
69!ifndef DEBUG
70 lxlite /x- /b- $?
71!endif
72
73clean:: .symbolic .explicit
74 -del $(BASE).exe
75 -del $(BASE).lrf
76 -del $(BASE).map
77 -del $(BASE).obj
78 -del $(BASE).res
79 -del $(BASE).sym
80 -del $(BASE).xqs
81
82# The end
Note: See TracBrowser for help on using the repository browser.