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