]>
Commit | Line | Data |
---|---|---|
7bf85405 RD |
1 | #---------------------------------------------------------------------------- |
2 | # Name: makefile.nt | |
3 | # Purpose: Win32, VC++ 5 makefile for wxPython | |
4 | # | |
5 | # Author: Robin Dunn | |
6 | # | |
7 | # Created: 3/27/97 | |
8 | # RCS-ID: $Id$ | |
9 | # Copyright: (c) 1998 by Total Control Software | |
10 | # Licence: wxWindows license | |
11 | #---------------------------------------------------------------------------- | |
73c5ed36 | 12 | VERSION=0.5.4 |
7bf85405 RD |
13 | |
14 | # Set WXDIR to the root wxWindows directory for your system | |
15 | WXDIR = $(WXWIN) | |
16 | ||
17 | # Set this to the root of the Python installation | |
18 | PYTHONDIR=e:\Tools\Python15 | |
19 | ||
20 | # Set this to 1 for a non-debug, optimised compile | |
21 | FINAL=0 | |
22 | ||
23 | # Set this to where you want the stuff installed at. It should | |
b8b8dda7 RD |
24 | # be a directory contained in a PYTHONPATH directory, and should be |
25 | # named wxPython | |
7bf85405 RD |
26 | TARGETDIR=.. |
27 | ||
3b8b2387 RD |
28 | # Set this to 1 for make to pre-compile the Python modules, 0 to |
29 | # just copy the sources and let Python compile them at the first | |
30 | # runtime. | |
31 | COMPILEPY=0 | |
7bf85405 | 32 | |
b8b8dda7 RD |
33 | SEPARATE=0 |
34 | ||
7bf85405 RD |
35 | #---------------------------------------------------------------------- |
36 | ||
37 | WXUSINGDLL=0 | |
38 | NOPCH=1 | |
39 | THISDIR=$(WXDIR)\utils\wxPython | |
40 | ||
41 | EXTRALIBS=$(PYTHONDIR)\libs\python15.lib | |
b62bdb48 | 42 | EXTRAINC=-I$(PYTHONDIR)\include -I. |
7bf85405 | 43 | EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H |
2ea09579 RD |
44 | OVERRIDEFLAGS=/GX- |
45 | ||
7bf85405 | 46 | |
03e9bead | 47 | SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ |
b62bdb48 | 48 | GENCODEDIR=msw |
7bf85405 RD |
49 | |
50 | ||
51 | !include $(WXDIR)\src\ntwxwin.mak | |
52 | ||
53 | #---------------------------------------------------------------------- | |
54 | ||
b8b8dda7 | 55 | TARGET = wxc |
7bf85405 | 56 | |
b8b8dda7 | 57 | OBJECTS = wx.obj helpers.obj windows.obj events.obj \ |
7bf85405 | 58 | misc.obj gdi.obj mdi.obj controls.obj \ |
9c039d08 | 59 | controls2.obj windows2.obj cmndlgs.obj stattool.obj \ |
08127323 | 60 | frames.obj windows3.obj \ |
b8b8dda7 RD |
61 | !if "$(SEPARATE)" == "0" |
62 | utils.obj | |
63 | !else | |
9c039d08 | 64 | |
b8b8dda7 RD |
65 | TARGET2 = utilsc |
66 | OBJECTS2 = utils.obj | |
67 | target2=$(TARGETDIR)\$(TARGET2).pyd | |
68 | !endif | |
7bf85405 | 69 | |
b8b8dda7 | 70 | PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \ |
7bf85405 RD |
71 | $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \ |
72 | $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \ | |
73 | $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \ | |
74 | $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \ | |
9c039d08 | 75 | $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \ |
08127323 RD |
76 | $(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \ |
77 | $(TARGETDIR)\__init__.py | |
9c039d08 | 78 | |
7bf85405 RD |
79 | |
80 | #---------------------------------------------------------------------- | |
81 | ||
82 | !if "$(FINAL)" == "0" | |
83 | DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES | |
84 | !else | |
85 | DEBUGLFLAGS = /INCREMENTAL:NO | |
86 | !endif | |
87 | ||
88 | LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \ | |
89 | /machine:I386 /implib:./$(TARGET).lib /nologo | |
90 | ||
b8b8dda7 RD |
91 | LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \ |
92 | /machine:I386 /implib:./$(TARGET2).lib /nologo | |
93 | ||
7bf85405 RD |
94 | #---------------------------------------------------------------------- |
95 | ||
b8b8dda7 | 96 | default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles |
7bf85405 | 97 | |
b8b8dda7 | 98 | all: wx $(TARGET) $(TARGET2) |
7bf85405 RD |
99 | |
100 | wx: | |
101 | cd $(WXDIR)\src\msw | |
102 | nmake -f makefile.nt FINAL=$(FINAL) | |
103 | cd $(THISDIR) | |
104 | ||
105 | wxclean: | |
106 | cd $(WXDIR)\src\msw | |
107 | nmake -f makefile.nt clean | |
108 | cd $(THISDIR) | |
109 | ||
110 | ||
111 | pycfiles : $(PYMODULES) | |
3b8b2387 | 112 | !if "$(COMPILEPY)" == "1" |
7bf85405 RD |
113 | $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR) |
114 | $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR) | |
3b8b2387 | 115 | !endif |
7bf85405 RD |
116 | |
117 | #---------------------------------------------------------------------- | |
118 | ||
119 | $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res | |
120 | $(link) @<< | |
121 | /out:$@ /dll | |
122 | $(LFLAGS) | |
123 | $(DUMMYOBJ) $(OBJECTS) $(TARGET).res | |
124 | $(LIBS) | |
125 | << | |
126 | ||
b8b8dda7 RD |
127 | $(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2) |
128 | $(link) @<< | |
129 | /out:$@ /dll | |
130 | $(LFLAGS2) | |
131 | $(DUMMYOBJ) $(OBJECTS2) | |
132 | $(LIBS) | |
133 | << | |
134 | ||
7bf85405 RD |
135 | |
136 | $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc | |
137 | $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc | |
138 | ||
139 | ||
140 | ||
141 | # implicit rule for compiling .cpp files | |
142 | {}.cpp{}.obj: | |
143 | $(cc) @<< | |
144 | $(CPPFLAGS) /c /Tp $< | |
145 | << | |
146 | ||
b62bdb48 RD |
147 | {$(GENCODEDIR)}.cpp{}.obj: |
148 | $(cc) @<< | |
149 | $(CPPFLAGS) /c /Tp $< | |
150 | << | |
151 | ||
7bf85405 RD |
152 | |
153 | clean: | |
154 | -erase *.obj | |
155 | -erase *.exe | |
156 | -erase *.res | |
157 | -erase *.map | |
158 | -erase *.sbr | |
159 | -erase *.pdb | |
160 | -erase *.pch | |
161 | -erase $(TARGET).exp | |
162 | -erase $(TARGET).lib | |
b8b8dda7 RD |
163 | -erase $(TARGETDIR)\$(TARGET).* |
164 | !if "$(SEPARATE)" != "0" | |
165 | -erase $(TARGET2).exp | |
166 | -erase $(TARGET2).lib | |
167 | -erase $(TARGETDIR)\$(TARGET2).* | |
168 | !endif | |
7bf85405 RD |
169 | -erase $(TARGETDIR)\$(TARGET).pyd |
170 | -erase $(TARGETDIR)\*.py | |
171 | -erase $(TARGETDIR)\*.pyc | |
172 | -erase $(TARGETDIR)\*.pyo | |
7bf85405 RD |
173 | |
174 | ||
175 | ||
176 | #------------------------------------------------------------------------ | |
177 | ||
178 | .SUFFIXES : .i .py | |
179 | ||
180 | # Implicit rules to run SWIG | |
b62bdb48 RD |
181 | {}.i{$(GENCODEDIR)}.cpp: |
182 | swig $(SWIGFLAGS) -c -o $@ $< | |
7bf85405 | 183 | |
b62bdb48 RD |
184 | {}.i{$(GENCODEDIR)}.py: |
185 | swig $(SWIGFLAGS) -c -o $@ $< | |
b62bdb48 RD |
186 | |
187 | ||
188 | {$(GENCODEDIR)}.py{$(TARGETDIR)}.py: | |
189 | copy $< $@ | |
7bf85405 RD |
190 | |
191 | {}.py{$(TARGETDIR)}.py: | |
192 | copy $< $@ | |
193 | ||
194 | #{}.py{$(TARGETDIR)}.$(PYEXT): | |
195 | # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')" | |
196 | ||
197 | ||
198 | ||
199 | ||
200 | # This one must leave out the -c flag so we define the whole rule | |
b8b8dda7 RD |
201 | $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py |
202 | swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i | |
7bf85405 RD |
203 | |
204 | ||
8f89cfc1 RD |
205 | # Define some dependencies. These MUST use forward slashes so SWIG |
206 | # will write the shadow file to the right directory. | |
207 | $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i | |
208 | $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i | |
08127323 | 209 | $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i |
8f89cfc1 RD |
210 | $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i |
211 | $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i | |
212 | $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i | |
213 | $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i | |
214 | $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i | |
215 | $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i | |
216 | $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i | |
9c039d08 RD |
217 | $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i |
218 | $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i | |
b62bdb48 | 219 | |
b8b8dda7 RD |
220 | !if "$(SEPARATE)" == "1" |
221 | $(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i | |
222 | swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i | |
223 | !else | |
224 | $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i | |
225 | !endif | |
226 | ||
b62bdb48 | 227 | |
b8b8dda7 | 228 | $(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py |
b62bdb48 RD |
229 | $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py |
230 | $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py | |
08127323 | 231 | $(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py |
b62bdb48 RD |
232 | $(TARGETDIR)\events.py : $(GENCODEDIR)\events.py |
233 | $(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py | |
234 | $(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py | |
235 | $(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py | |
236 | $(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py | |
237 | $(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py | |
238 | $(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py | |
b8b8dda7 | 239 | $(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py |
9c039d08 | 240 | $(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py |
b8b8dda7 | 241 | $(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py |
b62bdb48 | 242 | $(TARGETDIR)\__init__.py : __init__.py |
7bf85405 RD |
243 | |
244 | ||
08127323 RD |
245 | SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \ |
246 | $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py \ | |
247 | $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py \ | |
248 | $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \ | |
249 | $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \ | |
250 | $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \ | |
251 | $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \ | |
252 | $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \ | |
253 | $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \ | |
254 | $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py\ | |
255 | $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py \ | |
256 | $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \ | |
257 | $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \ | |
258 | $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \ | |
259 | ||
260 | ||
261 | sources : $(SOURCES) | |
262 | ||
73c5ed36 RD |
263 | |
264 | dist: | |
265 | cd ..\.. | |
266 | wxPython\distrib\zipit.bat $(VERSION) | |
267 | ||
7bf85405 RD |
268 | #------------------------------------------------------------------------ |
269 | # | |
270 | # $Log$ | |
e5eaa0a0 RD |
271 | # Revision 1.1 1999/02/06 23:47:03 RD |
272 | # Changing makefile.nt to makefile.vc as in rest of wxWindows | |
273 | # | |
73c5ed36 | 274 | # Revision 1.10 1999/02/01 00:10:40 RD |
e5eaa0a0 | 275 | # |
73c5ed36 RD |
276 | # Added the missing EVT_LIST_ITEM_SELECTED and friends. |
277 | # | |
08127323 | 278 | # Revision 1.9 1999/01/30 07:30:13 RD |
73c5ed36 | 279 | # |
08127323 RD |
280 | # Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc. |
281 | # | |
282 | # Various cleanup, tweaks, minor additions, etc. to maintain | |
283 | # compatibility with the current wxWindows. | |
284 | # | |
2ea09579 | 285 | # Revision 1.8 1998/12/21 19:58:06 RD |
08127323 | 286 | # |
2ea09579 RD |
287 | # Now compiles with /GX- on MSW. |
288 | # | |
b8b8dda7 RD |
289 | # Revision 1.7 1998/12/15 20:41:20 RD |
290 | # Changed the import semantics from "from wxPython import *" to "from | |
291 | # wxPython.wx import *" This is for people who are worried about | |
292 | # namespace pollution, they can use "from wxPython import wx" and then | |
293 | # prefix all the wxPython identifiers with "wx." | |
294 | # | |
295 | # Added wxTaskbarIcon for wxMSW. | |
296 | # | |
297 | # Made the events work for wxGrid. | |
298 | # | |
299 | # Added wxConfig. | |
300 | # | |
301 | # Added wxMiniFrame for wxGTK, (untested.) | |
302 | # | |
303 | # Changed many of the args and return values that were pointers to gdi | |
304 | # objects to references to reflect changes in the wxWindows API. | |
305 | # | |
306 | # Other assorted fixes and additions. | |
307 | # | |
9c039d08 | 308 | # Revision 1.6 1998/10/02 06:40:41 RD |
b8b8dda7 | 309 | # |
9c039d08 RD |
310 | # Version 0.4 of wxPython for MSW. |
311 | # | |
8f89cfc1 | 312 | # Revision 1.5 1998/08/19 00:38:23 RD |
9c039d08 | 313 | # |
8f89cfc1 RD |
314 | # A few tweaks |
315 | # | |
b62bdb48 | 316 | # Revision 1.4 1998/08/18 21:55:10 RD |
8f89cfc1 | 317 | # |
b62bdb48 RD |
318 | # New build directory structure |
319 | # | |
03e9bead RD |
320 | # Revision 1.3 1998/08/15 07:36:37 RD |
321 | # - Moved the header in the .i files out of the code that gets put into | |
322 | # the .cpp files. It caused CVS conflicts because of the RCS ID being | |
323 | # different each time. | |
324 | # | |
325 | # - A few minor fixes. | |
326 | # | |
3b8b2387 RD |
327 | # Revision 1.2 1998/08/14 03:34:23 RD |
328 | # made pre-compiling the python files optional | |
329 | # | |
7bf85405 RD |
330 | # Revision 1.1 1998/08/09 08:25:51 RD |
331 | # Initial version | |
332 | # |