# Custom rules and dependencies added for wxPython
#
+WXP_VERSION=2.1b2
-SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__
+SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__ $(SEPARATE)
-PYMODULES = $(GENCODEDIR)/wxp.py $(GENCODEDIR)/events.py \
+PYMODULES = $(GENCODEDIR)/wx.py $(GENCODEDIR)/events.py \
$(GENCODEDIR)/windows.py $(GENCODEDIR)/misc.py \
$(GENCODEDIR)/gdi.py $(GENCODEDIR)/mdi.py \
$(GENCODEDIR)/controls.py $(GENCODEDIR)/controls2.py \
$(GENCODEDIR)/windows2.py $(GENCODEDIR)/cmndlgs.py \
- $(GENCODEDIR)/frames.py $(GENCODEDIR)/stattool.py \
- __init__.py
+ $(GENCODEDIR)/stattool.py $(GENCODEDIR)/frames.py \
+ $(GENCODEDIR)/windows3.py __init__.py \
+ $(GENCODEDIR)/utils.py $(GENCODEDIR)/image.py \
+ $(GENCODEDIR)/printfw.py $(GENCODEDIR)/misc2.py \
+ $(GENCODEDIR)/glcanvas.py
# Implicit rules to run SWIG
# This one must leave out the -c flag so we define the whole rule
-$(GENCODEDIR)/wxp.cpp $(GENCODEDIR)/wxp.py : wxp.i my_typemaps.i _defs.i _extras.py
- swig $(SWIGFLAGS) -o $(GENCODEDIR)/wxp.cpp wxp.i
+$(GENCODEDIR)/wx.cpp $(GENCODEDIR)/wx.py : wx.i my_typemaps.i _defs.i _extras.py
+ swig $(SWIGFLAGS) -o $(GENCODEDIR)/wx.cpp wx.i
# define some dependencies
$(GENCODEDIR)/windows.cpp $(GENCODEDIR)/windows.py : windows.i my_typemaps.i _defs.i
$(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemaps.i _defs.i
+$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
+$(GENCODEDIR)/misc2.cpp $(GENCODEDIR)/misc2.py : misc2.i my_typemaps.i _defs.i
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
+$(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py : image.i my_typemaps.i _defs.i
+$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py : utils.i my_typemaps.i _defs.i
+$(GENCODEDIR)/printfw.cpp $(GENCODEDIR)/printfw.py : printfw.i my_typemaps.i _defs.i
+$(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py : glcanvas.i my_typemaps.i _defs.i
$(GENCODEDIR)/helpers.cpp:
ln -s `pwd`/helpers.cpp $@
+$(GENCODEDIR)/_glcanvas.cpp:
+ -cp $(WXWIN)/utils/glcanvas/$(GENCODEDIR)/glcanvas.cpp $@
+ -cp $(WXWIN)/utils/glcanvas/$(GENCODEDIR)/glcanvas.h ./glcanvas.h
+
wxInstall : sharedmods $(PYMODULES)
if test ! -d $(TARGETDIR) ; then \
mkdir $(TARGETDIR) ; else true ; fi
if [ "$(SHAREDMODS)" != "" ]; then \
- -chmod 755 $(SHAREDMODS); \
+ chmod 755 $(SHAREDMODS); \
cp $(SHAREDMODS) $(TARGETDIR); fi
-for i in $(PYMODULES); do \
cp $$i $(TARGETDIR); \
done
- python $(LIBDEST)/compileall.py -l $(TARGETDIR)
- python -O $(LIBDEST)/compileall.py -l $(TARGETDIR)
+ if [ "$(TARGETDIR)" != ".." ]; then \
+ mkdir $(TARGETDIR)/lib; \
+ mkdir $(TARGETDIR)/lib/sizers; \
+ mkdir $(TARGETDIR)/demo; \
+ mkdir $(TARGETDIR)/demo/bitmaps; \
+ cp ../lib/*.py $(TARGETDIR)/lib; \
+ cp ../lib/sizers/*.py $(TARGETDIR)/lib/sizers; \
+ cp ../demo/*.py $(TARGETDIR)/demo; \
+ cp ../lib/*.txt $(TARGETDIR)/lib; \
+ cp ../lib/sizers/*.txt $(TARGETDIR)/lib/sizers; \
+ cp ../demo/*.txt $(TARGETDIR)/demo; \
+ cp ../demo/bitmaps/[a-z]* $(TARGETDIR)/demo/bitmaps; \
+ fi
+ if [ "$(TARGETDIR)" != ".." ]; then \
+ python $(LIBDEST)/compileall.py $(TARGETDIR); \
+ python -O $(LIBDEST)/compileall.py $(TARGETDIR); \
+ else \
+ python $(LIBDEST)/compileall.py -l $(TARGETDIR); \
+ python -O $(LIBDEST)/compileall.py -l $(TARGETDIR);\
+ fi
+
+
lib : libwxPython.a
libwxPython.a : lib.a
cp $< $@
+
+dist: tgz rpm
+
+tgz:
+ cd ../..; wxPython/distrib/maketgz $(WXP_VERSION)
+
+rpm:
+ cd ../distrib; ./makerpm $(WXP_VERSION)
+