summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/Makefile.am12
-rw-r--r--common/tests/Makefile.am14
-rw-r--r--p11-kit/Makefile.am34
-rw-r--r--p11-kit/tests/Makefile.am8
-rw-r--r--tools/Makefile.am12
5 files changed, 37 insertions, 43 deletions
diff --git a/common/Makefile.am b/common/Makefile.am
index f37a501..754d7cd 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -2,9 +2,17 @@ NULL =
SUBDIRS = . tests
-EXTRA_DIST = \
- array.c array.h \
+noinst_LTLIBRARIES = \
+ libp11-compat.la \
+ libp11-library.la \
+ $(NULL)
+
+libp11_compat_la_SOURCES = \
compat.c compat.h \
+ $(NULL)
+
+libp11_library_la_SOURCES = \
+ array.c array.h \
debug.c debug.h \
dict.c dict.h \
library.c library.h \
diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
index 11f2369..af61786 100644
--- a/common/tests/Makefile.am
+++ b/common/tests/Makefile.am
@@ -11,21 +11,17 @@ INCLUDES = \
-I$(COMMON) \
$(CUTEST_CFLAGS)
-LDADD = $(CUTEST_LIBS)
+LDADD = \
+ $(top_builddir)/common/libp11-library.la \
+ $(top_builddir)/common/libp11-compat.la \
+ $(CUTEST_LIBS) \
+ $(NULL)
CHECK_PROGS = \
test-dict \
test-array \
$(NULL)
-test_dict_SOURCES = \
- test-dict.c \
- $(COMMON)/dict.c
-
-test_array_SOURCES = \
- test-array.c \
- $(COMMON)/array.c
-
noinst_PROGRAMS = \
$(CHECK_PROGS)
diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am
index 11d5fae..44888e8 100644
--- a/p11-kit/Makefile.am
+++ b/p11-kit/Makefile.am
@@ -27,16 +27,6 @@ MODULE_SRCS = \
private.h \
messages.c \
uri.c \
- $(COMMON)/array.c \
- $(COMMON)/array.h \
- $(COMMON)/compat.c \
- $(COMMON)/compat.h \
- $(COMMON)/debug.c \
- $(COMMON)/debug.h \
- $(COMMON)/dict.c \
- $(COMMON)/dict.h \
- $(COMMON)/library.c \
- $(COMMON)/library.h \
$(inc_HEADERS)
lib_LTLIBRARIES = \
@@ -57,16 +47,18 @@ libp11_kit_la_LDFLAGS = \
libp11_kit_la_SOURCES = $(MODULE_SRCS)
-libp11_kit_la_LIBADD = $(LTLIBINTL)
+libp11_kit_la_LIBADD = \
+ $(LTLIBINTL) \
+ $(top_builddir)/common/libp11-compat.la \
+ $(top_builddir)/common/libp11-library.la \
+ $(NULL)
noinst_LTLIBRARIES = \
- libp11-kit-testable.la \
- libp11-kit-compat.la
-
-libp11_kit_testable_la_LDFLAGS = \
- -no-undefined
+ libp11-kit-testable.la
+libp11_kit_testable_la_LDFLAGS = -no-undefined
libp11_kit_testable_la_SOURCES = $(MODULE_SRCS)
+libp11_kit_testable_la_LIBADD = $(libp11_kit_la_LIBADD)
if OS_WIN32
@@ -90,16 +82,6 @@ libp11_kit_testable_la_CFLAGS = \
endif
-libp11_kit_compat_la_SOURCES = \
- messages.c \
- $(COMMON)/compat.c \
- $(COMMON)/compat.h \
- $(COMMON)/debug.c \
- $(COMMON)/debug.h \
- $(COMMON)/library.c \
- $(COMMON)/library.h \
- $(NULL)
-
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = p11-kit-1.pc
diff --git a/p11-kit/tests/Makefile.am b/p11-kit/tests/Makefile.am
index bd08426..026111c 100644
--- a/p11-kit/tests/Makefile.am
+++ b/p11-kit/tests/Makefile.am
@@ -1,10 +1,12 @@
include $(top_srcdir)/build/Makefile.tests
+COMMON = $(top_srcdir)/common
+
INCLUDES = \
-I$(top_srcdir) \
-I$(srcdir)/.. \
- -I$(top_srcdir)/common \
+ -I$(COMMON) \
$(CUTEST_CFLAGS)
LDADD = \
@@ -41,7 +43,9 @@ mock_one_la_SOURCES = \
mock-module-ep.c
mock_one_la_LIBADD = \
- $(top_builddir)/p11-kit/libp11-kit-compat.la
+ $(top_builddir)/common/libp11-library.la \
+ $(top_builddir)/common/libp11-compat.la \
+ $(NULL)
mock_one_la_LDFLAGS = \
-module -avoid-version -rpath /nowhere \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index bfa1953..44b8432 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,3 +1,6 @@
+NULL =
+
+COMMON = $(top_srcdir)/common
INCLUDES = \
-I$(top_srcdir) \
@@ -9,10 +12,11 @@ bin_PROGRAMS = \
p11-kit
p11_kit_SOURCES = \
- $(top_srcdir)/common/compat.c \
- $(top_srcdir)/common/compat.h \
- p11-kit.c
+ p11-kit.c \
+ $(NULL)
p11_kit_LDADD = \
$(top_builddir)/p11-kit/libp11-kit.la \
- $(LTLIBINTL)
+ $(top_builddir)/common/libp11-compat.la \
+ $(LTLIBINTL) \
+ $(NULL)