]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | # Common settings for Borland 32-bit compilation (makefile.b32 files) |
2 | ||
3b50432a GT |
3 | !if "$(RM)" == "" |
4 | RM= erase | |
5 | !endif | |
6 | ||
2bda0e17 | 7 | WXDIR = $(WXWIN) |
8c3288a7 | 8 | CFG = $(WXDIR)\src\msw\wxw32 |
4deae7a0 | 9 | |
6b6fc9b0 VZ |
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 | ||
4deae7a0 VZ |
16 | ARCHINCDIR=$(WXDIR)\lib\msw |
17 | ARCHSETUPH=$(ARCHINCDIR)\wx\setup.h | |
2b5f62a0 VZ |
18 | #see below for SETUPSRCDIR |
19 | ||
4deae7a0 | 20 | |
b2cf617c JS |
21 | # Using a config file isn't compatible across all BC++ versions |
22 | # LNKCFG=$(WXDIR)\src\msw\bclnk32.cfg | |
2bda0e17 | 23 | WXLIBDIR = $(WXDIR)\lib |
b14391d1 | 24 | WXLIBDIR2 = $(WXDIR)\contrib\lib |
3b50432a | 25 | WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc;$(WXDIR)\src\regex; |
34138703 | 26 | WIN95FLAG = -D__WIN95__ -D__WINDOWS__ |
cbf65655 | 27 | RFLAGS = -i$(WXDIR)\include;$(WXDIR)\src |
2bda0e17 | 28 | |
8e97b17b VZ |
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 | |
a6e2b3a8 | 33 | LINK=ilink32 |
b2cf617c | 34 | #LINK=tlink32 |
8e97b17b | 35 | !endif |
c3b177ae | 36 | |
2bda0e17 KB |
37 | !ifndef FINAL |
38 | FINAL=0 | |
39 | !endif | |
40 | ||
8c3288a7 CE |
41 | !ifndef WXMAKINGDLL |
42 | WXMAKINGDLL=0 | |
43 | !endif | |
44 | ||
cc77c86d | 45 | !if "$(FINAL)" == "1" |
2bda0e17 | 46 | OPT = -O2 |
40e1a9c0 | 47 | DEBUG_FLAGS = -DUSE_DEFINE |
cc77c86d CE |
48 | LINKDEBUGFLAGS= |
49 | !else | |
50 | OPT = -Od | |
51 | DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE | |
52 | LINKDEBUGFLAGS=/v | |
2bda0e17 | 53 | !endif |
2bda0e17 | 54 | |
8c3288a7 CE |
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 | ||
c740f496 GL |
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 | ||
cc77c86d CE |
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 | ||
2b5f62a0 VZ |
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 | |
c740f496 | 100 | |
8c3288a7 CE |
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" | |
cc77c86d | 109 | WXLIBNAME=$(WXLIBNAME)h |
8c3288a7 CE |
110 | CFG=$(CFG)h |
111 | !endif | |
112 | ||
113 | !if "$(FINAL)" == "0" | |
cc77c86d | 114 | WXLIBNAME=$(WXLIBNAME)d |
8c3288a7 | 115 | CFG=$(CFG)d |
cc77c86d CE |
116 | !endif |
117 | ||
118 | !if "$(wxUSE_GUI)" == "0" | |
119 | WXLIBNAME=$(WXLIBNAME)b | |
8c3288a7 | 120 | CFG=$(CFG)b |
cc77c86d CE |
121 | CPPFLAGS=-DwxUSE_GUI=0 |
122 | !endif | |
123 | ||
8c3288a7 CE |
124 | !if "$(WXMAKINGDLL)" != "1" && "$(WXUSINGDLL)" != "1" |
125 | WXLIBNAME=$(WXLIBNAME)s | |
126 | !endif | |
127 | ||
cc77c86d CE |
128 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" |
129 | INCEXT=dll$(INCEXT) | |
130 | !endif | |
c740f496 | 131 | |
cc77c86d CE |
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 | |
c740f496 GL |
142 | |
143 | !if "$(WXUSINGDLL)" == "1" | |
f6bcfd97 | 144 | DLL_FLAGS= -DWXUSINGDLL=1 -D_RTLDLL |
c740f496 GL |
145 | !else |
146 | DLL_FLAGS= | |
c740f496 GL |
147 | !endif |
148 | ||
149 | !endif | |
150 | ||
151 | !if "$(WXBUILDDLL)" == "1" | |
741f371c | 152 | LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS) |
c740f496 GL |
153 | !endif |
154 | ||
8c3288a7 | 155 | CFG=$(CFG).cfg |
e438abe5 | 156 | CPPFLAGS=$(CPPFLAGS) $(DLL_FLAGS) @$(CFG) $(EXTRACPPFLAGS) |
c740f496 | 157 | |
2bda0e17 KB |
158 | DUMMY=dummy |
159 | ||
160 | SRCSUFF = cpp | |
161 | OBJSUFF = obj | |
162 | ||
c09f2879 VZ |
163 | WAITFLAG = /w |
164 | ||
2bda0e17 | 165 | .$(SRCSUFF).obj: |
cc77c86d | 166 | bcc32 $(CPPFLAGS) -c {$< } |
2bda0e17 KB |
167 | |
168 | .c.obj: | |
cc77c86d | 169 | bcc32 $(CPPFLAGS) -P- -c {$< } |