1 # Makefile.am - for the KSBA ASN.1 and X.509 library
2 # Copyright (C) 2001, 2002, 2004, 2005, 2007 g10 Code GmbH
4 # This file is part of KSBA.
6 # KSBA is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # KSBA is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
19 ## Process this file with automake to produce Makefile.in
21 pkgconfigdir = $(libdir)/pkgconfig
22 pkgconfig_DATA = ksba.pc
24 asn1_modules = tmttv2.asn cms.asn
26 buildtool_src = asn1-gentables.c gen-help.c gen-help.h
27 EXTRA_DIST = ksba.h.in ksba-config.in $(asn1_modules) ksba.m4 \
28 libksba.vers libksba.def \
29 asn1-parse.c asn1-tables.c $(buildtool_src) ksba.pc.in
30 BUILT_SOURCES = asn1-parse.c asn1-tables.c
32 noinst_SCRIPTS = ksba-config
34 bin_SCRIPTS = ksba-config
36 nodist_include_HEADERS = ksba.h
37 lib_LTLIBRARIES = libksba.la
38 noinst_PROGRAMS = ber-dump
40 m4datadir = $(datadir)/aclocal
43 CLEANFILES = asn1-gentables
44 DISTCLEANFILES = asn1-tables.c
46 AM_CPPFLAGS = -I$(top_builddir)/gl -I$(top_srcdir)/gl
47 AM_CFLAGS = $(GPG_ERROR_CFLAGS) $(COVERAGE_CFLAGS)
50 if HAVE_LD_VERSION_SCRIPT
51 libksba_version_script_cmd = -Wl,--version-script=$(srcdir)/libksba.vers
53 libksba_version_script_cmd =
58 RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
59 $(libksba_la_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
60 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
65 $(LTRCCOMPILE) -i "$<" -o "$@"
67 ksba_res = versioninfo.lo
68 no_undefined = -no-undefined
69 export_symbols = -export-symbols $(srcdir)/libksba.def
70 extra_ltoptions = -XCClinker -static-libgcc
73 -rm $(DESTDIR)$(libdir)/libksba.def
75 ksba_deps = $(ksba_res) libksba.def
76 ksbadefdir = $(libdir)
77 ksbadef_DATA = libksba.def
86 endif !HAVE_W32_SYSTEM
89 libksba_la_LDFLAGS = $(no_undefined) $(export_symbols) $(extra_ltoptions) \
90 $(libksba_version_script_cmd) -version-info \
91 @LIBKSBA_LT_CURRENT@:@LIBKSBA_LT_REVISION@:@LIBKSBA_LT_AGE@ \
93 libksba_la_INCLUDES = -I$(top_srcdir)/lib
94 libksba_la_DEPENDENCIES = $(srcdir)/libksba.vers $(ksba_deps)
95 libksba_la_LIBADD = $(ksba_res) @LTLIBOBJS@ @GPG_ERROR_LIBS@
98 libksba_la_SOURCES = \
100 visibility.c visibility.h \
104 asn1-func.c asn1-func2.c asn1-func.h asn1-constants.h \
105 ber-help.c ber-help.h \
106 ber-decoder.c ber-decoder.h \
107 der-encoder.c der-encoder.h \
108 der-builder.c der-builder.h \
110 cms.c cms.h cms-parser.c \
112 certreq.c certreq.h \
114 keyinfo.c keyinfo.h \
115 oid.c name.c dn.c time.c convert.h stringbuf.h \
116 version.c util.c util.h shared.h \
120 ber_dump_SOURCES = ber-dump.c \
121 ber-decoder.c ber-help.c reader.c writer.c asn1-parse.c \
122 asn1-func.c oid.c time.c util.c
123 ber_dump_LDADD = $(GPG_ERROR_LIBS) ../gl/libgnu.la
124 ber_dump_CFLAGS = $(AM_CFLAGS)
126 asn1-parse.c : asn1-func.h gen-help.h
128 asn1-gentables$(EXEEXT_FOR_BUILD): asn1-gentables.c asn1-parse.c asn1-func.c \
129 gen-help.c gen-help.h
130 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
131 $(CPPFLAGS_FOR_BUILD) -I$(srcdir) -DBUILD_GENTOOLS -o $@ \
132 $(srcdir)/asn1-gentables.c \
133 `test -f 'asn1-parse.c' || echo '$(srcdir)/'`asn1-parse.c \
134 $(srcdir)/asn1-func.c \
137 asn1-tables.c : $(asn1_modules) asn1-gentables$(EXEEXT_FOR_BUILD)
139 for file in $(asn1_modules); do list="$$list $(srcdir)/$$file";done;\
140 ./asn1-gentables$(EXEEXT_FOR_BUILD) $$list > asn1-tables.c
143 uninstall-local: uninstall-def-file