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 $@ $<
149 move $(@B).py $(GENCODEDIR)
151 {}.i{$(GENCODEDIR)}.py:
152 swig $(SWIGFLAGS) -c -o $@ $<
153 move $(@B).py $(GENCODEDIR)
156 {$(GENCODEDIR)}.py{$(TARGETDIR)}.py:
159 {}.py{$(TARGETDIR)}.py:
162 #{}.py{$(TARGETDIR)}.$(PYEXT):
163 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
168 # This one must leave out the -c flag so we define the whole rule
169 $(GENCODEDIR)\wxp.cpp $(GENCODEDIR)\wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
170 swig $(SWIGFLAGS) -o $(GENCODEDIR)\wxp.cpp wxp.i
171 move wxp.py $(GENCODEDIR)\wxp.py
174 # define some dependencies
175 $(GENCODEDIR)\windows.cpp $(GENCODEDIR)\windows.py : windows.i my_typemaps.i _defs.i
176 $(GENCODEDIR)\windows2.cpp $(GENCODEDIR)\windows2.py : windows2.i my_typemaps.i _defs.i
177 $(GENCODEDIR)\events.cpp $(GENCODEDIR)\events.py : events.i my_typemaps.i _defs.i
178 $(GENCODEDIR)\misc.cpp $(GENCODEDIR)\misc.py : misc.i my_typemaps.i _defs.i
179 $(GENCODEDIR)\gdi.cpp $(GENCODEDIR)\gdi.py : gdi.i my_typemaps.i _defs.i
180 $(GENCODEDIR)\mdi.cpp $(GENCODEDIR)\mdi.py : mdi.i my_typemaps.i _defs.i
181 $(GENCODEDIR)\controls.cpp $(GENCODEDIR)\controls.py : controls.i my_typemaps.i _defs.i
182 $(GENCODEDIR)\controls2.cpp $(GENCODEDIR)\controls2.py : controls2.i my_typemaps.i _defs.i
183 $(GENCODEDIR)\cmndlgs.cpp $(GENCODEDIR)\cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
186 $(TARGETDIR)\wxp.py : $(GENCODEDIR)\wxp.py
187 $(TARGETDIR)\windows.py : $(GENCODEDIR)\windows.py
188 $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
189 $(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
190 $(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
191 $(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
192 $(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
193 $(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
194 $(TARGETDIR)\controls2.py : $(GENCODEDIR)\controls2.py
195 $(TARGETDIR)\cmndlgs.py : $(GENCODEDIR)\cmndlgs.py
196 $(TARGETDIR)\__init__.py : __init__.py
199 #------------------------------------------------------------------------
202 # Revision 1.4 1998/08/18 21:55:10 RD
203 # New build directory structure
205 # Revision 1.3 1998/08/15 07:36:37 RD
206 # - Moved the header in the .i files out of the code that gets put into
207 # the .cpp files. It caused CVS conflicts because of the RCS ID being
208 # different each time.
210 # - A few minor fixes.
212 # Revision 1.2 1998/08/14 03:34:23 RD
213 # made pre-compiling the python files optional
215 # Revision 1.1 1998/08/09 08:25:51 RD