Minor reorder and simplification of autotools files
Change-Id: I55db0cf7f6041890564f557c98286c8b4bde80cb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/Makefile.am b/Makefile.am
index cbdfa04..d90cd38 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,14 +1,7 @@
AM_DEFAULT_SOURCE_EXT = .cpp
-testit_SOURCES = \
- ipmisensor.cpp \
- testit.cpp
-testit_LDFLAGS = $(SYSTEMD_LIBS) $(LIBADD_DLOPEN)
-
-#testaddsel_SOURCES = \
-# testaddsel.cpp \
-# storageaddsel.cpp
-#testaddsel_LDFLAGS = $(SYSTEMD_CFLAGS) $(SYSTEMD_LIBS) $(LIBADD_DLOPEN)
+sbin_PROGRAMS = \
+ ipmid
ipmid_SOURCES = \
ipmid.cpp
@@ -16,12 +9,17 @@
nodist_ipmid_SOURCES = ipmiwhitelist.cpp
BUILT_SOURCES = ipmiwhitelist.cpp
CLEANFILES = ipmiwhitelist.cpp
-WHITELIST_CONF ?= ${srcdir}/host-ipmid-whitelist.conf
-ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
- ${srcdir}/$^ > $@
+
#TODO - Make this path a configure option (bitbake parameter)
ipmid_CPPFLAGS = -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\"
ipmid_LDFLAGS = $(SYSTEMD_LIBS) $(libmapper_LIBS) $(LIBADD_DLOPEN) -export-dynamic
+# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
+# selective list of symbols.
+
+WHITELIST_CONF ?= ${srcdir}/host-ipmid-whitelist.conf
+ipmiwhitelist.cpp: ${srcdir}/generate_whitelist.sh $(WHITELIST_CONF)
+ ${srcdir}/$^ > $@
+
libapphandlerdir = /usr/lib/host-ipmid
libapphandler_LTLIBRARIES = libapphandler.la
@@ -46,16 +44,22 @@
libhostservice_la_LDFLAGS = $(SYSTEMD_LIBS) $(libmapper_LIBS) -version-info 0:0:0 -shared
libhostservice_la_CXXFLAGS = $(SYSTEMD_CFLAGS) $(libmapper_CFLAGS)
-libdir = /usr/lib/host-ipmid
includedir = /usr/include/host-ipmid
include_HEADERS = \
ipmid-api.h
-#default sbin dir
-sbin_PROGRAMS = \
- ipmid
-
check_PROGRAMS = \
testit
# testaddsel
+
+testit_SOURCES = \
+ ipmisensor.cpp \
+ testit.cpp
+testit_LDFLAGS = $(SYSTEMD_LIBS) $(LIBADD_DLOPEN)
+
+#testaddsel_SOURCES = \
+# testaddsel.cpp \
+# storageaddsel.cpp
+#testaddsel_LDFLAGS = $(SYSTEMD_CFLAGS) $(SYSTEMD_LIBS) $(LIBADD_DLOPEN)
+
diff --git a/configure.ac b/configure.ac
index b292adf..8e1b587 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,12 +3,12 @@
AC_INIT([phosphor-host-ipmid], [1.0], [https://github.com/openbmc/phosphor-host-ipmid/issues])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
-AM_PROG_AR()
# Checks for programs.
AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX(14, [noext])
+AX_CXX_COMPILE_STDCXX_14([noext])
AC_PROG_CC
+AM_PROG_AR
AC_PROG_INSTALL
AC_PROG_MAKE_SET
@@ -22,10 +22,8 @@
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
-LT_INIT
+LT_INIT([dlopen disable-static shared])
LT_LIB_DLLOAD
-AC_ENABLE_SHARED
-AC_DISABLE_STATIC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT