]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/makeb32.env
compilation fix after last checkin (missing header)
[wxWidgets.git] / src / makeb32.env
... / ...
CommitLineData
1# Common settings for Borland 32-bit compilation (makefile.b32 files)
2
3!if "$(RM)" == ""
4RM= del
5!endif
6
7BORLAND_SUFFIX=bc
8DEBUG_SUFFIX=
9
10MAKEFLAGS=FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL) OUTPUTDIR=$(OUTPUTDIR) EXEDIR=$(EXEDIR)
11
12WXDIR = $(WXWIN)
13CFG = wxw32
14
15!ifndef OUTPUTDIR
16OBJ_PATH=$(WXDIR)\BORL
17OUTPUTDIR=$(WXDIR)\BORL
18!else
19OBJ_PATH=$(OUTPUTDIR)
20!endif
21
22!ifndef BCCDIR
23BCCDIR=$(MAKEDIR)\..
24!endif
25
26!if "$(BCCDIR)" == "\.."
27!error Your Borland compiler does not define MAKEDIR. Pleasedefine the BCCDIR variable in makeb32.env line 10, e.g. BCCDIR=d:\bc4
28!endif
29
30ARCHINCDIR=$(WXDIR)\lib\$(BORLAND_SUFFIX)
31ARCHSETUPH=$(ARCHINCDIR)\wx\setup.h
32#see below for SETUPSRCDIR
33
34!ifndef WXLIBDIR
35WXLIBDIR = $(WXDIR)\lib
36!endif
37
38WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc;$(WXDIR)\src\regex;
39WIN95FLAG = -D__WIN95__ -D__WINDOWS__
40RFLAGS = -i$(WXDIR)\include;$(WXDIR)\src
41
42# This should be changed to tlink32 if ilink32 is not available.
43# Ilink32 is available on BC++ 5.02 and above, and all
44# versions of C++ Builder.
45!ifndef LINK
46LINK=ilink32
47#LINK=tlink32
48!endif
49
50!ifndef FINAL
51FINAL=0
52!endif
53
54!ifndef WXMAKINGDLL
55WXMAKINGDLL=0
56!endif
57
58!if "$(FINAL)" == "1"
59OPT = -O2
60DEBUG_FLAGS = -DUSE_DEFINE
61LINKDEBUGFLAGS=
62!else
63OPT = -Od
64DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE
65LINKDEBUGFLAGS=/v
66!endif
67
68# allow to use debugger but no wxDebugging functions
69!if "$(FINAL)" == "hybrid"
70OPT = -Od
71DEBUG_FLAGS= -v
72LINKDEBUGFLAGS=/v
73!endif
74
75!ifndef DLL
76DLL=0
77!else
78DLL=1
79WXMAKINGDLL=1
80!endif
81
82# Target WXMAKINGDLL WXUSINGDLL WXBUILDDLL
83# wxWin DLL 1 0 1
84# wxWin STATIC 0 0 0
85# App use wxWin DLL 0 1 0
86# DLL use wxWin DLL 0 1 1
87# DLL use wxWin STATIC 0 0 1
88#
89
90# Determine the library name depending on the options, to allow
91# multiple versions to coexist.
92# Note that the clean target will only delete the appropriate .lib for the current
93# options and all the obj files, and note that you must delete the obj files if you
94# change the options so that they are compiled using the correct ones.
95
96WXLIBNAME=wx25
97
98
99## Use this if you want to use the UNIV controls set rather than the native ones
100## make -f makefile.b32 WXUSINGUNIV=1
101!if "$(WXUSINGUNIV)" == "1"
102USE_UNIV="UNIV"
103BORLAND_SUFFIX=$(BORLAND_SUFFIX)v
104ARCHINCDIR=$(ARCHINCDIR)v
105SETUPSRCDIR=$(WXDIR)\include\wx\univ
106PORT=__WXUNIVERSAL__
107!else
108USE_UNIV=""
109PORT=__WXMSW__
110SETUPSRCDIR=$(WXDIR)\include\wx\msw
111!endif
112
113#unicode builds handled inside setup.h
114
115#a hybrid , does not set __WXDEBUG__ but sets -v (see above)
116!if "$(FINAL)" == "hybrid"
117DEBUG_SUFFIX=$(DEBUG_SUFFIX)h
118!endif
119
120!if "$(FINAL)" == "0"
121DEBUG_SUFFIX=$(DEBUG_SUFFIX)d
122!endif
123
124!if "$(wxUSE_GUI)" == "0"
125BORLAND_SUFFIX=$(BORLAND_SUFFIX)b
126CPPFLAGS=-DwxUSE_GUI=0
127!endif
128
129!if "$(WXMAKINGDLL)" != "1" && "$(WXUSINGDLL)" != "1"
130BORLAND_SUFFIX=$(BORLAND_SUFFIX)s
131!endif
132
133!if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
134INCEXT=dll$(INCEXT)
135!endif
136
137# final names determined here
138WXLIB=$(WXLIBDIR)\$(WXLIBNAME)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX).lib
139WXDLL=$(WXLIBDIR)\$(WXLIBNAME)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX).dll
140LIBTARGET=$(WXLIBDIR)\$(LIBTARGET)_bc$(DEBUG_SUFFIX).lib
141OBJ_PATH=$(OBJ_PATH)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX)
142
143!if "$(WXMAKINGDLL)" == "1"
144DLL_FLAGS= -DWXMAKINGDLL=1 -D_RTLDLL
145!else
146
147!if "$(WXUSINGDLL)" == "1"
148DLL_FLAGS= -DWXUSINGDLL=1 -D_RTLDLL
149!else
150DLL_FLAGS=
151!endif
152
153!endif
154
155!if "$(WXBUILDDLL)" == "1"
156LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS)
157!endif
158
159CFG=$(OBJ_PATH)\$(CFG).cfg
160CPPFLAGS=$(CPPFLAGS) $(DLL_FLAGS) @$(CFG) $(EXTRACPPFLAGS)
161
162DUMMY=dummy
163
164SRCSUFF = cpp
165OBJSUFF = obj
166
167WAITFLAG = /w
168
169.$(SRCSUFF).obj:
170 bcc32 $(CPPFLAGS) -c -n$(OBJ_PATH) {$< }
171
172.c.obj:
173 bcc32 $(CPPFLAGS) -P- -c -n$(OBJ_PATH) {$< }