# Setup is copied from Setup.in *only* if it doesn't yet exist
Setup:
- cp $(srcdir)/Setup.in Setup
+ cp Setup.in Setup
# Make the intermediate Makefile.pre from Makefile.pre.in
Makefile.pre: Makefile.pre.in sedscript
- sed -f sedscript $(srcdir)/Makefile.pre.in >Makefile.pre
+ sed -f sedscript Makefile.pre.in >Makefile.pre
# Shortcuts to make the sed arguments on one line
P=prefix
VERSION=`$(PYTHON) -c "import sys; print sys.version[:3]"`; \
installdir=`$(PYTHON) -c "import sys; print sys.prefix"`; \
exec_installdir=`$(PYTHON) -c "import sys; print sys.exec_prefix"`; \
- $(MAKE) -f $(srcdir)/Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \
+ $(MAKE) -f Makefile.pre.in VPATH=$(VPATH) srcdir=$(srcdir) \
VERSION=$$VERSION \
installdir=$$installdir \
exec_installdir=$$exec_installdir \
# Custom rules and dependencies added for wxPython
#
+ifdef MY_LDSHARED
+LDSHARED=$(MY_LDSHARED)
+endif
+
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__
# Implicit rules to run SWIG
$(GENCODEDIR)/%.cpp : %.i
swig $(SWIGFLAGS) -c -o $@ $<
- move $*.py $(GENCODEDIR)
$(GENCODEDIR)/%.py : %.i
swig $(SWIGFLAGS) -c -o $@ $<
- move $*.py $(GENCODEDIR)
# 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
- move wxp.py $(GENCODEDIR)
# define some dependencies
$(GENCODEDIR)/controls2.cpp $(GENCODEDIR)/controls2.py : controls2.i my_typemaps.i _defs.i
$(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i
+$(GENCODEDIR)/helpers.cpp:
+ ln -s `pwd`/helpers.cpp $@
wxInstall : sharedmods $(PYMODULES)
if test ! -d $(TARGETDIR) ; then \
mkdir $(TARGETDIR) ; else true ; fi
- -for i in $(SHAREDMODS); do \
- $(INSTALL_SHARED) $$i $(TARGETDIR)/$$i; \
- done
+ -chmod 755 $(SHAREDMODS); \
+ cp $(SHAREDMODS) $(TARGETDIR);
-for i in $(PYMODULES); do \
- $(INSTALL) $$i $(TARGETDIR)/$$i; \
+ cp $$i $(TARGETDIR); \
done
python $(LIBDEST)/compileall.py -l $(TARGETDIR)
python -O $(LIBDEST)/compileall.py -l $(TARGETDIR)
-# This file gives the details of what is needed to uild this extension
+# This file gives the details of what is needed to build this extension
# module so the Makefile can be created.
*shared*
CCC=c++
WXWIN=../../..
GENCODEDIR=gtk
+srcdir=$(GENCODEDIR)
+
+# Depending on how your Python was built, you may have to set this
+# value to use the C++ driver to link with instead of the default
+# C driver. Fo rexample:
+MY_LDSHARED=$(CCC) -shared
+
## Pick one of these, or set your own
#TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
wxpc wxp.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
- -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
+ -I. -I$(WXWIN)/include -I/usr/lib/glib/include -I$(WXWIN)/src \
# -D__WXDEBUG__ -ldmalloc \
-DSWIG_GLOBAL -D__WXGTK__ -L$(WXWIN)/lib/Linux -lwx_gtk \
-L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11