summaryrefslogtreecommitdiff
path: root/trust/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'trust/Makefile.am')
-rw-r--r--trust/Makefile.am273
1 files changed, 203 insertions, 70 deletions
diff --git a/trust/Makefile.am b/trust/Makefile.am
index d6d291f..322f812 100644
--- a/trust/Makefile.am
+++ b/trust/Makefile.am
@@ -1,50 +1,35 @@
-include $(top_srcdir)/build/Makefile.decl
-
-SUBDIRS = . tests
-
-COMMON = $(top_srcdir)/common
-
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/common \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DPRIVATEDIR=\"$(privatedir)\" \
- $(LIBTASN1_CFLAGS) \
- $(NULL)
-
-noinst_LTLIBRARIES = \
+noinst_LTLIBRARIES += \
libtrust-testable.la \
libtrust-data.la
libtrust_data_la_SOURCES = \
- asn1.c asn1.h \
- basic.asn basic.asn.h \
- base64.c base64.h \
- pem.c pem.h \
- pkix.asn pkix.asn.h \
- oid.c oid.h \
- openssl.asn openssl.asn.h \
- utf8.c utf8.h \
- x509.c x509.h \
+ trust/asn1.c trust/asn1.h \
+ trust/basic.asn trust/basic.asn.h \
+ trust/base64.c trust/base64.h \
+ trust/pem.c trust/pem.h \
+ trust/pkix.asn trust/pkix.asn.h \
+ trust/oid.c trust/oid.h \
+ trust/openssl.asn trust/openssl.asn.h \
+ trust/utf8.c trust/utf8.h \
+ trust/x509.c trust/x509.h \
$(NULL)
-MODULE_SRCS = \
- builder.c builder.h \
- digest.c digest.h \
- index.c index.h \
- parser.c parser.h \
- persist.c persist.h \
- module.c module.h \
- save.c save.h \
- session.c session.h \
- token.c token.h \
- types.h \
+TRUST_SRCS = \
+ trust/builder.c trust/builder.h \
+ trust/digest.c trust/digest.h \
+ trust/index.c trust/index.h \
+ trust/parser.c trust/parser.h \
+ trust/persist.c trust/persist.h \
+ trust/module.c trust/module.h \
+ trust/save.c trust/save.h \
+ trust/session.c trust/session.h \
+ trust/token.c trust/token.h \
+ trust/types.h \
$(NULL)
configdir = $(p11_package_config_modules)
-config_DATA = p11-kit-trust.module
+config_DATA = trust/p11-kit-trust.module
moduledir = $(p11_module_path)
module_LTLIBRARIES = \
@@ -55,8 +40,8 @@ p11_kit_trust_la_CFLAGS = \
p11_kit_trust_la_LIBADD = \
libtrust-data.la \
- $(top_builddir)/common/libp11-library.la \
- $(top_builddir)/common/libp11-common.la \
+ libp11-library.la \
+ libp11-common.la \
$(LIBTASN1_LIBS) \
$(HASH_LIBS) \
$(NULL)
@@ -67,57 +52,205 @@ p11_kit_trust_la_LDFLAGS = \
-export-symbols-regex 'C_GetFunctionList' \
$(NULL)
-p11_kit_trust_la_SOURCES = $(MODULE_SRCS)
+p11_kit_trust_la_SOURCES = $(TRUST_SRCS)
libtrust_testable_la_LDFLAGS = \
-no-undefined
-libtrust_testable_la_SOURCES = $(MODULE_SRCS)
+libtrust_testable_la_SOURCES = $(TRUST_SRCS)
-bin_PROGRAMS = \
- trust
+bin_PROGRAMS += trust/trust
-trust_LDADD = \
+trust_trust_LDADD = \
libtrust-data.la \
- $(top_builddir)/p11-kit/libp11-kit.la \
- $(top_builddir)/common/libp11-common.la \
- $(top_builddir)/common/libp11-tool.la \
+ libp11-kit.la \
+ libp11-common.la \
+ libp11-tool.la \
$(LTLIBINTL) \
$(LIBTASN1_LIBS) \
$(HASH_LIBS) \
$(NULL)
-trust_CFLAGS = \
- -I$(top_srcdir)/p11-kit \
+trust_trust_CFLAGS = \
-DP11_KIT_FUTURE_UNSTABLE_API \
$(LIBTASN1_CFLAGS) \
$(NULL)
-trust_SOURCES = \
- anchor.c anchor.h \
- parser.c parser.h \
- persist.c persist.h \
- digest.c digest.h \
- enumerate.c enumerate.h \
- extract.c extract.h \
- extract-jks.c \
- extract-openssl.c \
- extract-pem.c \
- extract-cer.c \
- list.c list.h \
- openssl.asn openssl.asn.h \
- save.c save.h \
- trust.c \
+trust_trust_SOURCES = \
+ trust/anchor.c trust/anchor.h \
+ trust/parser.c trust/parser.h \
+ trust/persist.c trust/persist.h \
+ trust/digest.c trust/digest.h \
+ trust/enumerate.c trust/enumerate.h \
+ trust/extract.c trust/extract.h \
+ trust/extract-jks.c \
+ trust/extract-openssl.c \
+ trust/extract-pem.c \
+ trust/extract-cer.c \
+ trust/list.c trust/list.h \
+ trust/openssl.asn trust/openssl.asn.h \
+ trust/save.c trust/save.h \
+ trust/trust.c \
$(NULL)
externaldir = $(privatedir)
external_SCRIPTS = \
- trust-extract-compat
+ trust/trust-extract-compat
-EXTRA_DIST = \
- p11-kit-trust.module
+EXTRA_DIST += \
+ trust/p11-kit-trust.module
asn:
- asn1Parser -o pkix.asn.h pkix.asn
- asn1Parser -o openssl.asn.h openssl.asn
- asn1Parser -o basic.asn.h basic.asn
+ asn1Parser -o $(srcdir)/trust/pkix.asn.h $(srcdir)/trust/pkix.asn
+ asn1Parser -o $(srcdir)/trust/openssl.asn.h $(srcdir)/trust/openssl.asn
+ asn1Parser -o $(srcdir)/trust/basic.asn.h $(srcdir)/trust/basic.asn
+
+# Tests ----------------------------------------------------------------
+
+trust_LIBS = \
+ libtrust-testable.la \
+ libtrust-data.la \
+ libtrust-test.la \
+ libp11-kit.la \
+ libp11-library.la \
+ libp11-test.la \
+ libp11-common.la \
+ $(LIBTASN1_LIBS) \
+ $(HASH_LIBS) \
+ $(NULL)
+
+noinst_LTLIBRARIES += \
+ libtrust-test.la
+
+libtrust_test_la_SOURCES = \
+ trust/test-trust.c trust/test-trust.h \
+ trust/digest.c \
+ $(NULL)
+
+CHECK_PROGS += \
+ test-digest \
+ test-asn1 \
+ test-base64 \
+ test-pem \
+ test-oid \
+ test-utf8 \
+ test-x509 \
+ test-persist \
+ test-index \
+ test-parser \
+ test-builder \
+ test-token \
+ test-module \
+ test-save \
+ test-enumerate \
+ test-cer \
+ test-bundle \
+ test-openssl \
+ $(NULL)
+
+test_asn1_SOURCES = trust/test-asn1.c
+test_asn1_LDADD = $(trust_LIBS)
+
+test_base64_SOURCES = trust/test-base64.c
+test_base64_LDADD = $(trust_LIBS)
+
+test_builder_SOURCES = trust/test-builder.c
+test_builder_LDADD = $(trust_LIBS)
+
+test_bundle_SOURCES = trust/test-bundle.c
+test_bundle_LDADD = $(trust_LIBS)
+
+test_cer_SOURCES = trust/test-cer.c
+test_cer_LDADD = $(trust_LIBS)
+
+test_digest_SOURCES = trust/test-digest.c
+test_digest_LDADD = $(trust_LIBS)
+
+test_enumerate_SOURCES = trust/test-enumerate.c
+test_enumerate_LDADD = $(trust_LIBS)
+
+test_index_SOURCES = trust/test-index.c
+test_index_LDADD = $(trust_LIBS)
+
+test_module_SOURCES = trust/test-module.c
+test_module_LDADD = $(trust_LIBS)
+
+test_oid_SOURCES = trust/test-oid.c
+test_oid_LDADD = $(trust_LIBS)
+
+test_openssl_SOURCES = trust/test-openssl.c
+test_openssl_LDADD = $(trust_LIBS)
+
+test_parser_SOURCES = trust/test-parser.c
+test_parser_LDADD = $(trust_LIBS)
+
+test_pem_SOURCES = trust/test-pem.c
+test_pem_LDADD = $(trust_LIBS)
+
+test_persist_SOURCES = trust/test-persist.c
+test_persist_LDADD = $(trust_LIBS)
+
+test_save_SOURCES = trust/test-save.c
+test_save_LDADD = $(trust_LIBS)
+
+test_token_SOURCES = trust/test-token.c
+test_token_LDADD = $(trust_LIBS)
+
+test_utf8_SOURCES = trust/test-utf8.c
+test_utf8_LDADD = $(trust_LIBS)
+
+test_x509_SOURCES = trust/test-x509.c
+test_x509_LDADD = $(trust_LIBS)
+
+noinst_PROGRAMS += \
+ frob-pow \
+ frob-token \
+ frob-nss-trust \
+ frob-cert \
+ frob-bc \
+ frob-ku \
+ frob-eku \
+ frob-ext \
+ frob-oid \
+ $(NULL)
+
+frob_bc_SOURCES = trust/frob-bc.c
+frob_bc_LDADD = $(trust_LIBS)
+
+frob_cert_SOURCES = trust/frob-cert.c
+frob_cert_LDADD = $(trust_LIBS)
+
+frob_eku_SOURCES = trust/frob-eku.c
+frob_eku_LDADD = $(trust_LIBS)
+
+frob_ext_SOURCES = trust/frob-ext.c
+frob_ext_LDADD = $(trust_LIBS)
+
+frob_ku_SOURCES = trust/frob-ku.c
+frob_ku_LDADD = $(trust_LIBS)
+
+frob_nss_trust_SOURCES = trust/frob-nss-trust.c
+frob_nss_trust_LDADD = \
+ libp11-common.la \
+ libp11-kit.la \
+ $(HASH_LIBS) \
+ $(NULL)
+
+frob_oid_SOURCES = trust/frob-oid.c
+frob_oid_LDADD = $(trust_LIBS)
+
+frob_pow_SOURCES = trust/frob-pow.c
+frob_pow_LDADD = $(trust_LIBS)
+
+frob_token_SOURCES = trust/frob-token.c
+frob_token_LDADD = $(trust_LIBS)
+
+noinst_SCRIPTS += trust/test-extract
+
+installcheck-local:
+ sh $(builddir)/trust/test-extract
+
+EXTRA_DIST += \
+ trust/input \
+ trust/fixtures \
+ $(NULL)