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.
27 #----------------------------------------------------------------------
31 THISDIR=$(WXDIR)\utils\wxPython
33 EXTRALIBS=$(PYTHONDIR)\libs\python15.lib
34 EXTRAINC=-I$(PYTHONDIR)\include
35 EXTRAFLAGS=/Fpwxp.pch /YXhelpers.h -DSWIG_GLOBAL -DHAVE_CONFIG_H
37 SWIGFLAGS=-c++ -shadow -python -dnone
40 !include $(WXDIR)\src\ntwxwin.mak
42 #----------------------------------------------------------------------
46 OBJECTS = wxp.obj helpers.obj windows.obj events.obj \
47 misc.obj gdi.obj mdi.obj controls.obj \
48 controls2.obj windows2.obj cmndlgs.obj
50 PYMODULES = $(TARGETDIR)\wxp.py $(TARGETDIR)\events.py \
51 $(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
52 $(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
53 $(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
54 $(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
55 $(TARGETDIR)\__init__.py
57 #----------------------------------------------------------------------
60 DEBUGLFLAGS = /DEBUG /INCREMENTAL:YES
62 DEBUGLFLAGS = /INCREMENTAL:NO
65 LFLAGS= $(DEBUGLFLAGS) /DLL /def:$(TARGET).def /subsystem:windows,3.50 \
66 /machine:I386 /implib:./$(TARGET).lib /nologo
68 #----------------------------------------------------------------------
70 default: $(TARGETDIR)\$(TARGET).pyd pycfiles
76 nmake -f makefile.nt FINAL=$(FINAL)
81 nmake -f makefile.nt clean
85 pycfiles : $(PYMODULES)
86 $(PYTHONDIR)\python $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
87 $(PYTHONDIR)\python -O $(PYTHONDIR)\Lib\compileall.py -l $(TARGETDIR)
89 #----------------------------------------------------------------------
91 $(TARGETDIR)\$(TARGET).pyd : $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(TARGET).res
95 $(DUMMYOBJ) $(OBJECTS) $(TARGET).res
100 $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
101 $(rc) -r /i$(WXDIR)\include -fo$@ $(TARGET).rc
105 # implicit rule for compiling .cpp files
108 $(CPPFLAGS) /c /Tp $<
122 -erase $(TARGETDIR)\$(TARGET).pyd
123 -erase $(TARGETDIR)\*.py
124 -erase $(TARGETDIR)\*.pyc
125 -erase $(TARGETDIR)\*.pyo
126 -erase $(TARGETDIR)\$(TARGET).*
130 #------------------------------------------------------------------------
134 # Implicit rules to run SWIG
136 swig $(SWIGFLAGS) -c -o $*.cpp $*.i
139 swig $(SWIGFLAGS) -c -o $*.cpp $*.i
141 {}.py{$(TARGETDIR)}.py:
144 #{}.py{$(TARGETDIR)}.$(PYEXT):
145 # $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')"
150 # This one must leave out the -c flag so we define the whole rule
151 wxp.cpp wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
152 swig $(SWIGFLAGS) -o wxp.cpp wxp.i
155 # define some dependencies
156 windows.cpp windows.py : windows.i my_typemaps.i _defs.i
157 windows2.cpp windows2.py : windows2.i my_typemaps.i _defs.i
158 events.cpp events.py : events.i my_typemaps.i _defs.i
159 misc.cpp misc.py : misc.i my_typemaps.i _defs.i
160 gdi.cpp gdi.py : gdi.i my_typemaps.i _defs.i
161 mdi.cpp mdi.py : mdi.i my_typemaps.i _defs.i
162 controls.cpp controls.py : controls.i my_typemaps.i _defs.i
163 controls2.cpp controls2.py : controls2.i my_typemaps.i _defs.i
164 cmndlgs.cpp cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
167 $(TARGETDIR)\wxp.py : wxp.py
168 $(TARGETDIR)\windows.py : windows.py
169 $(TARGETDIR)\windows2.py : windows2.py
170 $(TARGETDIR)\events.py : events.py
171 $(TARGETDIR)\misc.py : misc.py
172 $(TARGETDIR)\gdi.py : gdi.py
173 $(TARGETDIR)\mdi.py : mdi.py
174 $(TARGETDIR)\controls.py : controls.py
175 $(TARGETDIR)\controls2.py : controls2.py
176 $(TARGETDIR)\cmndlgs.py : cmndlgs.py
179 #------------------------------------------------------------------------
182 # Revision 1.1 1998/08/09 08:25:51 RD