build and link static libraries without libtool
authorAndreas Oberritter <obi@opendreambox.org>
Thu, 28 Oct 2010 22:05:46 +0000 (00:05 +0200)
committerAndreas Oberritter <obi@opendreambox.org>
Tue, 16 Nov 2010 16:15:38 +0000 (17:15 +0100)
14 files changed:
lib/Makefile.am
lib/actions/Makefile.am
lib/base/Makefile.am
lib/components/Makefile.am
lib/driver/Makefile.am
lib/dvb/Makefile.am
lib/dvb_ci/Makefile.am
lib/gdi/Makefile.am
lib/gui/Makefile.am
lib/mmi/Makefile.am
lib/nav/Makefile.am
lib/python/Makefile.am
lib/service/Makefile.am
main/Makefile.am

index f56174860c2a79126655a7fb0b2812260b75442c..bd89aeefe894adb6e5d21be6f5a29832bfe509ea 100644 (file)
@@ -1,18 +1 @@
 SUBDIRS = actions base components dvb dvb_ci gdi service driver nav gui python mmi
-
-noinst_LTLIBRARIES = libenigma.la
-
-libenigma_la_SOURCES =
-libenigma_la_LIBADD = \
-       $(top_builddir)/lib/actions/libenigma_actions.la \
-       $(top_builddir)/lib/base/libenigma_base.la \
-       $(top_builddir)/lib/components/libenigma_components.la \
-       $(top_builddir)/lib/driver/libenigma_driver.la \
-       $(top_builddir)/lib/mmi/libenigma_mmi.la \
-       $(top_builddir)/lib/dvb/libenigma_dvb.la \
-       $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.la \
-       $(top_builddir)/lib/gdi/libenigma_gdi.la \
-       $(top_builddir)/lib/gui/libenigma_gui.la \
-       $(top_builddir)/lib/python/libenigma_python.la \
-       $(top_builddir)/lib/nav/libenigma_nav.la \
-       $(top_builddir)/lib/service/libenigma_service.la
index 83f57d3d69babef97bf58cc4949286e3511d6ce2..75357868298f82ab2a953ce6ff213085a5f6a299 100644 (file)
@@ -7,13 +7,13 @@ AM_CPPFLAGS = \
 
 EXTRA_DIST = parseactions.py
 
-noinst_LTLIBRARIES = libenigma_actions.la
+noinst_LIBRARIES = libenigma_actions.a
 
-libenigma_actions_la_SOURCES = \
+libenigma_actions_a_SOURCES = \
        action.cpp \
        action.h
 
-nodist_libenigma_actions_la_SOURCES = \
+nodist_libenigma_actions_a_SOURCES = \
        actionids.h
 
 BUILT_SOURCES = actionids.h
index 230a37ae10ef9c11a302903bcf8f3c97763c1f96..652ef9cdbe4eea962024788b298340b8699ae990 100644 (file)
@@ -4,9 +4,9 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_base.la
+noinst_LIBRARIES = libenigma_base.a
 
-libenigma_base_la_SOURCES = \
+libenigma_base_a_SOURCES = \
        buffer.cpp \
        buffer.h \
        connection.cpp \
index cef5890e5d3271d5753fd0dc984173fff7737cc3..e873e5257ff2d0065a63e3e9874f3a7d1fff9ae2 100644 (file)
@@ -4,9 +4,9 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_components.la
+noinst_LIBRARIES = libenigma_components.a
 
-libenigma_components_la_SOURCES = \
+libenigma_components_a_SOURCES = \
        file_eraser.cpp \
        file_eraser.h \
        scan.cpp \
index 74d24fab6947a7ebbce205fe0c15846161c55c90..63a205a8976c91ec090b7240f79997abde6817bd 100644 (file)
@@ -4,9 +4,9 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_driver.la
+noinst_LIBRARIES = libenigma_driver.a
 
-libenigma_driver_la_SOURCES = \
+libenigma_driver_a_SOURCES = \
        avswitch.cpp \
        avswitch.h \
        etimezone.cpp \
index 91464982298cc2794432a285a88fc64c8c83b0d5..74b43d0a4176e396ad2f12451d8347651aeb78b1 100644 (file)
@@ -6,9 +6,9 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_dvb.la
+noinst_LIBRARIES = libenigma_dvb.a
 
-libenigma_dvb_la_SOURCES = \
+libenigma_dvb_a_SOURCES = \
        crc32.cpp \
        crc32.h \
        db.cpp \
index af839e73f402fc4f5ea4b0bff51b2dd36794e94c..c53c4da5a7418ca3fa920debd0f0f6da1309d428 100644 (file)
@@ -4,9 +4,9 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_dvb_ci.la
+noinst_LIBRARIES = libenigma_dvb_ci.a
 
-libenigma_dvb_ci_la_SOURCES = \
+libenigma_dvb_ci_a_SOURCES = \
        dvbci.cpp \
        dvbci.h \
        dvbci_appmgr.cpp \
index 5f2aee9b0c7ded90df5132321bb8bb132ff21186..a47855ff2d05438e71380cb8bf59de0b5d1668e1 100644 (file)
@@ -7,9 +7,9 @@ AM_CPPFLAGS = \
 AM_CXXFLAGS = \
        $(LIBSDL_CFLAGS)
 
-noinst_LTLIBRARIES = libenigma_gdi.la
+noinst_LIBRARIES = libenigma_gdi.a
 
-libenigma_gdi_la_SOURCES = \
+libenigma_gdi_a_SOURCES = \
        accel.cpp \
        accel.h \
        bcm.cpp \
@@ -46,7 +46,7 @@ libenigma_gdi_la_SOURCES = \
        region.h
 
 if HAVE_LIBSDL
-libenigma_gdi_la_SOURCES += \
+libenigma_gdi_a_SOURCES += \
        sdl.cpp \
        sdl.h
 endif
index 39c05d9a163794681620c525508b863cc79494bc..30b00bfbe93094e3a968051e8ac6f41e4d7fbef1 100644 (file)
@@ -4,9 +4,9 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_gui.la
+noinst_LIBRARIES = libenigma_gui.a
 
-libenigma_gui_la_SOURCES = \
+libenigma_gui_a_SOURCES = \
        ebutton.cpp \
        ebutton.h \
        ecanvas.cpp \
index a082949db0f82ff14cc1a6fdd77732144863459b..9c821c97dbde410eebdc99c4d400ff539aab9285 100644 (file)
@@ -4,8 +4,8 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_mmi.la
+noinst_LIBRARIES = libenigma_mmi.a
 
-libenigma_mmi_la_SOURCES = \
+libenigma_mmi_a_SOURCES = \
        mmi_ui.cpp \
        mmi_ui.h
index c6d1c927607b13a9a49d24ffbc1515c53ff53862..fc3dadc7a6318bd2d3c1393aa13701711e86bdbe 100644 (file)
@@ -4,9 +4,9 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
-noinst_LTLIBRARIES = libenigma_nav.la
+noinst_LIBRARIES = libenigma_nav.a
 
-libenigma_nav_la_SOURCES = \
+libenigma_nav_a_SOURCES = \
        core.cpp \
        core.h \
        pcore.cpp \
index 3c213a172aac4d800ab9c629bde98af3bdccd753..5cbda78097cf4fc202e11b1308892d8f574310ae 100644 (file)
@@ -6,16 +6,16 @@ AM_CPPFLAGS = \
 
 SUBDIRS = Components Tools Screens Plugins
 
-noinst_LTLIBRARIES = libenigma_python.la
+noinst_LIBRARIES = libenigma_python.a
 
-libenigma_python_la_SOURCES = \
+libenigma_python_a_SOURCES = \
        connections.cpp \
        connections.h \
        python.cpp \
        python.h \
        swig.h
 
-nodist_libenigma_python_la_SOURCES = \
+nodist_libenigma_python_a_SOURCES = \
        enigma_python_wrap.cxx
 
 EXTRA_DIST = \
index 18c012a584be057d4c85e132dd709de662c74d1b..a19b8b1b8b6c7924efcf899f2a631a3497cf4cbf 100644 (file)
@@ -7,9 +7,9 @@ AM_CPPFLAGS = \
 AM_CXXFLAGS = \
        $(LIBXINE_CFLAGS)
 
-noinst_LTLIBRARIES = libenigma_service.la
+noinst_LIBRARIES = libenigma_service.a
 
-libenigma_service_la_SOURCES = \
+libenigma_service_a_SOURCES = \
        event.cpp \
        event.h \
        iservice.h \
@@ -27,7 +27,7 @@ libenigma_service_la_SOURCES = \
        servicemp3.h
 
 if HAVE_LIBXINE
-libenigma_service_la_SOURCES += \
+libenigma_service_a_SOURCES += \
        servicexine.cpp \
        servicexine.h
 endif
index 33bebdf0fd7486d6c0469b99080a6a46bc7ead01..c96f9066b7d0fadf0864e259227e8f157a0f0a14 100644 (file)
@@ -22,8 +22,21 @@ EXTRA_DIST = \
        enigma-playlist.cpp \
        enigma-scan.cpp
 
+enigma2_LDADD_WHOLE = \
+       $(top_builddir)/lib/actions/libenigma_actions.a \
+       $(top_builddir)/lib/base/libenigma_base.a \
+       $(top_builddir)/lib/components/libenigma_components.a \
+       $(top_builddir)/lib/driver/libenigma_driver.a \
+       $(top_builddir)/lib/mmi/libenigma_mmi.a \
+       $(top_builddir)/lib/dvb/libenigma_dvb.a \
+       $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.a \
+       $(top_builddir)/lib/gdi/libenigma_gdi.a \
+       $(top_builddir)/lib/gui/libenigma_gui.a \
+       $(top_builddir)/lib/python/libenigma_python.a \
+       $(top_builddir)/lib/nav/libenigma_nav.a \
+       $(top_builddir)/lib/service/libenigma_service.a
+
 enigma2_LDADD = \
-       $(top_builddir)/lib/libenigma.la \
        @BASE_LIBS@ \
        @LIBGIF_LIBS@ \
        @LIBJPEG_LIBS@ \
@@ -33,6 +46,10 @@ enigma2_LDADD = \
        @PTHREAD_LIBS@ \
        @PYTHON_LDFLAGS@
 
+enigma2_LDFLAGS = -Wl,--export-dynamic
+
+BUILT_SOURCES = version.h
+
 GIT_DIR = $(top_srcdir)/.git
 
 version.h:
@@ -52,3 +69,7 @@ version.h:
 dist-hook:
        echo "#define ENIGMA2_LAST_CHANGE_DATE \"`date --rfc-3339=date`\"" > version.h;
        echo "#define ENIGMA2_BRANCH \"$(PACKAGE_VERSION)\"" >> version.h;
+
+enigma2$(EXEEXT): $(enigma2_OBJECTS) $(enigma2_DEPENDENCIES) $(enigma2_LDADD_WHOLE)
+       $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ $(enigma2_LDFLAGS) $(enigma2_OBJECTS) \
+               -Wl,--whole-archive $(enigma2_LDADD_WHOLE) -Wl,--no-whole-archive $(enigma2_LDADD) $(LIBS)