1 #----------------------------------------------------------------------------
3 # Purpose: Win32, VC++ 5 makefile for wxPython
9 # Copyright: (c) 1998 by Total Control Software
10 # Licence: wxWindows license
11 #----------------------------------------------------------------------------
13 # Set WXDIR to the root wxWindows directory for your system
16 # Set this to the root of the Python installation
17 PYTHONDIR=e:\Tools\Python15
19 # Set this to 1 for a non-debug, optimised compile
22 # Set this to where you want the stuff installed at. It should
23 # be a directory contained in a PYTHONPATH directory, and should be
27 # Set this to 1 for make to pre-compile the Python modules, 0 to
28 # just copy the sources and let Python compile them at the first
34 #----------------------------------------------------------------------
38 THISDIR=$(WXDIR)\utils\wxPython
40 EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
41 EXTRAINC=-I$(PYTHONDIR)\include -I.
42 EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
46 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__
50 !include $(WXDIR)\src\ntwxwin.mak
52 #----------------------------------------------------------------------
56 OBJECTS = wx.obj helpers.obj windows.obj events.obj \
57 misc.obj gdi.obj mdi.obj controls.obj \
58 controls2.obj windows2.obj cmndlgs.obj stattool.obj \
59 frames.obj windows3.obj \
60 !if "$(SEPARATE)" == "0"
66 target2=$(TARGETDIR)\$(TARGET2).pyd
69 PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
70 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
71 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
72 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
73 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
74 $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
75 $(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \
76 $(TARGETDIR)\__init__.py
79 #----------------------------------------------------------------------
82 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
84 DEBUGLFLAGS = /INCREMENTAL:NO
87 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
88 /machine:I386 /implib:./$(TARGET).lib /nologo
90 LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \
91 /machine:I386 /implib:./$(TARGET2).lib /nologo
93 #----------------------------------------------------------------------
95 default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles
97 all: wx $(TARGET) $(TARGET2)
101 nmake -f makefile.nt FINAL=$(FINAL)
106 nmake -f makefile.nt clean
110 pycfiles : $(PYMODULES)
111 !if "$(COMPILEPY)" == "1"
112 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
113 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
116 #----------------------------------------------------------------------
118 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
122 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
126 $(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2)
130 $(DUMMYOBJ) $(OBJECTS2)
135 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
136 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
140 # implicit rule for compiling .cpp files
143 $(CPPFLAGS) /c /Tp $<
146 {$(GENCODEDIR)}.cpp{}.obj:
148 $(CPPFLAGS) /c /Tp $<
162 -erase $(TARGETDIR)\$(TARGET).*
163 !if "$(SEPARATE)" != "0"
164 -erase $(TARGET2).exp
165 -erase $(TARGET2).lib
166 -erase $(TARGETDIR)\$(TARGET2).*
168 -erase $(TARGETDIR)\$(TARGET).pyd
169 -erase $(TARGETDIR)\*.py
170 -erase $(TARGETDIR)\*.pyc
171 -erase $(TARGETDIR)\*.pyo
175 #------------------------------------------------------------------------
179 # Implicit rules to run SWIG
180 {}.i{$(GENCODEDIR)}.cpp:
181 swig $(SWIGFLAGS) -c -o $@ $<
183 {}.i{$(GENCODEDIR)}.py:
184 swig $(SWIGFLAGS) -c -o $@ $<
187 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
190 {}.py{$(TARGETDIR)}.py:
193 #{}.py{$(TARGETDIR)}.$(PYEXT):
194 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
199 # This one must leave out the -c flag so we define the whole rule
200 $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py
201 swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i
204 # Define some dependencies. These MUST use forward slashes so SWIG
205 # will write the shadow file to the right directory.
206 $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
207 $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
208 $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
209 $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
210 $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
211 $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
212 $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
213 $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
214 $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
215 $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
216 $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
217 $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
219 !if "$(SEPARATE)" == "1"
220 $(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i
221 swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i
223 $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
227 $(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py
228 $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
229 $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
230 $(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py
231 $(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
232 $(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
233 $(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
234 $(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
235 $(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
236 $(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py
237 $(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
238 $(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
239 $(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
240 $(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
241 $(TARGETDIR)\__init__.py : __init__.py
244 SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \
245 $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py \
246 $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py \
247 $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \
248 $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \
249 $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \
250 $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \
251 $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \
252 $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \
253 $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py\
254 $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py \
255 $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \
256 $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \
257 $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \
262 #------------------------------------------------------------------------
265 # Revision 1.9 1999/01/30 07:30:13 RD
266 # Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
268 # Various cleanup, tweaks, minor additions, etc. to maintain
269 # compatibility with the current wxWindows.
271 # Revision 1.8 1998/12/21 19:58:06 RD
273 # Now compiles with /GX- on MSW.
275 # Revision 1.7 1998/12/15 20:41:20 RD
276 # Changed the import semantics from "from wxPython import *" to "from
277 # wxPython.wx import *" This is for people who are worried about
278 # namespace pollution, they can use "from wxPython import wx" and then
279 # prefix all the wxPython identifiers with "wx."
281 # Added wxTaskbarIcon for wxMSW.
283 # Made the events work for wxGrid.
287 # Added wxMiniFrame for wxGTK, (untested.)
289 # Changed many of the args and return values that were pointers to gdi
290 # objects to references to reflect changes in the wxWindows API.
292 # Other assorted fixes and additions.
294 # Revision 1.6 1998/10/02 06:40:41 RD
296 # Version 0.4 of wxPython for MSW.
298 # Revision 1.5 1998/08/19 00:38:23 RD
302 # Revision 1.4 1998/08/18 21:55:10 RD
304 # New build directory structure
306 # Revision 1.3 1998/08/15 07:36:37 RD
307 # - Moved the header in the .i files out of the code that gets put into
308 # the .cpp files. It caused CVS conflicts because of the RCS ID being
309 # different each time.
311 # - A few minor fixes.
313 # Revision 1.2 1998/08/14 03:34:23 RD
314 # made pre-compiling the python files optional
316 # Revision 1.1 1998/08/09 08:25:51 RD