build: allow overriding host cpu with make variable
[oweals/opkg-lede.git] / libopkg / Makefile.am
index f21ecb246953815c3930cf7799d33e4a7723e25b..f6e374d60e0c15a7ab9050043d2fc9930c2b8c40 100644 (file)
@@ -1,39 +1,13 @@
-
-ALL_CFLAGS=-g -O -Wall -Werror -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir)
+HOST_CPU=@host_cpu@
+AM_CFLAGS=-Wall -DHOST_CPU_STR=\"$(HOST_CPU)\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DOPKGETCDIR=\"@opkgetcdir@\" -DOPKGLOCKFILE=\"@opkglockfile@\" -DDATADIR=\"@datadir@\" -I$(top_srcdir) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS) $(PATHFINDER_CFLAGS)
 
 libopkg_includedir=$(includedir)/libopkg
+libopkg_include_HEADERS= *.h
 
-libopkg_include_HEADERS= \
-       args.h \
-       conffile.h \
-       conffile_list.h \
-       config.h \
-       hash_table.h \
-       includes.h \
-       opkg_conf.h \
-       opkg.h \
-       opkg_message.h \
-       opkg_state.h \
-       nv_pair.h \
-       nv_pair_list.h \
-       pkg_depends.h \
-       pkg_dest.h \
-       pkg_dest_list.h \
-       pkg.h \
-       pkg_hash.h \
-       pkg_src.h \
-       pkg_src_list.h \
-       pkg_vec.h \
-       str_list.h \
-       void_list.h \
-       libopkg.h 
-
-libopkg_la_LIBADD = $(top_builddir)/libbb/libbb.la $(CURL_LIBS) $(GPGME_LIBS)
 
-opkg_core_sources = args.c args.h opkg.c \
-                   user.c user.h 
-opkg_libcore_sources = args.c args.h libopkg.c libopkg.h opkg.h\
-                   user.c user.h opkg_state.c opkg_state.h
+opkg_libcore_sources = \
+                   opkg.c opkg.h \
+                   opkg_defines.h
 opkg_cmd_sources = opkg_cmd.c opkg_cmd.h \
                   opkg_configure.c opkg_configure.h \
                   opkg_download.c opkg_download.h \
@@ -41,6 +15,7 @@ opkg_cmd_sources = opkg_cmd.c opkg_cmd.h \
                   opkg_upgrade.c opkg_upgrade.h \
                   opkg_remove.c opkg_remove.h
 opkg_db_sources = opkg_conf.c opkg_conf.h \
+                 release.c release.h release_parse.c release_parse.h \
                  opkg_utils.c opkg_utils.h pkg.c pkg.h hash_table.h \
                  pkg_depends.c pkg_depends.h pkg_extract.c pkg_extract.h \
                  hash_table.c pkg_hash.c pkg_hash.h pkg_parse.c pkg_parse.h \
@@ -49,17 +24,30 @@ opkg_list_sources = conffile.c conffile.h conffile_list.c conffile_list.h \
                    nv_pair.c nv_pair.h nv_pair_list.c nv_pair_list.h \
                    pkg_dest.c pkg_dest.h pkg_dest_list.c pkg_dest_list.h \
                    pkg_src.c pkg_src.h pkg_src_list.c pkg_src_list.h \
-                   str_list.c str_list.h void_list.c void_list.h
+                   str_list.c str_list.h void_list.c void_list.h \
+                   active_list.c active_list.h list.h 
 opkg_util_sources = file_util.c file_util.h opkg_message.h opkg_message.c md5.c md5.h \
-                   sprintf_alloc.c sprintf_alloc.h str_util.c str_util.h \
+                   parse_util.c parse_util.h \
+                   cksum_list.c cksum_list.h \
+                   sprintf_alloc.c sprintf_alloc.h \
                    xregex.c xregex.h xsystem.c xsystem.h
+if HAVE_PATHFINDER
+opkg_util_sources += opkg_pathfinder.c opkg_pathfinder.h
+endif
+if HAVE_SHA256
+opkg_util_sources += sha256.c sha256.h
+endif
 
+lib_LTLIBRARIES = libopkg.la
 libopkg_la_SOURCES = \
        $(opkg_libcore_sources) \
        $(opkg_cmd_sources) $(opkg_db_sources) \
        $(opkg_util_sources) $(opkg_list_sources)
 
-libopkg_la_CFLAGS = $(ALL_CFLAGS)  $(CURL_CFLAGS) $(GPGME_CFLAGS)
-lib_LTLIBRARIES = libopkg.la
+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_.*"
+