source: trunk/makefile_pre.mk@ 719

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

Change DEBUG semantics to ifdef/ifndef

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