Merge branch 'master' of git://repo.or.cz/gnutls
[gnutls.git] / libextra / Makefile.am
blobd0d32de4a33542e05eb07325ee16e36aee0cd6f6
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
4 # Author: Nikos Mavroyanopoulos
6 # This file is part of GNUTLS-EXTRA.
8 # GNUTLS-EXTRA is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of the
11 # License, or (at your option) any later version.
13 # GNUTLS-EXTRA is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNUTLS-EXTRA; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # 02110-1301, USA.
23 AM_CPPFLAGS = -I$(top_srcdir)/lgl -I$(top_builddir)/lgl                 \
24         -I$(top_srcdir)/lib -I../includes -I$(top_srcdir)/includes      \
25         -I$(top_srcdir)/lib/minitasn1 -I$(srcdir)/openpgp               \
26         $(LIBGCRYPT_CFLAGS)
28 if ENABLE_MINITASN1
29 AM_CPPFLAGS += -I$(top_srcdir)/lib/minitasn1
30 else
31 AM_CPPFLAGS += $(LIBTASN1_CFLAGS)
32 endif
34 SUBDIRS = 
36 if ENABLE_OPENPGP
37 if ENABLE_INCLUDED_OPENCDK
38 SUBDIRS += opencdk
39 AM_CPPFLAGS += -I$(srcdir)/opencdk
40 endif
41 SUBDIRS += openpgp
42 endif
44 bin_SCRIPTS = libgnutls-extra-config
46 m4datadir = $(datadir)/aclocal
47 dist_m4data_DATA = libgnutls-extra.m4
49 # Pkg-config script.
50 pkgconfigdir = $(libdir)/pkgconfig
51 pkgconfig_DATA = gnutls-extra.pc
52 DISTCLEANFILES = $(pkgconfig_DATA)
54 EXTRA_DIST = gnutls-extra-api.texi ia-api.texi
56 defexecdir = $(bindir)
57 defexec_DATA = 
59 lib_LTLIBRARIES = libgnutls-extra.la
61 libgnutls_extra_la_SOURCES = gnutls_extra.c
63 libgnutls_openssl_la_LDFLAGS = -no-undefined
65 # OpenSSL
67 if ENABLE_OPENSSL
68 lib_LTLIBRARIES += libgnutls-openssl.la
70 libgnutls_openssl_la_SOURCES = gnutls_openssl.c openssl_compat.h        \
71         openssl_compat.c
73 libgnutls_openssl_la_LIBADD = ../lgl/liblgnu.la ../lib/libgnutls.la 
75 libgnutls_openssl_la_LDFLAGS += -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
77 if ENABLE_MINITASN1
78 libgnutls_openssl_la_LIBADD += ../lib/minitasn1/libminitasn1.la
79 else
80 libgnutls_openssl_la_LDFLAGS += $(LIBTASN1_LIBS) 
81 endif
83 if HAVE_LD_OUTPUT_DEF
84 libgnutls_openssl_la_LDFLAGS += \
85         -Wl,--output-def,libgnutls-openssl-$(SOVERSION).def
86 defexec_DATA += libgnutls-openssl-$(SOVERSION).def
87 endif
88 endif
90 # OpenPGP
92 libgnutls_extra_la_LIBADD =
93 libgnutls_extra_la_LDFLAGS = -no-undefined
94 if ENABLE_OPENPGP
95 libgnutls_extra_la_SOURCES += gnutls_openpgp.c
96 libgnutls_extra_la_LIBADD += openpgp/libgnutls_openpgp.la
97 if ENABLE_INCLUDED_OPENCDK
98 libgnutls_extra_la_LIBADD += opencdk/libminiopencdk.la
99 else
100 libgnutls_extra_la_LDFLAGS += $(LTLIBOPENCDK) 
101 endif
102 endif
104 # TLS/IA
106 libgnutls_extra_la_SOURCES += gnutls_ia.c
108 # Rest
110 if HAVE_LD_OUTPUT_DEF
111 libgnutls_extra_la_LDFLAGS += \
112         -Wl,--output-def,libgnutls-extra-$(SOVERSION).def
113 defexec_DATA += libgnutls-extra-$(SOVERSION).def
114 endif
116 DISTCLEANFILES += $(defexec_DATA)
118 libgnutls_extra_la_LDFLAGS += \
119         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
120         $(LZO_LIBS)
122 libgnutls_extra_la_SOURCES += gnutls_extra.h libgnutls-extra.vers
124 libgnutls_extra_la_LIBADD += ../lgl/liblgnu.la ../lib/libgnutls.la
126 if HAVE_LD_VERSION_SCRIPT
127 libgnutls_extra_la_LDFLAGS += \
128         -Wl,--version-script=$(srcdir)/libgnutls-extra.vers
129 endif
131 # LZO
133 if ENABLE_INCLUDED_LZO
134 SUBDIRS += minilzo
135 libgnutls_extra_la_LIBADD += minilzo/libminilzo.la
136 endif
138 gnutls-extra-api.texi: gnutls_extra.c
139         @echo "" > $@
140         @for i in $<; do \
141                 echo -n "Creating documentation for file $$i... " && \
142                 $(top_srcdir)/doc/scripts/gdoc -texinfo $$i >> $@ && \
143                 echo "ok"; \
144         done
146 ia-api.texi: gnutls_ia.c
147         @echo "" > $@
148         @for i in $<; do \
149                 echo -n "Creating documentation for file $$i... " && \
150                 $(top_srcdir)/doc/scripts/gdoc -texinfo $$i >> $@ && \
151                 echo "ok"; \
152         done
154 dist-hook: gnutls-extra-api.texi ia-api.texi