]> git.saurik.com Git - wxWidgets.git/blob - src/makeb32.env
857e503f62b1d0c12d0f952719d09726ee99114a
[wxWidgets.git] / src / makeb32.env
1 # Common settings for Borland 32-bit compilation (makefile.b32 files)
2
3 !if "$(RM)" == ""
4 RM= erase
5 !endif
6
7 WXDIR = $(WXWIN)
8 CFG = $(WXDIR)\src\msw\wxw32
9
10 BCCDIR=$(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
16 ARCHINCDIR=$(WXDIR)\lib\msw
17 ARCHSETUPH=$(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
23 WXLIBDIR = $(WXDIR)\lib
24 WXLIBDIR2 = $(WXDIR)\contrib\lib
25 WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc;$(WXDIR)\src\regex;
26 WIN95FLAG = -D__WIN95__ -D__WINDOWS__
27 RFLAGS = -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
33 LINK=ilink32
34 #LINK=tlink32
35 !endif
36
37 !ifndef FINAL
38 FINAL=0
39 !endif
40
41 !ifndef WXMAKINGDLL
42 WXMAKINGDLL=0
43 !endif
44
45 !if "$(FINAL)" == "1"
46 OPT = -O2
47 DEBUG_FLAGS = -DUSE_DEFINE
48 LINKDEBUGFLAGS=
49 !else
50 OPT = -Od
51 DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE
52 LINKDEBUGFLAGS=/v
53 !endif
54
55 # allow to use debugger but no wxDebugging functions
56 !if "$(FINAL)" == "hybrid"
57 OPT = -Od
58 DEBUG_FLAGS= -v
59 LINKDEBUGFLAGS=/v
60 !endif
61
62 !ifndef DLL
63 DLL=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"
81 WXLIBNAME=wx32
82 !else
83 WXLIBNAME=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"
89 USE_UNIV="UNIV"
90 CFG=$(CFG)v
91 WXLIBNAME=$(WXLIBNAME)v
92 ARCHINCDIR=$(ARCHINCDIR)v
93 SETUPSRCDIR=$(WXDIR)\include\wx\univ
94 PORT=__WXUNIVERSAL__
95 !else
96 USE_UNIV=""
97 PORT=__WXMSW__
98 SETUPSRCDIR=$(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"
109 WXLIBNAME=$(WXLIBNAME)h
110 CFG=$(CFG)h
111 !endif
112
113 !if "$(FINAL)" == "0"
114 WXLIBNAME=$(WXLIBNAME)d
115 CFG=$(CFG)d
116 !endif
117
118 !if "$(wxUSE_GUI)" == "0"
119 WXLIBNAME=$(WXLIBNAME)b
120 CFG=$(CFG)b
121 CPPFLAGS=-DwxUSE_GUI=0
122 !endif
123
124 !if "$(WXMAKINGDLL)" != "1" && "$(WXUSINGDLL)" != "1"
125 WXLIBNAME=$(WXLIBNAME)s
126 !endif
127
128 !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1"
129 INCEXT=dll$(INCEXT)
130 !endif
131
132 !ifndef WXLIBDIR
133 WXLIBDIR=$(WXDIR)\lib
134 !endif
135
136 WXLIB=$(WXLIBDIR)\$(WXLIBNAME).lib
137 WXDLL=$(WXLIBDIR)\$(WXLIBNAME).dll
138
139 !if "$(WXMAKINGDLL)" == "1"
140 DLL_FLAGS= -DWXMAKINGDLL=1 -D_RTLDLL
141 !else
142
143 !if "$(WXUSINGDLL)" == "1"
144 DLL_FLAGS= -DWXUSINGDLL=1 -D_RTLDLL
145 !else
146 DLL_FLAGS=
147 !endif
148
149 !endif
150
151 !if "$(WXBUILDDLL)" == "1"
152 LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS)
153 !endif
154
155 CFG=$(CFG).cfg
156 CPPFLAGS=$(CPPFLAGS) $(DLL_FLAGS) @$(CFG) $(EXTRACPPFLAGS)
157
158 DUMMY=dummy
159
160 SRCSUFF = cpp
161 OBJSUFF = obj
162
163 WAITFLAG = /w
164
165 .$(SRCSUFF).obj:
166 bcc32 $(CPPFLAGS) -c {$< }
167
168 .c.obj:
169 bcc32 $(CPPFLAGS) -P- -c {$< }