1 #----------------------------------------------------------------------------
3 # Purpose: Win32, VC++ 5 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
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
35 #----------------------------------------------------------------------
39 THISDIR=$(WXDIR)\utils\wxPython
41 EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
42 EXTRAINC=-I$(PYTHONDIR)\include -I.
43 EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
47 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__
51 !include $(WXDIR)\src\ntwxwin.mak
53 #----------------------------------------------------------------------
57 OBJECTS = wx.obj helpers.obj windows.obj events.obj \
58 misc.obj gdi.obj mdi.obj controls.obj \
59 controls2.obj windows2.obj cmndlgs.obj stattool.obj \
60 frames.obj windows3.obj \
61 !if "$(SEPARATE)" == "0"
67 target2=$(TARGETDIR)\$(TARGET2).pyd
70 PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
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 \
75 $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
76 $(TARGETDIR)\utils.py $(TARGETDIR)\windows3.py \
77 $(TARGETDIR)\__init__.py
80 #----------------------------------------------------------------------
83 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
85 DEBUGLFLAGS = /INCREMENTAL:NO
88 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
89 /machine:I386 /implib:./$(TARGET).lib /nologo
91 LFLAGS2=$(DEBUGLFLAGS) /DLL /def:$(TARGET2).def /subsystem:windows,3.50 \
92 /machine:I386 /implib:./$(TARGET2).lib /nologo
94 #----------------------------------------------------------------------
96 default: $(TARGETDIR)\$(TARGET).pyd $(target2) pycfiles
98 all: wx $(TARGET) $(TARGET2)
102 nmake -f makefile.nt FINAL=$(FINAL)
107 nmake -f makefile.nt clean
111 pycfiles : $(PYMODULES)
112 !if "$(COMPILEPY)" == "1"
113 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
114 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
117 #----------------------------------------------------------------------
119 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
123 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
127 $(TARGETDIR)\$(TARGET2).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS2)
131 $(DUMMYOBJ) $(OBJECTS2)
136 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
137 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
141 # implicit rule for compiling .cpp files
144 $(CPPFLAGS) /c /Tp $<
147 {$(GENCODEDIR)}.cpp{}.obj:
149 $(CPPFLAGS) /c /Tp $<
163 -erase $(TARGETDIR)\$(TARGET).*
164 !if "$(SEPARATE)" != "0"
165 -erase $(TARGET2).exp
166 -erase $(TARGET2).lib
167 -erase $(TARGETDIR)\$(TARGET2).*
169 -erase $(TARGETDIR)\$(TARGET).pyd
170 -erase $(TARGETDIR)\*.py
171 -erase $(TARGETDIR)\*.pyc
172 -erase $(TARGETDIR)\*.pyo
176 #------------------------------------------------------------------------
180 # Implicit rules to run SWIG
181 {}.i{$(GENCODEDIR)}.cpp:
182 swig $(SWIGFLAGS) -c -o $@ $<
184 {}.i{$(GENCODEDIR)}.py:
185 swig $(SWIGFLAGS) -c -o $@ $<
188 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
191 {}.py{$(TARGETDIR)}.py:
194 #{}.py{$(TARGETDIR)}.$(PYEXT):
195 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
200 # This one must leave out the -c flag so we define the whole rule
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
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
209 $(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
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
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
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
224 $(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
228 $(TARGETDIR)\wx.py : $(GENCODEDIR)\wx.py
229 $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
230 $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
231 $(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py
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
239 $(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
240 $(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
241 $(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
242 $(TARGETDIR)\__init__.py : __init__.py
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 \
266 wxPython\distrib\zipit.bat $(VERSION)
268 #------------------------------------------------------------------------
271 # Revision 1.12 1999/06/28 21:39:47 VZ
272 # 1. wxStaticLine implemented (generic (ugly) and MSW versions)
273 # 2. wxTextDialog looks fine under MSW again
274 # 3. startup tips added: code, sample, docs
275 # 4. read-only text controls don't participate in TAB traversal
277 # Revision 1.11 1999/02/06 23:47:02 RD
279 # Changing makefile.nt to makefile.vc as in rest of wxWindows
281 # Revision 1.10 1999/02/01 00:10:40 RD
283 # Added the missing EVT_LIST_ITEM_SELECTED and friends.
285 # Revision 1.9 1999/01/30 07:30:13 RD
287 # Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
289 # Various cleanup, tweaks, minor additions, etc. to maintain
290 # compatibility with the current wxWindows.
292 # Revision 1.8 1998/12/21 19:58:06 RD
294 # Now compiles with /GX- on MSW.
296 # Revision 1.7 1998/12/15 20:41:20 RD
297 # Changed the import semantics from "from wxPython import *" to "from
298 # wxPython.wx import *" This is for people who are worried about
299 # namespace pollution, they can use "from wxPython import wx" and then
300 # prefix all the wxPython identifiers with "wx."
302 # Added wxTaskbarIcon for wxMSW.
304 # Made the events work for wxGrid.
308 # Added wxMiniFrame for wxGTK, (untested.)
310 # Changed many of the args and return values that were pointers to gdi
311 # objects to references to reflect changes in the wxWindows API.
313 # Other assorted fixes and additions.
315 # Revision 1.6 1998/10/02 06:40:41 RD
317 # Version 0.4 of wxPython for MSW.
319 # Revision 1.5 1998/08/19 00:38:23 RD
323 # Revision 1.4 1998/08/18 21:55:10 RD
325 # New build directory structure
327 # Revision 1.3 1998/08/15 07:36:37 RD
328 # - Moved the header in the .i files out of the code that gets put into
329 # the .cpp files. It caused CVS conflicts because of the RCS ID being
330 # different each time.
332 # - A few minor fixes.
334 # Revision 1.2 1998/08/14 03:34:23 RD
335 # made pre-compiling the python files optional
337 # Revision 1.1 1998/08/09 08:25:51 RD