source: trunk/makefile_pre.mk@ 718

Last change on this file since 718 was 714, checked in by Steven Levine, 18 years ago

Use same CFLAGS for all builds

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