source: trunk/makefile_pre.mk@ 706

Last change on this file since 706 was 706, checked in by Gregg Young, 18 years ago

I changed the debug compiler flags to d2 so I could tell if it was really doing a debug build

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1# makefile_pre.mk - common makefile prefix settings for all makefiles
2# $Id: makefile_pre.mk 706 2007-06-24 20:31:05Z gyoung $
3
4# 01 Sep 06 SHL Adjust .res case
5# 02 Jun 07 SHL Convert to OpenWatcom
6
7CC = wcc386
8LINK = wlink
9
10# fixme for wrc to build working .res
11# fixme for wrc to not clobber bldlevel strings
12USE_WRC = 0
13
14!if $(USE_WRC)
15RC = wrc
16!else
17RC = rc
18!endif
19
20# Some flags are order dependent - see OpenWatcom docs
21# -bc console app
22# -bd build target is a Dynamic Link Library (DLL) (see bd)
23# -bg gui app with WinMain entry point
24# -bm multithread libs
25# -bt=os2 target
26# -d2 full debug
27# -d3 full debug w/unref
28# -hd dwarf
29# -j signed char
30# -mf flat
31# -olinars optimze loops, inline, e(n)able fp recip, relax (a)lias, reordering, space
32# -s disable stack checks
33# -sg generate calls to grow the stack
34# -st touch stack through SS first
35# -wcd14 no reference to symbol
36# -wcd726 no reference to formal parameter
37# -wx max warnings
38# -zfp disable fs use
39# -zgp disable gs use
40# -zp4 align 4
41# -zq quiet
42
43!ifdef %DEBUG
44CFLAGS = -bt=os2 -mf -bm -d2 -olirs -s -j -wx -zfp -zgp -zq -hd
45!else
46CFLAGS = -bt=os2 -mf -bm -d1 -olirs -s -j -wx -zfp -zgp -zq -hd
47!endif
48
49!ifdef %DEBUG
50LFLAGS = sys os2v2_pm op quiet op verbose op cache op caseexact op map debug dwarf all
51!else
52LFLAGS = sys os2v2_pm op quiet op verbose op cache op caseexact op map
53!endif
54
55# rc Includes can be in current director or dll subdirectory
56!if $(USE_WRC)
57# Pass 1 flags
58RCFLAGS = -r -i=dll -ad
59# Pass 2 flags
60RCFLAGS2 =-ad
61!else
62RCFLAGS = -r -i dll
63RCFLAGS2 = -x2
64!endif
65
66.SUFFIXES:
67.SUFFIXES: .obj .c .res .rc .ipf
68
69!if $(USE_WRC)
70.rc.res: .AUTODEPEND
71 $(RC) $(RCFLAGS) $*.rc
72!else
73.rc.res:
74 $(RC) $(RCFLAGS) $*.rc
75 ren $*.res $*.res
76!endif
77
78.c.obj: .AUTODEPEND
79 $(CC) $(CFLAGS) $*.c
80
81# The end
Note: See TracBrowser for help on using the repository browser.