1 #----------------------------------------------------------------------------
3 # Purpose: Win32, VC++ 5/6 makefile for wxPython
9 # Copyright: (c) 1998 by Total Control Software
10 # Licence: wxWindows license
11 #----------------------------------------------------------------------------
14 # Set WXDIR to the root wxWindows directory for your system
17 # Set this to the root of the Python installation
18 PYTHONDIR=e:\Tools\Python15
20 # Set this to 1 for a non-debug, optimised compile
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
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
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.
40 #----------------------------------------------------------------------
43 THISDIR=$(WXDIR)\utils\wxPython
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)
51 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ $(OTHERSWIGFLAGS)
55 !include $(WXDIR)\src\ntwxwin.mak
57 #----------------------------------------------------------------------
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"
69 OTHERCFLAGS=-DSEPARATE=1
70 OTHERSWIGFLAGS=-DSEPARATE
73 target2=$(TARGETDIR)\$(TARGET2).pyd
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
86 #----------------------------------------------------------------------
89 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
91 DEBUGLFLAGS = /INCREMENTAL:NO
94 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
95 /machine:I386 /implib:./$(TARGET).lib /nologo
97 LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \
98 /machine:I386 /implib:./$(TARGET2).lib /nologo
100 #----------------------------------------------------------------------
102 default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles
104 all: wx $(TARGET) $(TARGET2)
108 nmake -f makefile.nt FINAL=$(FINAL)
113 nmake -f makefile.nt clean
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)
123 #----------------------------------------------------------------------
125 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
129 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
133 $(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2)
137 $(DUMMYOBJ) $(OBJECTS2)
142 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
143 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
147 # implicit rule for compiling .cpp files
150 $(CPPFLAGS) /c /Tp $<
153 {$(GENCODEDIR)}.cpp{}.obj:
155 $(CPPFLAGS) /c /Tp $<
169 -erase $(TARGETDIR)\$(TARGET).*
170 !if "$(SEPARATE)" != "0"
171 -erase $(TARGET2).exp
172 -erase $(TARGET2).lib
173 -erase $(TARGETDIR)\$(TARGET2).*
175 -erase $(TARGETDIR)\$(TARGET).pyd
176 -erase $(TARGETDIR)\*.py
177 -erase $(TARGETDIR)\*.pyc
178 -erase $(TARGETDIR)\*.pyo
184 #------------------------------------------------------------------------
188 # Implicit rules to run SWIG
189 {}.i{$(GENCODEDIR)}.cpp:
190 swig $(SWIGFLAGS) -c -o $@ $<
192 {}.i{$(GENCODEDIR)}.py:
193 swig $(SWIGFLAGS) -c -o $@ $<
196 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
199 {}.py{$(TARGETDIR)}.py:
202 #{}.py{$(TARGETDIR)}.$(PYEXT):
203 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
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
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
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
232 $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
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
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 \
274 wxPython\distrib\zipit.bat $(VERSION)
276 #------------------------------------------------------------------------
279 # Revision 1.4 1999/03/05 07:22:30 RD
280 # Minor wxPython changes for wxWin 2.0
282 # Revision 1.3 1999/02/25 07:08:33 RD
284 # wxPython version 2.0b5
286 # Revision 1.2 1999/02/20 09:03:00 RD
287 # Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
288 # window handle. If you can get the window handle into the python code,
289 # it should just work... More news on this later.
291 # Added wxImageList, wxToolTip.
293 # Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
296 # As usual, some bug fixes, tweaks, etc.
298 # Revision 1.1 1999/02/06 23:47:03 RD
300 # Changing makefile.nt to makefile.vc as in rest of wxWindows
302 # Revision 1.10 1999/02/01 00:10:40 RD
304 # Added the missing EVT_LIST_ITEM_SELECTED and friends.
306 # Revision 1.9 1999/01/30 07:30:13 RD
308 # Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
310 # Various cleanup, tweaks, minor additions, etc. to maintain
311 # compatibility with the current wxWindows.
313 # Revision 1.8 1998/12/21 19:58:06 RD
315 # Now compiles with /GX- on MSW.
317 # Revision 1.7 1998/12/15 20:41:20 RD
318 # Changed the import semantics from "from wxPython import *" to "from
319 # wxPython.wx import *" This is for people who are worried about
320 # namespace pollution, they can use "from wxPython import wx" and then
321 # prefix all the wxPython identifiers with "wx."
323 # Added wxTaskbarIcon for wxMSW.
325 # Made the events work for wxGrid.
329 # Added wxMiniFrame for wxGTK, (untested.)
331 # Changed many of the args and return values that were pointers to gdi
332 # objects to references to reflect changes in the wxWindows API.
334 # Other assorted fixes and additions.
336 # Revision 1.6 1998/10/02 06:40:41 RD
338 # Version 0.4 of wxPython for MSW.
340 # Revision 1.5 1998/08/19 00:38:23 RD
344 # Revision 1.4 1998/08/18 21:55:10 RD
346 # New build directory structure
348 # Revision 1.3 1998/08/15 07:36:37 RD
349 # - Moved the header in the .i files out of the code that gets put into
350 # the .cpp files. It caused CVS conflicts because of the RCS ID being
351 # different each time.
353 # - A few minor fixes.
355 # Revision 1.2 1998/08/14 03:34:23 RD
356 # made pre-compiling the python files optional
358 # Revision 1.1 1998/08/09 08:25:51 RD