Skip to content

Commit

Permalink
config,make: remove un-needed library dependencies
Browse files Browse the repository at this point in the history
Also, improve the usage of existing pkg-config support
for libraries (apteryx, glib)

Reviewed-by: Carl Smith <[email protected]>
Signed-off-by: Scott Parlane <[email protected]>
  • Loading branch information
sparlane committed Jul 3, 2016
1 parent f0903fe commit 24e9f3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
11 changes: 4 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,18 @@ SUBDIRS = api pcpd
include $(PCP_ROOT)/common.mk

AM_CFLAGS = -Wall -Werror \
-I$(CROSS_DEV_ROOT_DIR)/usr/include/glib-2.0 \
-I$(CROSS_DEV_ROOT_DIR)/usr/lib/glib-2.0/include
$(GLIB_CFLAGS)
AM_CPPFLAGS = \
-I. -I$(CROSS_DEV_ROOT_DIR)/usr/include/glib-2.0 \
-I$(CROSS_DEV_ROOT_DIR)/usr/lib/glib-2.0/include
-I. $(GLIB_CFLAGS)

if HAVE_UNITTEST
bin_PROGRAMS = packets_pcp_unit_tests libpcp_unit_tests

packets_pcp_unit_tests_SOURCES = tests/packets_pcp_unit_tests.c pcpd/packets_pcp_serialization.c pcpd/packets_pcp.c
packets_pcp_unit_tests_CFLAGS = $(AM_CFLAGS) -g $(NOVAPROVA_CFLAGS)
packets_pcp_unit_tests_LDADD = $(NOVAPROVA_LIBS) $(GLIBMM_LIBS) $(GOBJECT_LIBS) $(LIBXMLXX_LIBS) $(LIBXML_LIBS) $(SIGCXX_LIBS)
packets_pcp_unit_tests_LDADD = $(NOVAPROVA_LIBS)

libpcp_unit_tests_SOURCES = tests/libpcp_unit_tests.c api/pcp.c
libpcp_unit_tests_CFLAGS = $(AM_CFLAGS) -g $(NOVAPROVA_CFLAGS) -D_GNU_SOURCE
libpcp_unit_tests_LDADD = $(NOVAPROVA_LIBS) $(GLIBMM_LIBS) $(GOBJECT_LIBS) $(LIBXMLXX_LIBS) $(LIBXML_LIBS) $(SIGCXX_LIBS)
libpcp_unit_tests_LDFLAGS = -lapteryx
libpcp_unit_tests_LDADD = $(NOVAPROVA_LIBS) $(APTERYX_LIBS)
endif
8 changes: 2 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ AC_PROG_INSTALL
AC_PROG_MAKE_SET

PKG_CHECK_MODULES([NOVAPROVA],[novaprova],[],[unittest_prereq=no])
PKG_CHECK_MODULES([GLIB],[glib-2.0],[],[unittest_prereq=no])
PKG_CHECK_MODULES([GLIBMM],[glibmm-2.4],[],[unittest_prereq=no])
PKG_CHECK_MODULES([GOBJECT],[gobject-2.0],[],[unittest_prereq=no])
PKG_CHECK_MODULES([LIBXMLXX],[libxml++-2.6],[],[unittest_prereq=no])
PKG_CHECK_MODULES([LIBXML],[libxml-2.0],[],[unittest_prereq=no])
PKG_CHECK_MODULES([SIGCXX],[sigc++-2.0],[],[unittest_prereq=no])
PKG_CHECK_MODULES([GLIB],[glib-2.0])
PKG_CHECK_MODULES([APTERYX],[apteryx])

AC_ARG_ENABLE([unittest],
[AS_HELP_STRING([--enable-unittest],
Expand Down

0 comments on commit 24e9f3d

Please sign in to comment.