build: statically link libopkg
authorJo-Philipp Wich <jo@mein.io>
Fri, 10 Feb 2017 08:54:34 +0000 (09:54 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 10 Feb 2017 08:54:34 +0000 (09:54 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libbb/Makefile.am
libopkg/Makefile.am
src/Makefile.am
tests/Makefile.am

index 19015770282ab7c249163c6d0be93bc0847639d9..ac792d5832836efc43f058be42d88a3ed524e63e 100644 (file)
@@ -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 \
index f6e374d60e0c15a7ab9050043d2fc9930c2b8c40..d536c5e6f9c92b34754a8c86dd033b560bd4bed0 100644 (file)
@@ -38,16 +38,10 @@ if HAVE_SHA256
 opkg_util_sources += sha256.c sha256.h
 endif
 
-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) $(OPENSSL_LIBS) $(PATHFINDER_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
index efdc19dd39b795cb0a85e0aeb2925f1575dba277..d0549cdad1fcd8754296dd879e483d19b885376a 100644 (file)
@@ -2,5 +2,5 @@ AM_CFLAGS = -I${top_srcdir}/libopkg ${ALL_CFLAGS}
 bin_PROGRAMS = opkg-cl
 
 opkg_cl_SOURCES = opkg-cl.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 $(CURL_LIBS) $(GPGME_LIBS) $(OPENSSL_LIBS) $(PATHFINDER_LIBS)
index 1a6f56520c64f6e5c49d4b8e227518512f39c34a..a0b927a00019484d6db4b2763bb007d7d5931b40 100644 (file)
@@ -4,11 +4,11 @@ AM_CFLAGS = $(ALL_CFLAGS) -Wall -g -O3 -I${top_srcdir}/libopkg
 #noinst_PROGRAMS = libopkg_test opkg_active_list_test
 noinst_PROGRAMS = libopkg_test
 
-#opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
+#opkg_hash_test_LDADD = $(top_builddir)/libbb/libbb.a $(top_builddir)/libopkg/libopkg.a
 #opkg_hash_test_SOURCES = opkg_hash_test.c
 #opkg_hash_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
 
-#opkg_extract_test_LDADD = $(top_builddir)/libbb/libbb.la $(top_builddir)/libopkg/libopkg.la
+#opkg_extract_test_LDADD = $(top_builddir)/libbb/libbb.a $(top_builddir)/libopkg/libopkg.a
 #opkg_extract_test_SOURCES = opkg_extract_test.c
 #opkg_extract_test_CFLAGS = $(ALL_CFLAGS) -I$(top_srcdir)
 
@@ -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 $(CURL_LIBS) $(GPGME_LIBS) $(OPENSSL_LIBS) $(PATHFINDER_LIBS)
 libopkg_test_SOURCE = libopkg_test.c
 libopkg_test_LDFLAGS = -static