diff --git a/apps/py_sems/Makefile b/apps/py_sems/Makefile index 91b824bb..b044b7ea 100644 --- a/apps/py_sems/Makefile +++ b/apps/py_sems/Makefile @@ -30,7 +30,8 @@ PYTHON_DYNLOAD_MODULES = $(wildcard $(PYTHON_LIBDIR)/lib-dynload/*.so) \ PYTHON_module_cflags = -I$(PYTHON_DIR) -Isip/ PYTHON_module_ldflags = -Xlinker --export-dynamic \ -L$(PYTHON_LIBDIR)/config \ - -lpython$(PY_VER) $(wildcard sip/*.o) + -lpython$(PY_VER) + #\ #$(PYTHON_DYNLOAD_MODULES) @@ -87,6 +88,8 @@ python_files: endif +module_extra_objs = sip/py_sems_lib.a + extra_clean = clean_py_sems_lib include $(COREPATH)/plug-in/Makefile.app_module @@ -103,4 +106,8 @@ install_python_files: $(modules-prefix)/$(modules-dir) .PHONY: clean_py_sems_lib clean_py_sems_lib: - cd sip; $(MAKE) clean \ No newline at end of file + $(MAKE) -C sip/ clean + rm -f sip/py_sems_lib.a + +sip/py_sems_lib.a: + $(MAKE) -C sip/ py_sems_lib.a diff --git a/apps/py_sems/sip/Makefile b/apps/py_sems/sip/Makefile index 1e144940..2f18944b 100644 --- a/apps/py_sems/sip/Makefile +++ b/apps/py_sems/sip/Makefile @@ -1,17 +1,16 @@ COREPATH ?=../../../core -PY_VER = 2.3 -SIP_FILES = $(wildcard *.sip) - -.PHONY: all -all: py_sems.so +AR ?= ar +RANLIB ?= ranlib +PYTHON_VERSION ?= 2.4 +PY_VER = $(PYTHON_VERSION) -.PHONY: clean -clean: - $(MAKE) -f Makefile.gen clean +SIP_FILES = $(wildcard *.sip) +lib_name = py_sems_lib.a +include Makefile.gen .PHONY: cleaner cleaner: clean @@ -20,5 +19,8 @@ cleaner: clean Makefile.gen: configure.py $(SIP_FILES) python$(VER) configure.py -py_sems.so: Makefile.gen $(SIP_FILES) - $(MAKE) -f Makefile.gen COREPATH=$(COREPATH) +$(lib_name): $(OFILES) Makefile.gen + if [ -f $(lib_name) ]; then rm $(RMFLAGS) $(lib_name) ; fi + $(AR) $(ARFLAGS) $(lib_name) $(OFILES) + $(RANLIB) $(lib_name) + diff --git a/apps/py_sems/sip/Makefile.gen b/apps/py_sems/sip/Makefile.gen index 9370c941..e4942285 100644 --- a/apps/py_sems/sip/Makefile.gen +++ b/apps/py_sems/sip/Makefile.gen @@ -5,7 +5,7 @@ HFILES = sipAPIpy_sems_lib.h sippy_sems_libPySemsDialog.h sippy_sems_libAmAudioF CC = gcc CXX = g++ LINK = g++ -CPPFLAGS = -I. -I$(COREPATH) -I/usr/include/python2.3 +CPPFLAGS = -I. -I$(COREPATH) -I/usr/include/python2.4 CFLAGS = -pipe -fPIC -O2 -w CXXFLAGS = -Wall -Wno-reorder -g -pipe -fPIC -O2 -w LFLAGS = -g -shared -Wl,--version-script=py_sems_lib.exp @@ -35,9 +35,9 @@ $(TARGET): $(OFILES) $(OFILES): $(HFILES) install: $(TARGET) - @test -d $(DESTDIR)/usr/lib/python2.3/site-packages || mkdir -p $(DESTDIR)/usr/lib/python2.3/site-packages - cp -f $(TARGET) $(DESTDIR)/usr/lib/python2.3/site-packages/$(TARGET) - strip $(DESTDIR)/usr/lib/python2.3/site-packages/$(TARGET) + @test -d $(DESTDIR)/usr/lib/python2.4/site-packages || mkdir -p $(DESTDIR)/usr/lib/python2.4/site-packages + cp -f $(TARGET) $(DESTDIR)/usr/lib/python2.4/site-packages/$(TARGET) + strip $(DESTDIR)/usr/lib/python2.4/site-packages/$(TARGET) clean: -rm -f $(TARGET)