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