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 -I.
39 EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
41 SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__
45 !include $(WXDIR)\src\ntwxwin.mak
47 #----------------------------------------------------------------------
51 OBJECTS = wxp.obj helpers.obj windows.obj events.obj \
52 misc.obj gdi.obj mdi.obj controls.obj \
53 controls2.obj windows2.obj cmndlgs.obj stattool.obj \
57 PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \
58 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
59 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
60 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
61 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
62 $(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
63 $(TARGETDIR)\__init__.py
66 #----------------------------------------------------------------------
69 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
71 DEBUGLFLAGS = /INCREMENTAL:NO
74 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
75 /machine:I386 /implib:./$(TARGET).lib /nologo
77 #----------------------------------------------------------------------
79 default: $(TARGETDIR)\$(TARGET).pyd pycfiles
85 nmake -f makefile.nt FINAL=$(FINAL)
90 nmake -f makefile.nt clean
94 pycfiles : $(PYMODULES)
95 !if "$(COMPILEPY)" == "1"
96 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
97 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
100 #----------------------------------------------------------------------
102 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
106 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
111 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
112 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
116 # implicit rule for compiling .cpp files
119 $(CPPFLAGS) /c /Tp $<
122 {$(GENCODEDIR)}.cpp{}.obj:
124 $(CPPFLAGS) /c /Tp $<
138 -erase $(TARGETDIR)\$(TARGET).pyd
139 -erase $(TARGETDIR)\*.py
140 -erase $(TARGETDIR)\*.pyc
141 -erase $(TARGETDIR)\*.pyo
142 -erase $(TARGETDIR)\$(TARGET).*
146 #------------------------------------------------------------------------
150 # Implicit rules to run SWIG
151 {}.i{$(GENCODEDIR)}.cpp:
152 swig $(SWIGFLAGS) -c -o $@ $<
154 {}.i{$(GENCODEDIR)}.py:
155 swig $(SWIGFLAGS) -c -o $@ $<
158 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
161 {}.py{$(TARGETDIR)}.py:
164 #{}.py{$(TARGETDIR)}.$(PYEXT):
165 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
170 # This one must leave out the -c flag so we define the whole rule
171 $(GENCODEDIR)\wxp.cpp $(GENCODEDIR)\wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
172 swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i
175 # Define some dependencies. These MUST use forward slashes so SWIG
176 # will write the shadow file to the right directory.
177 $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
178 $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
179 $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
180 $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
181 $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
182 $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
183 $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
184 $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
185 $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
186 $(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
187 $(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
190 $(TARGETDIR)\wxp.py : $(GENCODEDIR)\wxp.py
191 $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
192 $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
193 $(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
194 $(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
195 $(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
196 $(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
197 $(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
198 $(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py
199 $(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
200 $(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
201 $(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
202 $(TARGETDIR)\__init__.py : __init__.py
205 #------------------------------------------------------------------------
208 # Revision 1.6 1998/10/02 06:40:41 RD
209 # Version 0.4 of wxPython for MSW.
211 # Revision 1.5 1998/08/19 00:38:23 RD
215 # Revision 1.4 1998/08/18 21:55:10 RD
217 # New build directory structure
219 # Revision 1.3 1998/08/15 07:36:37 RD
220 # - Moved the header in the .i files out of the code that gets put into
221 # the .cpp files. It caused CVS conflicts because of the RCS ID being
222 # different each time.
224 # - A few minor fixes.
226 # Revision 1.2 1998/08/14 03:34:23 RD
227 # made pre-compiling the python files optional
229 # Revision 1.1 1998/08/09 08:25:51 RD