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
31 bin_SCRIPTS = ksba-config
32 nodist_include_HEADERS = ksba.h
33 lib_LTLIBRARIES = libksba.la
34 noinst_PROGRAMS = ber-dump
36 m4datadir = $(datadir)/aclocal
39 CLEANFILES = asn1-gentables
40 DISTCLEANFILES = asn1-tables.c
42 AM_CPPFLAGS = -I$(top_builddir)/gl -I$(top_srcdir)/gl
43 AM_CFLAGS = $(GPG_ERROR_CFLAGS) $(COVERAGE_CFLAGS)
46 if HAVE_LD_VERSION_SCRIPT
47 libksba_version_script_cmd = -Wl,--version-script=$(srcdir)/libksba.vers
49 libksba_version_script_cmd =
54 RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
55 $(libksba_la_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS)
56 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
61 $(LTRCCOMPILE) -i "$<" -o "$@"
63 ksba_res = versioninfo.lo
64 no_undefined = -no-undefined
65 export_symbols = -export-symbols $(srcdir)/libksba.def
66 extra_ltoptions = -XCClinker -static-libgcc
69 $(INSTALL) $(srcdir)/libksba.def $(DESTDIR)$(libdir)/libksba.def
72 -rm $(DESTDIR)$(libdir)/libksba.def
74 ksba_deps = $(ksba_res) libksba.def
84 endif !HAVE_W32_SYSTEM
87 libksba_la_LDFLAGS = $(no_undefined) $(export_symbols) $(extra_ltoptions) \
88 $(libksba_version_script_cmd) -version-info \
89 @LIBKSBA_LT_CURRENT@:@LIBKSBA_LT_REVISION@:@LIBKSBA_LT_AGE@ \
91 libksba_la_INCLUDES = -I$(top_srcdir)/lib
92 libksba_la_DEPENDENCIES = $(srcdir)/libksba.vers $(ksba_deps)
93 libksba_la_LIBADD = $(ksba_res) @LTLIBOBJS@ @GPG_ERROR_LIBS@
96 libksba_la_SOURCES = \
98 visibility.c visibility.h \
102 asn1-func.c asn1-func2.c asn1-func.h asn1-constants.h \
103 ber-help.c ber-help.h \
104 ber-decoder.c ber-decoder.h \
105 der-encoder.c der-encoder.h \
106 der-builder.c der-builder.h \
108 cms.c cms.h cms-parser.c \
110 certreq.c certreq.h \
112 keyinfo.c keyinfo.h \
113 oid.c name.c dn.c time.c convert.h stringbuf.h \
114 version.c util.c util.h shared.h \
118 ber_dump_SOURCES = ber-dump.c \
119 ber-decoder.c ber-help.c reader.c writer.c asn1-parse.c \
120 asn1-func.c oid.c time.c util.c
121 ber_dump_LDADD = $(GPG_ERROR_LIBS) ../gl/libgnu.la
122 ber_dump_CFLAGS = $(AM_CFLAGS)
124 asn1-parse.c : asn1-func.h gen-help.h
126 asn1-gentables: asn1-gentables.c asn1-parse.c asn1-func.c gen-help.c gen-help.h
127 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
128 $(CPPFLAGS_FOR_BUILD) -I$(srcdir) -DBUILD_GENTOOLS -o $@ \
129 $(srcdir)/asn1-gentables.c \
130 `test -f 'asn1-parse.c' || echo '$(srcdir)/'`asn1-parse.c \
131 $(srcdir)/asn1-func.c \
134 asn1-tables.c : $(asn1_modules) asn1-gentables
136 for file in $(asn1_modules); do list="$$list $(srcdir)/$$file";done;\
137 ./asn1-gentables $$list > asn1-tables.c
140 install-data-local: install-def-file
142 uninstall-local: uninstall-def-file