]>
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 | |
18 | ||
b2cf617c JS |
19 | # Using a config file isn't compatible across all BC++ versions |
20 | # LNKCFG=$(WXDIR)\src\msw\bclnk32.cfg | |
2bda0e17 | 21 | WXLIBDIR = $(WXDIR)\lib |
b14391d1 | 22 | WXLIBDIR2 = $(WXDIR)\contrib\lib |
3b50432a | 23 | WXINC = $(WXDIR)\include;$(WXDIR)\contrib\include;$(WXDIR)\src\iodbc;$(WXDIR)\src\regex; |
34138703 | 24 | WIN95FLAG = -D__WIN95__ -D__WINDOWS__ |
cbf65655 | 25 | RFLAGS = -i$(WXDIR)\include;$(WXDIR)\src |
2bda0e17 | 26 | |
8e97b17b VZ |
27 | # This should be changed to tlink32 if ilink32 is not available. |
28 | # Ilink32 is available on BC++ 5.02 and above, and all | |
29 | # versions of C++ Builder. | |
30 | !ifndef LINK | |
a6e2b3a8 | 31 | LINK=ilink32 |
b2cf617c | 32 | #LINK=tlink32 |
8e97b17b | 33 | !endif |
c3b177ae | 34 | |
2bda0e17 KB |
35 | !ifndef FINAL |
36 | FINAL=0 | |
37 | !endif | |
38 | ||
8c3288a7 CE |
39 | !ifndef WXMAKINGDLL |
40 | WXMAKINGDLL=0 | |
41 | !endif | |
42 | ||
cc77c86d | 43 | !if "$(FINAL)" == "1" |
2bda0e17 | 44 | OPT = -O2 |
40e1a9c0 | 45 | DEBUG_FLAGS = -DUSE_DEFINE |
cc77c86d CE |
46 | LINKDEBUGFLAGS= |
47 | !else | |
48 | OPT = -Od | |
49 | DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE | |
50 | LINKDEBUGFLAGS=/v | |
2bda0e17 | 51 | !endif |
2bda0e17 | 52 | |
8c3288a7 CE |
53 | # allow to use debugger but no wxDebugging functions |
54 | !if "$(FINAL)" == "hybrid" | |
55 | OPT = -Od | |
56 | DEBUG_FLAGS= -v | |
57 | LINKDEBUGFLAGS=/v | |
58 | !endif | |
59 | ||
c740f496 GL |
60 | !ifndef DLL |
61 | DLL=0 | |
62 | !endif | |
63 | ||
64 | # Target WXMAKINGDLL WXUSINGDLL WXBUILDDLL | |
65 | # wxWin DLL 1 0 1 | |
66 | # wxWin STATIC 0 0 0 | |
67 | # App use wxWin DLL 0 1 0 | |
68 | # DLL use wxWin DLL 0 1 1 | |
69 | # DLL use wxWin STATIC 0 0 1 | |
70 | # | |
71 | ||
cc77c86d CE |
72 | # Determine the library name depending on the options, to allow |
73 | # multiple versions to coexist. | |
74 | # Note that the clean target will only delete the appropriate .lib for the current | |
75 | # options and all the obj files, and note that you must delete the obj files if you | |
76 | # change the options so that they are compiled using the correct ones. | |
77 | ||
78 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" | |
79 | WXLIBNAME=wx32 | |
80 | !else | |
81 | WXLIBNAME=wx32 | |
82 | !endif | |
83 | ||
c740f496 | 84 | |
8c3288a7 CE |
85 | #not sure what to do with unicode builds - we need to define something ? |
86 | #!if "$(UNICODE)" == "1" | |
87 | #WXLIBNAME=$(WXLIBNAME)u | |
88 | #!endif | |
89 | ||
90 | ||
91 | #a hybrid , does not set __WXDEBUG__ but sets -v (see above) | |
92 | !if "$(FINAL)" == "hybrid" | |
cc77c86d | 93 | WXLIBNAME=$(WXLIBNAME)h |
8c3288a7 CE |
94 | CFG=$(CFG)h |
95 | !endif | |
96 | ||
97 | !if "$(FINAL)" == "0" | |
cc77c86d | 98 | WXLIBNAME=$(WXLIBNAME)d |
8c3288a7 | 99 | CFG=$(CFG)d |
cc77c86d CE |
100 | !endif |
101 | ||
102 | !if "$(wxUSE_GUI)" == "0" | |
103 | WXLIBNAME=$(WXLIBNAME)b | |
8c3288a7 | 104 | CFG=$(CFG)b |
cc77c86d CE |
105 | CPPFLAGS=-DwxUSE_GUI=0 |
106 | !endif | |
107 | ||
8c3288a7 CE |
108 | !if "$(WXMAKINGDLL)" != "1" && "$(WXUSINGDLL)" != "1" |
109 | WXLIBNAME=$(WXLIBNAME)s | |
110 | !endif | |
111 | ||
cc77c86d CE |
112 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" |
113 | INCEXT=dll$(INCEXT) | |
114 | !endif | |
c740f496 | 115 | |
cc77c86d CE |
116 | !ifndef WXLIBDIR |
117 | WXLIBDIR=$(WXDIR)\lib | |
118 | !endif | |
119 | ||
120 | WXLIB=$(WXLIBDIR)\$(WXLIBNAME).lib | |
121 | WXDLL=$(WXLIBDIR)\$(WXLIBNAME).dll | |
122 | ||
123 | !if "$(WXMAKINGDLL)" == "1" | |
124 | DLL_FLAGS= -DWXMAKINGDLL=1 -D_RTLDLL | |
125 | !else | |
c740f496 GL |
126 | |
127 | !if "$(WXUSINGDLL)" == "1" | |
f6bcfd97 | 128 | DLL_FLAGS= -DWXUSINGDLL=1 -D_RTLDLL |
c740f496 GL |
129 | !else |
130 | DLL_FLAGS= | |
c740f496 GL |
131 | !endif |
132 | ||
133 | !endif | |
134 | ||
135 | !if "$(WXBUILDDLL)" == "1" | |
741f371c | 136 | LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS) |
c740f496 GL |
137 | !endif |
138 | ||
8c3288a7 | 139 | CFG=$(CFG).cfg |
e438abe5 | 140 | CPPFLAGS=$(CPPFLAGS) $(DLL_FLAGS) @$(CFG) $(EXTRACPPFLAGS) |
c740f496 | 141 | |
2bda0e17 KB |
142 | DUMMY=dummy |
143 | ||
144 | SRCSUFF = cpp | |
145 | OBJSUFF = obj | |
146 | ||
c09f2879 VZ |
147 | WAITFLAG = /w |
148 | ||
2bda0e17 | 149 | .$(SRCSUFF).obj: |
cc77c86d | 150 | bcc32 $(CPPFLAGS) -c {$< } |
2bda0e17 KB |
151 | |
152 | .c.obj: | |
cc77c86d | 153 | bcc32 $(CPPFLAGS) -P- -c {$< } |