1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 01:27:30 +02:00

opkg: get rid of libopkg, saves >10k compressed, >40k uncompressed

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18091 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2009-10-20 08:21:10 +00:00
parent 96ff9f58c6
commit 628a773644
2 changed files with 57 additions and 4 deletions

View File

@ -41,9 +41,8 @@ define Package/opkg/conffiles
/etc/opkg.conf
endef
TARGET_CFLAGS += $(FPIC) $(if $(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),-Wno-array-bounds)
TARGET_CFLAGS += $(if $(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4),-Wno-array-bounds)
EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
EXTRA_LDFLAGS += $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
CONFIGURE_ARGS += \
--disable-curl \
@ -72,8 +71,6 @@ define Package/opkg/install
$(INSTALL_DATA) ./files/opkg.conf $(1)/etc/
$(SED) 's,$$$$S,$(PKGARCH),g' $(1)/etc/opkg.conf
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libopkg.so.* $(1)/usr/lib/
endef
define Build/InstallDev

View File

@ -0,0 +1,56 @@
--- a/libopkg/Makefile.am
+++ b/libopkg/Makefile.am
@@ -30,15 +30,10 @@ opkg_util_sources = file_util.c file_uti
sprintf_alloc.c sprintf_alloc.h str_util.c str_util.h \
xregex.c xregex.h xsystem.c xsystem.h
-lib_LTLIBRARIES = libopkg.la
-libopkg_la_SOURCES = \
+noinst_LIBRARIES = libopkg.a
+libopkg_a_SOURCES = \
$(opkg_libcore_sources) \
$(opkg_cmd_sources) $(opkg_db_sources) \
$(opkg_util_sources) $(opkg_list_sources)
-libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
-# make sure we only export symbols that are for public use
-libopkg_la_LDFLAGS = -export-symbols-regex "^opkg_.*"
-
-
-
+libopkg_a_LIBADD = $(top_builddir)/libbb/libbb.a $(CURL_LIBS) $(GPGME_LIBS)
--- a/libbb/Makefile.am
+++ b/libbb/Makefile.am
@@ -2,9 +2,9 @@ HOST_CPU=@host_cpu@
BUILD_CPU=@build_cpu@
ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"$(HOST_CPU)\" -DBUILD_CPU=@build_cpu@
-noinst_LTLIBRARIES = libbb.la
+noinst_LIBRARIES = libbb.a
-libbb_la_SOURCES = gz_open.c \
+libbb_a_SOURCES = gz_open.c \
libbb.h \
unzip.c \
wfopen.c \
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,5 +2,5 @@ AM_CFLAGS = -I${top_srcdir}/libopkg ${AL
bin_PROGRAMS = opkg-cl
opkg_cl_SOURCES = opkg-frontend.c
-opkg_cl_LDADD = $(top_builddir)/libopkg/libopkg.la \
- $(top_builddir)/libbb/libbb.la
+opkg_cl_LDADD = $(top_builddir)/libopkg/libopkg.a \
+ $(top_builddir)/libbb/libbb.a
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,7 +16,7 @@ noinst_PROGRAMS = libopkg_test
#opkg_active_list_test_SOURCES = opkg_active_list_test.c
#opkg_active_list_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
-libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.la
+libopkg_test_LDADD = $(top_builddir)/libopkg/libopkg.a $(top_builddir)/libbb/libbb.a
libopkg_test_SOURCE = libopkg_test.c