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