]>
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 KB |
7 | WXDIR = $(WXWIN) |
8 | CFG = $(WXDIR)\src\msw\wxwin32.cfg | |
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 | ||
cc77c86d | 39 | !if "$(FINAL)" == "1" |
2bda0e17 | 40 | OPT = -O2 |
40e1a9c0 | 41 | DEBUG_FLAGS = -DUSE_DEFINE |
cc77c86d CE |
42 | LINKDEBUGFLAGS= |
43 | !else | |
44 | OPT = -Od | |
45 | DEBUG_FLAGS= -v -DWXDEBUG=1 -D__WXDEBUG__ -DUSE_DEFINE | |
46 | LINKDEBUGFLAGS=/v | |
2bda0e17 | 47 | !endif |
2bda0e17 | 48 | |
c740f496 GL |
49 | !ifndef DLL |
50 | DLL=0 | |
51 | !endif | |
52 | ||
53 | # Target WXMAKINGDLL WXUSINGDLL WXBUILDDLL | |
54 | # wxWin DLL 1 0 1 | |
55 | # wxWin STATIC 0 0 0 | |
56 | # App use wxWin DLL 0 1 0 | |
57 | # DLL use wxWin DLL 0 1 1 | |
58 | # DLL use wxWin STATIC 0 0 1 | |
59 | # | |
60 | ||
cc77c86d CE |
61 | # Determine the library name depending on the options, to allow |
62 | # multiple versions to coexist. | |
63 | # Note that the clean target will only delete the appropriate .lib for the current | |
64 | # options and all the obj files, and note that you must delete the obj files if you | |
65 | # change the options so that they are compiled using the correct ones. | |
66 | ||
67 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" | |
68 | WXLIBNAME=wx32 | |
69 | !else | |
70 | WXLIBNAME=wx32 | |
71 | !endif | |
72 | ||
73 | !if "$(UNICODE)" == "1" | |
74 | WXLIBNAME=$(WXLIBNAME)u | |
75 | !endif | |
c740f496 | 76 | |
cc77c86d CE |
77 | !if "$(FINAL)" == "1" |
78 | WXLIBNAME=$(WXLIBNAME)$(FINAL) | |
79 | !else if "$(FINAL)" == "hybrid" | |
80 | WXLIBNAME=$(WXLIBNAME)h | |
c740f496 | 81 | !else |
cc77c86d CE |
82 | guilibsdll= oldnames.lib kernel32.lib \ |
83 | ws2_32.lib mswsock.lib advapi32.lib user32.lib \ | |
84 | gdi32.lib comdlg32.lib winspool.lib | |
85 | WXLIBNAME=$(WXLIBNAME)d | |
86 | !endif | |
87 | ||
88 | !if "$(wxUSE_GUI)" == "0" | |
89 | WXLIBNAME=$(WXLIBNAME)b | |
90 | CPPFLAGS=-DwxUSE_GUI=0 | |
91 | !endif | |
92 | ||
93 | !if "$(WXMAKINGDLL)" == "1" || "$(WXUSINGDLL)" == "1" | |
94 | INCEXT=dll$(INCEXT) | |
95 | !endif | |
c740f496 | 96 | |
cc77c86d CE |
97 | !ifndef WXLIBDIR |
98 | WXLIBDIR=$(WXDIR)\lib | |
99 | !endif | |
100 | ||
101 | WXLIB=$(WXLIBDIR)\$(WXLIBNAME).lib | |
102 | WXDLL=$(WXLIBDIR)\$(WXLIBNAME).dll | |
103 | ||
104 | !if "$(WXMAKINGDLL)" == "1" | |
105 | DLL_FLAGS= -DWXMAKINGDLL=1 -D_RTLDLL | |
106 | !else | |
c740f496 GL |
107 | |
108 | !if "$(WXUSINGDLL)" == "1" | |
f6bcfd97 | 109 | DLL_FLAGS= -DWXUSINGDLL=1 -D_RTLDLL |
c740f496 GL |
110 | !else |
111 | DLL_FLAGS= | |
c740f496 GL |
112 | !endif |
113 | ||
114 | !endif | |
115 | ||
116 | !if "$(WXBUILDDLL)" == "1" | |
741f371c | 117 | LINK_FLAGS= /Tpd /c $(EXTRALINKFLAGS) |
c740f496 GL |
118 | !endif |
119 | ||
cc77c86d | 120 | CPPFLAGS=$(CPPFLAGS) $(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG) |
c740f496 | 121 | |
2bda0e17 KB |
122 | DUMMY=dummy |
123 | ||
124 | SRCSUFF = cpp | |
125 | OBJSUFF = obj | |
126 | ||
c09f2879 VZ |
127 | WAITFLAG = /w |
128 | ||
2bda0e17 | 129 | .$(SRCSUFF).obj: |
cc77c86d | 130 | bcc32 $(CPPFLAGS) -c {$< } |
2bda0e17 KB |
131 | |
132 | .c.obj: | |
cc77c86d | 133 | bcc32 $(CPPFLAGS) -P- -c {$< } |