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
51 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__
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"
71 target2=$(TARGETDIR)\$(TARGET2).pyd
74 PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
75 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
76 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
77 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
78 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
79 $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
80 $(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \
81 $(TARGETDIR)\__init__.py
84 #----------------------------------------------------------------------
87 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
89 DEBUGLFLAGS = /INCREMENTAL:NO
92 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
93 /machine:I386 /implib:./$(TARGET).lib /nologo
95 LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \
96 /machine:I386 /implib:./$(TARGET2).lib /nologo
98 #----------------------------------------------------------------------
100 default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles
102 all: wx $(TARGET) $(TARGET2)
106 nmake -f makefile.nt FINAL=$(FINAL)
111 nmake -f makefile.nt clean
115 pycfiles : $(PYMODULES)
116 !if "$(COMPILEPY)" == "1"
117 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
118 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
121 #----------------------------------------------------------------------
123 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
127 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
131 $(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2)
135 $(DUMMYOBJ) $(OBJECTS2)
140 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
141 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
145 # implicit rule for compiling .cpp files
148 $(CPPFLAGS) /c /Tp $<
151 {$(GENCODEDIR)}.cpp{}.obj:
153 $(CPPFLAGS) /c /Tp $<
167 -erase $(TARGETDIR)\$(TARGET).*
168 !if "$(SEPARATE)" != "0"
169 -erase $(TARGET2).exp
170 -erase $(TARGET2).lib
171 -erase $(TARGETDIR)\$(TARGET2).*
173 -erase $(TARGETDIR)\$(TARGET).pyd
174 -erase $(TARGETDIR)\*.py
175 -erase $(TARGETDIR)\*.pyc
176 -erase $(TARGETDIR)\*.pyo
182 #------------------------------------------------------------------------
186 # Implicit rules to run SWIG
187 {}.i{$(GENCODEDIR)}.cpp:
188 swig $(SWIGFLAGS) -c -o $@ $<
190 {}.i{$(GENCODEDIR)}.py:
191 swig $(SWIGFLAGS) -c -o $@ $<
194 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
197 {}.py{$(TARGETDIR)}.py:
200 #{}.py{$(TARGETDIR)}.$(PYEXT):
201 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
206 # This one must leave out the -c flag so we define the whole rule
207 $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py : wx.i my_typemaps.i _defs.i _extras.py
208 swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i
211 # Define some dependencies. These MUST use forward slashes so SWIG
212 # will write the shadow file to the right directory.
213 $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
214 $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
215 $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
216 $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
217 $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
218 $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
219 $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
220 $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
221 $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
222 $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
223 $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
224 $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
226 !if "$(SEPARATE)" == "1"
227 $(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i
228 swig $(SWIGFLAGS) -o $(GENCODEDIR)/utils.cpp utils.i
230 $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
234 $(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py
235 $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
236 $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
237 $(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py
238 $(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
239 $(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
240 $(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
241 $(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
242 $(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
243 $(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py
244 $(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
245 $(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
246 $(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
247 $(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
248 $(TARGETDIR)\__init__.py : __init__.py
251 SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \
252 $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py \
253 $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py \
254 $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \
255 $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \
256 $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \
257 $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \
258 $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \
259 $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \
260 $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py\
261 $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py \
262 $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py \
263 $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \
264 $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \
272 wxPython\distrib\zipit.bat $(VERSION)
274 #------------------------------------------------------------------------
277 # Revision 1.2 1999/02/20 09:03:00 RD
278 # Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
279 # window handle. If you can get the window handle into the python code,
280 # it should just work... More news on this later.
282 # Added wxImageList, wxToolTip.
284 # Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
287 # As usual, some bug fixes, tweaks, etc.
289 # Revision 1.1 1999/02/06 23:47:03 RD
291 # Changing makefile.nt to makefile.vc as in rest of wxWindows
293 # Revision 1.10 1999/02/01 00:10:40 RD
295 # Added the missing EVT_LIST_ITEM_SELECTED and friends.
297 # Revision 1.9 1999/01/30 07:30:13 RD
299 # Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
301 # Various cleanup, tweaks, minor additions, etc. to maintain
302 # compatibility with the current wxWindows.
304 # Revision 1.8 1998/12/21 19:58:06 RD
306 # Now compiles with /GX- on MSW.
308 # Revision 1.7 1998/12/15 20:41:20 RD
309 # Changed the import semantics from "from wxPython import *" to "from
310 # wxPython.wx import *" This is for people who are worried about
311 # namespace pollution, they can use "from wxPython import wx" and then
312 # prefix all the wxPython identifiers with "wx."
314 # Added wxTaskbarIcon for wxMSW.
316 # Made the events work for wxGrid.
320 # Added wxMiniFrame for wxGTK, (untested.)
322 # Changed many of the args and return values that were pointers to gdi
323 # objects to references to reflect changes in the wxWindows API.
325 # Other assorted fixes and additions.
327 # Revision 1.6 1998/10/02 06:40:41 RD
329 # Version 0.4 of wxPython for MSW.
331 # Revision 1.5 1998/08/19 00:38:23 RD
335 # Revision 1.4 1998/08/18 21:55:10 RD
337 # New build directory structure
339 # Revision 1.3 1998/08/15 07:36:37 RD
340 # - Moved the header in the .i files out of the code that gets put into
341 # the .cpp files. It caused CVS conflicts because of the RCS ID being
342 # different each time.
344 # - A few minor fixes.
346 # Revision 1.2 1998/08/14 03:34:23 RD
347 # made pre-compiling the python files optional
349 # Revision 1.1 1998/08/09 08:25:51 RD