]> git.saurik.com Git - wxWidgets.git/blame - src/makewat.env
no message
[wxWidgets.git] / src / makewat.env
CommitLineData
2bda0e17
KB
1# File: makewat.env
2# Purpose: Watcom environments for wxWindows makefiles.
3# Author: Julian Smart and others
4#
5# The main things to change are:
6#
7# WATCOM: set to where the compiler is installed
8# WXDIR: set to where the wxWindows is installed
9# MODE: set to windows [16 bit windows], nt [win32s], or win386 [32-bit non-WIN32]
10
11FINAL=0
12WATCOMDIR=$(%WATCOM)
13#.EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def
14
15# Set this to win386 if compiling under WIN386 mode, or
16# to windows for normal 16-bit Windows, nt if compiling for WIN32s/NT
17MODE= nt # windows
18
19WXDIR = c:\wx
20WXINC = $(WXDIR)\include\msw
21WXBASEINC = $(WXDIR)\include\base
22
23# Suffixes
24OBJSUFF=obj
25SRCSUFF=cpp
26
b2aef89b 27WXDEBUG=0
2bda0e17
KB
28
29!ifneq NOPRECOMP 1
30PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch
31!endif
32
33RC = wrc
34
35!ifeq MODE win386
36
37##### WIN386 OPTIONS
38
39# Set LEVEL to 386 if using 32-bit compilation
40LEVEL = 386
41CCC = wpp$(LEVEL)
42CC = wcc$(LEVEL)
43OS_TARGET = win386
44MODEL =
45LINKOPTION = win386
46BINDCOMMAND = wbind
47WATLIBDIR = $(WATCOMDIR)\lib386\win
48MINDATA = option mindata=100K
49MAXDATA = option maxdata=100K
50STACK = option stack=64k
51EXTRALIBS = $(WXDIR)\contrib\ctl3d\ctl3d32.obj
52IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\win
53RESFLAGS1 = -r -bt=windows /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
54RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
55DEBUGINFO = debug all
56
2049ba38
KB
57#CPPFLAGS = /zw /w1 /zq /d2 /d__WIN386__ /zt4 $(MODEL) /d__WXMSW__
58CPPFLAGS = /zw /w1 /zq /d1 /d__WIN386__ $(MODEL) $(PRECOMP) /d__WXMSW__ $(EXTRACPPFLAGS)
2bda0e17
KB
59
60!endif
61#### END WIN386 MODE
62
63!ifeq MODE windows
64
65##### 16-BIT WINDOWS OPTIONS
66
67# Set LEVEL to 386 if using 32-bit compilation
68LEVEL =
69CCC = wpp$(LEVEL)
70CC = wcc$(LEVEL)
71OS_TARGET = windows
72MODEL =/ml
73LINKOPTION = windows
74BINDCOMMAND = echo
75WATLIBDIR = $(WATCOMDIR)\lib286\win
76MINDATA =
77MAXDATA =
78STACK =
79EXTRALIBS=$(WATLIBDIR)\shell.lib $(WATLIBDIR)\ddeml.lib $(WATLIBDIR)\ctl3d.lib $(WATLIBDIR)\commdlg.lib $(WATLIBDIR)\mmsystem.lib
80IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa
81RESFLAGS1 = -r -bt=windows -i=$(WXINC) -i=$(WXDIR)\contrib\fafa
82RESFLAGS2 = -R
83DEBUGINFO = debug all
84
85#-i=$(WXDIR)\contrib\itsybits
86
87# Note: I've added the data threshold (/zt4) for 16-bit operation,
88# or we get link failure (TEXT segment overflow). Is this OK for
89# 32-bit mode also? -- JACS
90# An alternative might be /zc (put string literals in code segment).
2049ba38
KB
91#CPPFLAGS = /zw /w1 /zq /d1 /zt4 $(MODEL) /d__WXMSW__
92CPPFLAGS = /zw /w2 /zq /d1 $(MODEL) $(PRECOMP) /d__WXMSW__ $(EXTRACPPFLAGS)
2bda0e17
KB
93
94!endif
95#### END WINDOWS MODE
96
97!ifeq MODE nt
98
99##### NT OPTIONS
100
101LEVEL = 386
102CCC = wpp$(LEVEL)
103CC = wcc$(LEVEL)
104OS_TARGET = nt_win
105MODEL =
106# If you use win95, assumptions will be made about Win95 icon format etc.
107# so nt_win is probably better for simultaneous Win32s/Win95/NT operation.
108LINKOPTION = nt_win # win95
109BINDCOMMAND = wrc
110WATLIBDIR = $(WATCOMDIR)\lib386\nt
111MINDATA =
112MAXDATA =
113STACK = option stack=64k
114EXTRALIBS = $(WATLIBDIR)\ctl3d32.lib $(WATLIBDIR)\odbc32.lib
115IFLAGS = -i=$(WXINC) -i=$(WXBASEINC) -i=$(WXDIR)\contrib\fafa -i=$(%watcom)\h;$(%watcom)\h\nt
116RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
117RESFLAGS2 = -R $(name) /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa
118DEBUGINFO = debug all # Linking: comment out if operating in a non-debuggable environment
119
120#-i=$(WXDIR)\contrib\itsybits
121
122# Here are some possible optimization flags:
123# /5r Pentium timings
124# /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present
125# /ox Standard optimizations
126# /or Reordering for Pentium timings (included in /ox)
127# The Watcom-recommended flags for optimum Pentium speed are:
128# /oneatx /zp4 /5 /fpi87 /fp5
129
b2aef89b 130OPTFLAGS=/ox /5r # /DWXDEBUG=1
2bda0e17
KB
131
132# /d1 for line numbers only: anything else produces an enormous wx32.lib
2049ba38 133CPPFLAGS = /bt=nt /w1 /D__WIN32__ /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) /d1 /d__WXMSW__ $(EXTRACPPFLAGS)
2bda0e17
KB
134
135!endif
136#### END NT MODE
137
138.cpp.obj: # $< # .AUTODEPEND
139 *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
140
141# %create tmp.lbc
142# @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $<
143# echo $<
144# $(CCC) @tmp.lbc
145
146.c.obj: # $< # .AUTODEPEND
147 *$(CC) $(CPPFLAGS) $(IFLAGS) $<
148
149# This doesn't work for wcc
150# %create tmp.lbc
151# @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $<
152# echo $<
153# $(CC) @tmp.lbc
154
155dummy: .SYMBOLIC
156 @echo Please give a target for wxWin makefiles: the usual one is 'all'.
157
158erasepch: .SYMBOLIC
159 -erase $(WXDIR)\src\msw\watcom.pch