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.
26 # Set this to 1 for make to pre-compile the Python modules, 0 to
27 # just copy the sources and let Python compile them at the first
31 #----------------------------------------------------------------------
35 THISDIR=$(WXDIR)\utils\wxPython
37 EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
38 EXTRAINC=-I$(PYTHONDIR)\include
39 EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
41 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__
44 !include $(WXDIR)\src\ntwxwin.mak
46 #----------------------------------------------------------------------
50 OBJECTS = wxp.obj helpers.obj windows.obj events.obj \
51 misc.obj gdi.obj mdi.obj controls.obj \
52 controls2.obj windows2.obj cmndlgs.obj
54 PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \
55 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
56 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
57 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
58 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
59 $(TARGETDIR)\__init__.py
61 #----------------------------------------------------------------------
64 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
66 DEBUGLFLAGS = /INCREMENTAL:NO
69 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
70 /machine:I386 /implib:./$(TARGET).lib /nologo
72 #----------------------------------------------------------------------
74 default: $(TARGETDIR)\$(TARGET).pyd pycfiles
80 nmake -f makefile.nt FINAL=$(FINAL)
85 nmake -f makefile.nt clean
89 pycfiles : $(PYMODULES)
90 !if "$(COMPILEPY)" == "1"
91 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
92 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
95 #----------------------------------------------------------------------
97 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
101 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
106 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
107 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
111 # implicit rule for compiling .cpp files
114 $(CPPFLAGS) /c /Tp $<
128 -erase $(TARGETDIR)\$(TARGET).pyd
129 -erase $(TARGETDIR)\*.py
130 -erase $(TARGETDIR)\*.pyc
131 -erase $(TARGETDIR)\*.pyo
132 -erase $(TARGETDIR)\$(TARGET).*
136 #------------------------------------------------------------------------
140 # Implicit rules to run SWIG
142 swig $(SWIGFLAGS) -c -o $*.cpp $*.i
145 swig $(SWIGFLAGS) -c -o $*.cpp $*.i
147 {}.py{$(TARGETDIR)}.py:
150 #{}.py{$(TARGETDIR)}.$(PYEXT):
151 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
156 # This one must leave out the -c flag so we define the whole rule
157 wxp.cpp wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
158 swig $(SWIGFLAGS) -o wxp.cpp wxp.i
161 # define some dependencies
162 windows.cpp windows.py : windows.i my_typemaps.i _defs.i
163 windows2.cpp windows2.py : windows2.i my_typemaps.i _defs.i
164 events.cpp events.py : events.i my_typemaps.i _defs.i
165 misc.cpp misc.py : misc.i my_typemaps.i _defs.i
166 gdi.cpp gdi.py : gdi.i my_typemaps.i _defs.i
167 mdi.cpp mdi.py : mdi.i my_typemaps.i _defs.i
168 controls.cpp controls.py : controls.i my_typemaps.i _defs.i
169 controls2.cpp controls2.py : controls2.i my_typemaps.i _defs.i
170 cmndlgs.cpp cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
173 $(TARGETDIR)\wxp.py : wxp.py
174 $(TARGETDIR)\windows.py : windows.py
175 $(TARGETDIR)\windows2.py : windows2.py
176 $(TARGETDIR)\events.py : events.py
177 $(TARGETDIR)\misc.py : misc.py
178 $(TARGETDIR)\gdi.py : gdi.py
179 $(TARGETDIR)\mdi.py : mdi.py
180 $(TARGETDIR)\controls.py : controls.py
181 $(TARGETDIR)\controls2.py : controls2.py
182 $(TARGETDIR)\cmndlgs.py : cmndlgs.py
185 #------------------------------------------------------------------------
188 # Revision 1.3 1998/08/15 07:36:37 RD
189 # - Moved the header in the .i files out of the code that gets put into
190 # the .cpp files. It caused CVS conflicts because of the RCS ID being
191 # different each time.
193 # - A few minor fixes.
195 # Revision 1.2 1998/08/14 03:34:23 RD
196 # made pre-compiling the python files optional
198 # Revision 1.1 1998/08/09 08:25:51 RD