source: trunk/makefile_pre.mk@ 908

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

Avoid out of memory traps in Compare Directories
Rework Compare Directories progress display for 2 second update rate
Start refactoring to reduce dependence on fm3dll.h
Add timer services (IsITimerExpired etc.)

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