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
55 PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \
56 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
57 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
58 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
59 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
60 $(TARGETDIR)\__init__.py
62 #----------------------------------------------------------------------
65 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
67 DEBUGLFLAGS = /INCREMENTAL:NO
70 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
71 /machine:I386 /implib:./$(TARGET).lib /nologo
73 #----------------------------------------------------------------------
75 default: $(TARGETDIR)\$(TARGET).pyd pycfiles
81 nmake -f makefile.nt FINAL=$(FINAL)
86 nmake -f makefile.nt clean
90 pycfiles : $(PYMODULES)
91 !if "$(COMPILEPY)" == "1"
92 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
93 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
96 #----------------------------------------------------------------------
98 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
102 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
107 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
108 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
112 # implicit rule for compiling .cpp files
115 $(CPPFLAGS) /c /Tp $<
118 {$(GENCODEDIR)}.cpp{}.obj:
120 $(CPPFLAGS) /c /Tp $<
134 -erase $(TARGETDIR)\$(TARGET).pyd
135 -erase $(TARGETDIR)\*.py
136 -erase $(TARGETDIR)\*.pyc
137 -erase $(TARGETDIR)\*.pyo
138 -erase $(TARGETDIR)\$(TARGET).*
142 #------------------------------------------------------------------------
146 # Implicit rules to run SWIG
147 {}.i{$(GENCODEDIR)}.cpp:
148 swig $(SWIGFLAGS) -c -o $@ $<
150 {}.i{$(GENCODEDIR)}.py:
151 swig $(SWIGFLAGS) -c -o $@ $<
154 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
157 {}.py{$(TARGETDIR)}.py:
160 #{}.py{$(TARGETDIR)}.$(PYEXT):
161 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
166 # This one must leave out the -c flag so we define the whole rule
167 $(GENCODEDIR)\wxp.cpp $(GENCODEDIR)\wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
168 swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i
171 # Define some dependencies. These MUST use forward slashes so SWIG
172 # will write the shadow file to the right directory.
173 $(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
174 $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
175 $(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
176 $(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
177 $(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
178 $(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
179 $(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
180 $(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
181 $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
184 $(TARGETDIR)\wxp.py : $(GENCODEDIR)\wxp.py
185 $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
186 $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
187 $(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
188 $(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
189 $(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
190 $(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
191 $(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
192 $(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py
193 $(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
194 $(TARGETDIR)\__init__.py : __init__.py
197 #------------------------------------------------------------------------
200 # Revision 1.5 1998/08/19 00:38:23 RD
203 # Revision 1.4 1998/08/18 21:55:10 RD
205 # New build directory structure
207 # Revision 1.3 1998/08/15 07:36:37 RD
208 # - Moved the header in the .i files out of the code that gets put into
209 # the .cpp files. It caused CVS conflicts because of the RCS ID being
210 # different each time.
212 # - A few minor fixes.
214 # Revision 1.2 1998/08/14 03:34:23 RD
215 # made pre-compiling the python files optional
217 # Revision 1.1 1998/08/09 08:25:51 RD