libopkg: stop exporting random symbols into the wild
[oweals/opkg-lede.git] / libopkg / Makefile.am
index 4ea4fc5..f751195 100644 (file)
@@ -1,5 +1,5 @@
 
-ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir)
+ALL_CFLAGS=-g -O -Wall -Werror -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir)
 
 libopkg_includedir=$(includedir)/libopkg
 
@@ -11,7 +11,6 @@ libopkg_include_HEADERS= \
        hash_table.h \
        includes.h \
        opkg_conf.h \
-       opkg.h \
        opkg_message.h \
        opkg_state.h \
        nv_pair.h \
@@ -30,9 +29,12 @@ libopkg_include_HEADERS= \
 
 libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
 
-opkg_core_sources = args.c args.h opkg.c \
+# make sure we only export symbols that are for public use
+libopkg_la_LDFLAGS = -export-symbols-regex "^opkg_.*"
+
+opkg_core_sources = args.c args.h \
                    user.c user.h 
-opkg_libcore_sources = args.c args.h libopkg.c libopkg.h opkg.h\
+opkg_libcore_sources = args.c args.h libopkg.c libopkg.h\
                    user.c user.h opkg_state.c opkg_state.h
 opkg_cmd_sources = opkg_cmd.c opkg_cmd.h \
                   opkg_configure.c opkg_configure.h \
@@ -59,7 +61,7 @@ libopkg_la_SOURCES = \
        $(opkg_cmd_sources) $(opkg_db_sources) \
        $(opkg_util_sources) $(opkg_list_sources)
 
-libopkg_la_CFLAGS = $(ALL_CFLAGS)  $(CURL_CFLAGS) $(GPGME_CFLAGS)
+libopkg_la_CFLAGS = $(ALL_CFLAGS) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
 lib_LTLIBRARIES = libopkg.la