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
RevLine 
[237]1# makefile_pre.mk - common makefile prefix settings for all makefiles
2# $Id: makefile_pre.mk 907 2008-01-06 07:26:17Z 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
[720]9# 04 Jul 07 SHL Pass DEBUG settings to sub-make
[842]10# 22 Sep 07 SHL Switch to 4 byte packing (-zp4)
[874]11# 26 Sep 07 SHL Support USE_WRC from environment
[903]12# 03 Jan 08 SHL Switch to wrc.exe default; support USE_RC from environment
[481]13
[691]14CC = wcc386
15LINK = wlink
[9]16
[903]17!ifndef USE_RC # if not defined on command line
18!ifdef %USE_RC # if defined in environment
19USE_RC = $(%USE_RC)
[874]20!else
[903]21USE_RC = 0
[714]22!endif
[874]23!endif
[691]24
[903]25!if $(USE_RC)
26RC = rc
27!else
[691]28RC = wrc
[237]29!endif
[9]30
[719]31# Keep this code in sync with dll\makefile
[720]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
[719]38!endif
39!endif
40
[691]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
[907]58# -we treat warnings as errors
[691]59# -wx max warnings
60# -zfp disable fs use
61# -zgp disable gs use
62# -zp4 align 4
63# -zq quiet
[9]64
[714]65# We always compile with debug info to avoid needed a full rebuild just to debug
[907]66CFLAGS = -bt=os2 -mf -bm -d2 -olirs -s -j -we -wx -zfp -zgp -zp4 -zq -hd
[9]67
[691]68LFLAGS = sys os2v2_pm op quiet op verbose op cache op caseexact op map
[719]69!ifdef DEBUG
70LFLAGS += debug dwarf all
[691]71!endif
[9]72
[691]73# rc Includes can be in current director or dll subdirectory
[903]74!if $(USE_RC)
75RCFLAGS = -r -i dll
76RCFLAGS2 = -x2
77!else
[691]78# Pass 1 flags
79RCFLAGS = -r -i=dll -ad
80# Pass 2 flags
81RCFLAGS2 =-ad
82!endif
83
[9]84.SUFFIXES:
[691]85.SUFFIXES: .obj .c .res .rc .ipf
[9]86
[903]87!if $(USE_RC)
[9]88.rc.res:
[691]89 $(RC) $(RCFLAGS) $*.rc
[481]90 ren $*.res $*.res
[903]91!else
92.rc.res: .AUTODEPEND
93 $(RC) $(RCFLAGS) $*.rc
[691]94!endif
[9]95
[691]96.c.obj: .AUTODEPEND
97 $(CC) $(CFLAGS) $*.c
[9]98
99# The end
Note: See TracBrowser for help on using the repository browser.