]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | # Common settings for Borland 32-bit compilation (makefile.b32 files) |
2 | ||
3b50432a | 3 | !if "$(RM)" == "" |
cc693a82 | 4 | RM= del |
3b50432a GT |
5 | !endif |
6 | ||
2cedc12a CE |
7 | BORLAND_SUFFIX=bc |
8 | DEBUG_SUFFIX= | |
9 | ||
cc693a82 CE |
10 | MAKEFLAGS=FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL) OUTPUTDIR=$(OUTPUTDIR) EXEDIR=$(EXEDIR) |
11 | ||
2bda0e17 | 12 | WXDIR = $(WXWIN) |
2cedc12a | 13 | CFG = wxw32 |
4deae7a0 | 14 | |
2cedc12a CE |
15 | !ifndef OUTPUTDIR |
16 | OBJ_PATH=$(WXDIR)\BORL | |
17 | OUTPUTDIR=$(WXDIR)\BORL | |
18 | !else | |
19 | OBJ_PATH=$(OUTPUTDIR) | |
20 | !endif | |
21 | ||
22 | !ifndef BCCDIR | |
6b6fc9b0 | 23 | BCCDIR=$(MAKEDIR)\.. |
2cedc12a | 24 | !endif |
6b6fc9b0 VZ |
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 | ||
2cedc12a | 30 | ARCHINCDIR=$(WXDIR)\lib\$(BORLAND_SUFFIX) |
4deae7a0 | 31 | ARCHSETUPH=$(ARCHINCDIR)\wx\setup.h |
2b5f62a0 VZ |
32 | #see below for SETUPSRCDIR |
33 | ||
2cedc12a | 34 | !ifndef WXLIBDIR |
2bda0e17 | 35 | WXLIBDIR = $(WXDIR)\lib |
2cedc12a CE |
36 | !endif |
37 | ||
3b50432a | 38 | WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc;$(WXDIR)\src\regex; |
34138703 | 39 | WIN95FLAG = -D__WIN95__ -D__WINDOWS__ |
cbf65655 | 40 | RFLAGS = -i$(WXDIR)\include;$(WXDIR)\src |
2bda0e17 | 41 | |
8e97b17b VZ |
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 | |
a6e2b3a8 | 46 | LINK=ilink32 |
b2cf617c | 47 | #LINK=tlink32 |
8e97b17b | 48 | !endif |
c3b177ae | 49 | |
2bda0e17 KB |
50 | !ifndef FINAL |
51 | FINAL=0 | |
52 | !endif | |
53 | ||
8c3288a7 CE |
54 | !ifndef WXMAKINGDLL |
55 | WXMAKINGDLL=0 | |
56 | !endif | |
57 | ||
cc77c86d | 58 | !if "$(FINAL)" == "1" |
2bda0e17 | 59 | OPT = -O2 |
40e1a9c0 | 60 | DEBUG_FLAGS = -DUSE_DEFINE |
cc77c86d CE |
61 | LINKDEBUGFLAGS= |
62 | !else | |
63 | OPT = -Od | |
64 | DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE | |
65 | LINKDEBUGFLAGS=/v | |
2bda0e17 | 66 | !endif |
2bda0e17 | 67 | |
8c3288a7 CE |
68 | # allow to use debugger but no wxDebugging functions |
69 | !if "$(FINAL)" == "hybrid" | |
70 | OPT = -Od | |
71 | DEBUG_FLAGS= -v | |
72 | LINKDEBUGFLAGS=/v | |
73 | !endif | |
74 | ||
c740f496 GL |
75 | !ifndef DLL |
76 | DLL=0 | |
2cedc12a CE |
77 | !else |
78 | DLL=1 | |
79 | WXMAKINGDLL=1 | |
c740f496 GL |
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 | ||
cc77c86d CE |
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 | ||
2cedc12a CE |
96 | WXLIBNAME=wx25 |
97 | ||
cc77c86d | 98 | |
2b5f62a0 VZ |
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" | |
102 | USE_UNIV="UNIV" | |
2cedc12a | 103 | BORLAND_SUFFIX=$(BORLAND_SUFFIX)v |
2b5f62a0 VZ |
104 | ARCHINCDIR=$(ARCHINCDIR)v |
105 | SETUPSRCDIR=$(WXDIR)\include\wx\univ | |
106 | PORT=__WXUNIVERSAL__ | |
107 | !else | |
108 | USE_UNIV="" | |
109 | PORT=__WXMSW__ | |
110 | SETUPSRCDIR=$(WXDIR)\include\wx\msw | |
111 | !endif | |
c740f496 | 112 | |
2cedc12a | 113 | #unicode builds handled inside setup.h |
8c3288a7 CE |
114 | |
115 | #a hybrid , does not set __WXDEBUG__ but sets -v (see above) | |
116 | !if "$(FINAL)" == "hybrid" | |
2cedc12a | 117 | DEBUG_SUFFIX=$(DEBUG_SUFFIX)h |
8c3288a7 CE |
118 | !endif |
119 | ||
120 | !if "$(FINAL)" == "0" | |
2cedc12a | 121 | DEBUG_SUFFIX=$(DEBUG_SUFFIX)d |
cc77c86d CE |
122 | !endif |
123 | ||
124 | !if "$(wxUSE_GUI)" == "0" | |
2cedc12a | 125 | BORLAND_SUFFIX=$(BORLAND_SUFFIX)b |
cc77c86d CE |
126 | CPPFLAGS=-DwxUSE_GUI=0 |
127 | !endif | |
128 | ||
8c3288a7 | 129 | !if "$(WXMAKINGDLL)" != "1" && "$(WXUSINGDLL)" != "1" |
2cedc12a | 130 | BORLAND_SUFFIX=$(BORLAND_SUFFIX)s |
8c3288a7 CE |
131 | !endif |
132 | ||
cc77c86d CE |
133 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" |
134 | INCEXT=dll$(INCEXT) | |
135 | !endif | |
c740f496 | 136 | |
2cedc12a CE |
137 | # final names determined here |
138 | WXLIB=$(WXLIBDIR)\$(WXLIBNAME)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX).lib | |
139 | WXDLL=$(WXLIBDIR)\$(WXLIBNAME)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX).dll | |
140 | LIBTARGET=$(WXLIBDIR)\$(LIBTARGET)_$(DEBUG_SUFFIX).lib | |
141 | OBJ_PATH=$(OBJ_PATH)_$(BORLAND_SUFFIX)$(DEBUG_SUFFIX) | |
cc77c86d CE |
142 | |
143 | !if "$(WXMAKINGDLL)" == "1" | |
144 | DLL_FLAGS= -DWXMAKINGDLL=1 -D_RTLDLL | |
145 | !else | |
c740f496 GL |
146 | |
147 | !if "$(WXUSINGDLL)" == "1" | |
f6bcfd97 | 148 | DLL_FLAGS= -DWXUSINGDLL=1 -D_RTLDLL |
c740f496 GL |
149 | !else |
150 | DLL_FLAGS= | |
c740f496 GL |
151 | !endif |
152 | ||
153 | !endif | |
154 | ||
155 | !if "$(WXBUILDDLL)" == "1" | |
741f371c | 156 | LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS) |
c740f496 GL |
157 | !endif |
158 | ||
2cedc12a | 159 | CFG=$(OBJ_PATH)\$(CFG).cfg |
e438abe5 | 160 | CPPFLAGS=$(CPPFLAGS) $(DLL_FLAGS) @$(CFG) $(EXTRACPPFLAGS) |
c740f496 | 161 | |
2bda0e17 KB |
162 | DUMMY=dummy |
163 | ||
164 | SRCSUFF = cpp | |
165 | OBJSUFF = obj | |
166 | ||
c09f2879 VZ |
167 | WAITFLAG = /w |
168 | ||
2bda0e17 | 169 | .$(SRCSUFF).obj: |
cc693a82 | 170 | bcc32 $(CPPFLAGS) -c -n$(OBJ_PATH) {$< } |
2bda0e17 KB |
171 | |
172 | .c.obj: | |
cc693a82 | 173 | bcc32 $(CPPFLAGS) -P- -c -n$(OBJ_PATH) {$< } |