Add.
[gnutls.git] / lib / Makefile.am
blob83bc22cb76b36771ce58d89677126fc1a8bdd6b9
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation
4 # Author: Nikos Mavrogiannopoulos
6 # This file is part of GNUTLS.
8 # The GNUTLS library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public License
10 # as published by the Free Software Foundation; either version 2.1 of
11 # the License, or (at your option) any later version.
13 # The GNUTLS library is distributed in the hope that it will be
14 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with the GNUTLS library; if not, write to the Free
20 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 # MA 02110-1301, USA
23 SUBDIRS = x509
24 if ENABLE_MINITASN1
25 SUBDIRS += minitasn1
26 endif
29 localedir = $(datadir)/locale
31 AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"                              \
32         -I$(top_srcdir)/lgl -I$(top_builddir)/lgl                       \
33         -I$(top_srcdir)/includes -I../includes                          \
34         -I$(srcdir)/x509                                                \
35         -I$(top_srcdir)/libextra -I$(top_srcdir)/lib/openpgp/   \
36         $(LIBGCRYPT_CFLAGS)
38 if ENABLE_OPENPGP
39 SUBDIRS += opencdk
40 SUBDIRS += openpgp
41 AM_CPPFLAGS += -I$(srcdir)/opencdk -I$(top_srcdir)/lib/opencdk
42 endif
44 if ENABLE_MINITASN1
45 AM_CPPFLAGS += -I$(srcdir)/minitasn1
46 else
47 AM_CPPFLAGS += $(LIBTASN1_CFLAGS)
48 endif
50 bin_SCRIPTS = libgnutls-config
52 m4datadir = $(datadir)/aclocal
53 dist_m4data_DATA = libgnutls.m4
55 # Pkg-config script.
56 pkgconfigdir = $(libdir)/pkgconfig
57 pkgconfig_DATA = gnutls.pc
58 DISTCLEANFILES = $(pkgconfig_DATA)
60 EXTRA_DIST = gnutls-api.texi
61 lib_LTLIBRARIES = libgnutls.la
63 SRP_COBJECTS = ext_srp.c gnutls_srp.c auth_srp.c auth_srp_passwd.c      \
64         auth_srp_sb64.c auth_srp_rsa.c
66 PSK_COBJECTS = auth_psk.c auth_psk_passwd.c gnutls_psk.c        \
67         auth_dhe_psk.c gnutls_psk_netconf.c
69 OPRFI_COBJECTS = ext_oprfi.c
71 COBJECTS = gnutls_record.c gnutls_compress.c debug.c gnutls_cipher.c    \
72         gnutls_buffers.c gnutls_handshake.c gnutls_num.c                \
73         gnutls_errors.c gnutls_algorithms.c gnutls_dh.c gnutls_kx.c     \
74         gnutls_priority.c gnutls_hash_int.c gnutls_cipher_int.c         \
75         gnutls_compress_int.c gnutls_session.c gnutls_db.c x509_b64.c   \
76         auth_anon.c gnutls_extensions.c gnutls_auth.c                   \
77         gnutls_v2_compat.c gnutls_datum.c auth_rsa.c                    \
78         gnutls_session_pack.c gnutls_mpi.c gnutls_pk.c gnutls_cert.c    \
79         gnutls_global.c gnutls_constate.c gnutls_anon_cred.c            \
80         pkix_asn1_tab.c gnutls_asn1_tab.c gnutls_mem.c auth_cert.c      \
81         gnutls_ui.c gnutls_sig.c auth_dhe.c gnutls_dh_primes.c          \
82         ext_max_record.c gnutls_alert.c gnutls_str.c gnutls_state.c     \
83         gnutls_x509.c ext_cert_type.c gnutls_rsa_export.c               \
84         auth_rsa_export.c ext_server_name.c auth_dh_common.c            \
85         gnutls_helper.c ext_inner_application.c \
86         gnutls_supplemental.c crypto.c random.c
88 if ENABLE_OPRFI
89 COBJECTS += $(OPRFI_COBJECTS)
90 endif
92 HFILES = debug.h gnutls_compress.h defines.h gnutls_cipher.h            \
93         gnutls_buffers.h gnutls_errors.h gnutls_int.h                   \
94         gnutls_handshake.h gnutls_num.h gnutls_algorithms.h             \
95         gnutls_dh.h gnutls_kx.h gnutls_hash_int.h gnutls_cipher_int.h   \
96         gnutls_db.h gnutls_compress_int.h gnutls_auth.h auth_anon.h     \
97         gnutls_extensions.h gnutls_buffer.h gnutls_auth_int.h           \
98         x509_b64.h gnutls_v2_compat.h gnutls_datum.h auth_cert.h        \
99         gnutls_mpi.h gnutls_pk.h gnutls_record.h gnutls_cert.h          \
100         gnutls_constate.h gnutls_global.h gnutls_sig.h gnutls_mem.h     \
101         io_debug.h ext_max_record.h gnutls_session_pack.h gnutls_str.h  \
102         gnutls_state.h gnutls_x509.h ext_cert_type.h                    \
103         gnutls_rsa_export.h ext_server_name.h auth_dh_common.h          \
104         ext_srp.h gnutls_srp.h auth_srp.h auth_srp_passwd.h             \
105         gnutls_helper.h auth_psk.h auth_psk_passwd.h                    \
106         ext_inner_application.h gnutls_supplemental.h ext_oprfi.h       \
107         crypto.h random.h
109 # Separate so we can create the documentation
111 libgnutls_la_SOURCES = $(HFILES) $(COBJECTS) $(SRP_COBJECTS)    \
112         $(PSK_COBJECTS) gnutls.asn pkix.asn libgnutls.vers
114 libgnutls_la_LDFLAGS = -no-undefined \
115         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
117 libgnutls_la_LIBADD = ../lgl/liblgnu.la x509/libgnutls_x509.la \
118         @LTLIBZ@ $(LIBGCRYPT_LIBS) @LTLIBINTL@
120 if NEED_WS2_32
121 libgnutls_la_LIBADD += -lws2_32
122 endif
124 if ENABLE_OPENPGP
125 libgnutls_la_SOURCES += gnutls_openpgp.c
126 libgnutls_la_LIBADD += openpgp/libgnutls_openpgp.la
127 libgnutls_la_LIBADD += opencdk/libminiopencdk.la
128 endif
130 if HAVE_LD_VERSION_SCRIPT
131 libgnutls_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libgnutls.vers
132 endif
134 if ENABLE_MINITASN1
135 libgnutls_la_LIBADD += minitasn1/libminitasn1.la
136 else
137 libgnutls_la_LDFLAGS += $(LIBTASN1_LIBS) 
138 endif
140 if HAVE_LD_OUTPUT_DEF
141 libgnutls_la_LDFLAGS += -Wl,--output-def,libgnutls-$(SOVERSION).def
142 defexecdir = $(bindir)
143 defexec_DATA = libgnutls-$(SOVERSION).def
144 DISTCLEANFILES += $(defexec_DATA)
145 endif
147 # C++ library
149 if ENABLE_CXX
150 libgnutlsxx_la_CPPFLAGS = -I$(top_srcdir)/includes -I../includes
152 AM_CXXFLAGS = -I$(top_srcdir)/includes/
154 lib_LTLIBRARIES += libgnutlsxx.la
156 libgnutlsxx_la_SOURCES = gnutlsxx.cpp libgnutlsxx.vers
158 libgnutlsxx_la_LDFLAGS = -no-undefined \
159         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
161 libgnutlsxx_la_LIBADD = libgnutls.la
163 if HAVE_LD_VERSION_SCRIPT
164 libgnutlsxx_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libgnutlsxx.vers
165 endif
166 endif
168 pkix_asn1_tab.c: pkix.asn
169         -asn1Parser pkix.asn pkix_asn1_tab.c
171 gnutls_asn1_tab.c: gnutls.asn
172         -asn1Parser gnutls.asn gnutls_asn1_tab.c
174 gnutls-api.texi: $(COBJECTS) $(SRP_COBJECTS) $(PSK_COBJECTS) $(OPRFI_COBJECTS)
175         @echo "" > gnutls-api.texi
176         @for i in $(COBJECTS) $(SRP_COBJECTS) $(PSK_COBJECTS) $(OPRFI_COBJECTS); do \
177                 echo -n "Creating documentation for file $$i... " && \
178                 $(top_srcdir)/doc/scripts/gdoc -texinfo $$i >> gnutls-api.texi && \
179                 echo "ok"; \
180         done
182 dist-hook: gnutls-api.texi