diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-03-06 22:55:51 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2017-03-08 14:18:05 -0500 |
commit | ef2325d4633a7f7a2863a1c9e0fe20178ae7f24b (patch) | |
tree | 6382642c066a26c29de87a4407783de802eea01a | |
parent | 3ea767d8945796a30fbe59c47d257e4e6d641458 (diff) | |
download | phosphor-inventory-manager-ef2325d4633a7f7a2863a1c9e0fe20178ae7f24b.tar.gz phosphor-inventory-manager-ef2325d4633a7f7a2863a1c9e0fe20178ae7f24b.zip |
Build: Autotools usage improvements
Define CXXFLAGS rather than CFLAGS.
Add libraries via LIBADD rather than LDFLAGS. This allows
--as-needed to drop unnecessary libs if present.
Don't bother with PIC objects for convenience library.
Change-Id: I8e09a79a69b35be702811b594fed506332a23c43
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | test/Makefile.am | 9 |
2 files changed, 11 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index b6871d0..a78f45e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,10 +8,10 @@ noinst_LTLIBRARIES = libmanagercommon.la libmanager.la extra_yamldir=$(YAML_PATH)/extra_interfaces.d phosphor_inventory_SOURCES = app.cpp -phosphor_inventory_LDADD = libmanager.la -phosphor_inventory_LDFLAGS = $(SDBUSPLUS_LIBS) -phosphor_inventory_CFLAGS = $(SDBUSPLUS_CFLAGS) +phosphor_inventory_LDADD = libmanager.la $(SDBUSPLUS_LIBS) +phosphor_inventory_CXXFLAGS = $(SDBUSPLUS_CFLAGS) +libmanagercommon_la_LDFLAGS = -static libmanagercommon_la_SOURCES = \ errors.cpp \ functor.cpp \ @@ -20,11 +20,12 @@ libmanagercommon_la_LIBADD = \ $(SDBUSPLUS_LIBS) \ $(PHOSPHOR_DBUS_INTERFACES_LIBS) \ $(PHOSPHOR_LOGGING_LIBS) -libmanagercommon_la_CFLAGS = \ +libmanagercommon_la_CXXFLAGS = \ $(SDBUSPLUS_CFLAGS) \ $(PHOSPHOR_DBUS_INTERACES_CFLAGS) \ $(PHOSPHOR_LOGGING_CFLAGS) +libmanager_la_LDFLAGS = -static libmanager_la_SOURCES = \ extra_ifaces.cpp \ generated.cpp diff --git a/test/Makefile.am b/test/Makefile.am index 974623d..deda4ff 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -10,12 +10,15 @@ noinst_LTLIBRARIES = libtest.la extra_yamldir=$(top_srcdir)/example/extra_interfaces.d phosphor_inventory_test_SOURCES = test.cpp -phosphor_inventory_test_LDADD = libtest.la -phosphor_inventory_test_LDFLAGS = \ +phosphor_inventory_test_LDADD = \ + libtest.la $(SDBSUPLUS_LIBS) \ + $(PTHREAD_LIBS) +phosphor_inventory_test_CXXFLAGS = \ + $(SDBUSPLUS_CFLAGS) \ $(PTHREAD_CFLAGS) -phosphor_inventory_test_CFLAGS = $(SDBUSPLUS_CFLAGS) +libtest_la_LDFLAGS = -static libtest_la_SOURCES = \ extra_ifaces.cpp \ generated.cpp |