X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7bf854050fd5c04469d4334524433a31d4ba997a..9f06bcb3b8aea7aa709754a217c26e94fe2d5954:/utils/wxPython/src/Makefile.pre.in diff --git a/utils/wxPython/src/Makefile.pre.in b/utils/wxPython/src/Makefile.pre.in index 88d7e02d8e..22a18a2af9 100644 --- a/utils/wxPython/src/Makefile.pre.in +++ b/utils/wxPython/src/Makefile.pre.in @@ -177,6 +177,16 @@ INSTALL= $(LIBPL)/install-sh -c # Also, making them read-only seems to be a good idea... INSTALL_SHARED= ${INSTALL} -m 555 +#--------------------------------------------------- +# Possibly change some definintions for C++ +ifdef MY_LDSHARED +LDSHARED=$(MY_LDSHARED) +endif +ifdef MY_LINKCC +LINKCC=$(MY_LINKCC) +endif + + # === Fixed rules === # Default target. This builds shared libraries only @@ -198,7 +208,7 @@ $(TARGET): $(ADDOBJS) lib.a $(PYTHONLIBS) Makefile $(BASELIB) #------------------------------------------------------------------------ #------------------------------------------------------------------------ -# This is a defaul version of the install target for wxPython. It just +# This is a default version of the install target for wxPython. It just # redirects to wxInstall below... install: wxInstall @@ -236,11 +246,11 @@ config.o: config.c # 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 @@ -286,7 +296,7 @@ boot: clobber 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 \ @@ -314,64 +324,66 @@ distclean: clobber # Custom rules and dependencies added for wxPython # -SWIGFLAGS=-c++ -shadow -python -dnone -ifndef FINAL -PYEXT=pyc -PYTHON=python -else -PYEXT=pyo -PYTHON=python -O -endif +SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__ -PYMODULES = wxp.py events.py windows.py misc.py \ - gdi.py mdi.py controls.py controls2.py \ - windows2.py cmndlgs.py __init__.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 \ + $(GENCODEDIR)/utils.py $(GENCODEDIR)/windows3.py \ + __init__.py # Implicit rules to run SWIG -%.cpp : %.i - swig $(SWIGFLAGS) -c -o $*.cpp $*.i - -$(TARGETDIR)/%.py : %.py - cp $< $@ - -$(TARGETDIR)/%.$(PYEXT) : %.py - $(PYTHON) -c "import py_compile; py_compile.compile('$<', '$@')" +$(GENCODEDIR)/%.cpp : %.i + swig $(SWIGFLAGS) -c -o $@ $< -%.py : %.i - swig $(SWIGFLAGS) -c -o $*.cpp $*.i +$(GENCODEDIR)/%.py : %.i + swig $(SWIGFLAGS) -c -o $@ $< # This one must leave out the -c flag so we define the whole rule -wxp.cpp wxp.py : wxp.i my_typemaps.i _defs.i _extras.py - swig $(SWIGFLAGS) -o 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 -windows.cpp windows.py : windows.i my_typemaps.i _defs.i -windows2.cpp windows2.py : windows2.i my_typemaps.i _defs.i -events.cpp events.py : events.i my_typemaps.i _defs.i -misc.cpp misc.py : misc.i my_typemaps.i _defs.i -gdi.cpp gdi.py : gdi.i my_typemaps.i _defs.i -mdi.cpp mdi.py : mdi.i my_typemaps.i _defs.i -controls.cpp controls.py : controls.i my_typemaps.i _defs.i -controls2.cpp controls2.py : controls2.i my_typemaps.i _defs.i -cmndlgs.cpp cmndlgs.py : cmndlgs.i my_typemaps.i _defs.i - +$(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)/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)/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)/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)/utils.cpp $(GENCODEDIR)/utils.py : utils.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 + if [ "$(SHAREDMODS)" != "" ]; then \ + chmod 755 $(SHAREDMODS); \ + cp $(SHAREDMODS) $(TARGETDIR); fi -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) +lib : libwxPython.a + +libwxPython.a : lib.a + cp $< $@