corrected news entry.
[gnutls.git] / lib / Makefile.am
blob693af1f4016899befb412ce0c647d7e5f65336c2
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 # Author: Nikos Mavrogiannopoulos
6 # This file is part of GnuTLS.
8 # The GnuTLS 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 3 of
11 # the License, or (at your option) any later version.
13 # The GnuTLS 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 License
19 # along with this program.  If not, see <http://www.gnu.org/licenses/>
21 ACLOCAL_AMFLAGS = -I ../m4 -I ../gl/m4
23 SUBDIRS = includes x509 accelerated auth ext algorithms extras
24 if ENABLE_MINITASN1
25 SUBDIRS += minitasn1
26 endif
28 localedir = $(datadir)/locale
30 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS)
31 AM_CPPFLAGS = \
32         -DLOCALEDIR=\"$(localedir)\"            \
33         -I$(srcdir)/../gl                       \
34         -I$(builddir)/../gl                     \
35         -I$(builddir)/includes                  \
36         -I$(builddir)/x509                      \
37         -I$(srcdir)/includes                    \
38         -I$(builddir)/includes                  \
39         -I$(srcdir)/x509                        \
40         $(P11_KIT_CFLAGS)
42 if ENABLE_OPENPGP
43 SUBDIRS += opencdk
44 SUBDIRS += openpgp
45 AM_CPPFLAGS += -I$(srcdir)/opencdk
46 endif
48 if ENABLE_MINITASN1
49 AM_CPPFLAGS += -I$(srcdir)/minitasn1
50 endif
52 # Pkg-config script.
53 pkgconfigdir = $(libdir)/pkgconfig
54 pkgconfig_DATA = gnutls.pc
55 DISTCLEANFILES = $(pkgconfig_DATA)
57 lib_LTLIBRARIES = libgnutls.la
59 SRP_COBJECTS = gnutls_srp.c
61 PSK_COBJECTS = gnutls_psk.c
63 COBJECTS = gnutls_record.c gnutls_compress.c debug.c gnutls_cipher.c    \
64         gnutls_mbuffers.c gnutls_buffers.c gnutls_handshake.c           \
65         gnutls_num.c gnutls_errors.c gnutls_dh.c gnutls_kx.c            \
66         gnutls_priority.c gnutls_hash_int.c gnutls_cipher_int.c         \
67         gnutls_session.c gnutls_db.c x509_b64.c gnutls_extensions.c     \
68         gnutls_auth.c gnutls_v2_compat.c gnutls_datum.c                 \
69         gnutls_session_pack.c gnutls_mpi.c gnutls_pk.c gnutls_cert.c    \
70         gnutls_global.c gnutls_constate.c gnutls_anon_cred.c            \
71         pkix_asn1_tab.c gnutls_asn1_tab.c gnutls_mem.c gnutls_ui.c      \
72         gnutls_sig.c gnutls_ecc.c gnutls_dh_primes.c gnutls_alert.c     \
73         system.c gnutls_str.c gnutls_state.c gnutls_x509.c              \
74         gnutls_rsa_export.c gnutls_helper.c gnutls_supplemental.c       \
75         random.c crypto-api.c gnutls_privkey.c gnutls_pcert.c           \
76         gnutls_pubkey.c locks.c hash.c gnutls_dtls.c system_override.c  \
77         crypto-backend.c verify-tofu.c
79 if ENABLE_PKCS11
80 COBJECTS += pkcs11.c pkcs11_privkey.c pkcs11_write.c pkcs11_secret.c
81 endif
83 if ENABLE_NETTLE
84 SUBDIRS += nettle
85 endif
87 HFILES = abstract_int.h debug.h gnutls_compress.h gnutls_cipher.h       \
88         gnutls_buffers.h gnutls_errors.h gnutls_int.h gnutls_dtls.h     \
89         gnutls_handshake.h gnutls_num.h algorithms.h            \
90         gnutls_dh.h gnutls_kx.h gnutls_hash_int.h gnutls_cipher_int.h   \
91         gnutls_db.h gnutls_auth.h gnutls_extensions.h   \
92         x509_b64.h gnutls_v2_compat.h gnutls_datum.h \
93         gnutls_mpi.h gnutls_pk.h gnutls_record.h                \
94         gnutls_constate.h gnutls_global.h gnutls_sig.h gnutls_mem.h     \
95         gnutls_session_pack.h gnutls_str.h gnutls_str_array.h           \
96         gnutls_state.h gnutls_x509.h crypto-backend.h                   \
97         gnutls_rsa_export.h gnutls_srp.h auth/srp.h auth/srp_passwd.h   \
98         gnutls_helper.h gnutls_supplemental.h crypto.h random.h system.h\
99         locks.h gnutls_mbuffers.h hash.h gnutls_ecc.h
101 if ENABLE_PKCS11
102 HFILES += pkcs11_int.h
103 endif
105 # Separate so we can create the documentation
107 libgnutls_la_SOURCES = $(HFILES) $(COBJECTS) $(SRP_COBJECTS)    \
108         $(PSK_COBJECTS) \
109         gnutls.asn pkix.asn libgnutls.map
111 libgnutls_la_LDFLAGS = -no-undefined \
112         -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
114 libgnutls_la_LIBADD = ../gl/libgnu.la x509/libgnutls_x509.la \
115         accelerated/libaccelerated.la ext/libgnutls_ext.la \
116         auth/libgnutls_auth.la algorithms/libgnutls_alg.la \
117         extras/libgnutls_extras.la \
118         $(LTLIBZ)  $(LTLIBINTL) $(LIBSOCKET) $(LTLIBDL) \
119         $(LTLIBPTHREAD) $(P11_KIT_LIBS) $(LIB_SELECT)
121 if ENABLE_OPENPGP
122 libgnutls_la_LIBADD += openpgp/libgnutls_openpgp.la
123 libgnutls_la_LIBADD += opencdk/libminiopencdk.la
124 endif
126 if HAVE_LD_VERSION_SCRIPT
127 libgnutls_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libgnutls.map
128 else
129 libgnutls_la_LDFLAGS += -export-symbols-regex '^(gnutls|_gnutls).*'
130 endif
132 if ENABLE_MINITASN1
133 libgnutls_la_LIBADD += minitasn1/libminitasn1.la
134 else
135 libgnutls_la_LDFLAGS += $(LTLIBTASN1)
136 endif
138 if ENABLE_NETTLE
139 libgnutls_la_LDFLAGS += $(LTLIBNETTLE)
140 libgnutls_la_LIBADD += nettle/libcrypto.la
141 endif
143 if WINDOWS
144 libgnutls_la_LDFLAGS += -lcrypt32
145 endif
147 if HAVE_LD_OUTPUT_DEF
148 libgnutls_la_LDFLAGS += -Wl,--output-def,libgnutls-$(DLL_VERSION).def
149 libgnutls-$(DLL_VERSION).def: libgnutls.la
150 defexecdir = $(bindir)
151 defexec_DATA = libgnutls-$(DLL_VERSION).def
152 DISTCLEANFILES += $(defexec_DATA)
153 endif
155 # C++ library
157 if ENABLE_CXX
158 libgnutlsxx_la_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_builddir)/includes -I$(srcdir)/includes
160 AM_CXXFLAGS = \
161         -I$(srcdir)/includes    \
162         -I$(builddir)/includes  
164 lib_LTLIBRARIES += libgnutlsxx.la
166 libgnutlsxx_la_SOURCES = gnutlsxx.cpp libgnutlsxx.map
168 libgnutlsxx_la_LDFLAGS = -no-undefined \
169         -version-info $(CXX_LT_CURRENT):$(CXX_LT_REVISION):$(CXX_LT_AGE)
171 libgnutlsxx_la_LIBADD = libgnutls.la
173 if HAVE_LD_VERSION_SCRIPT
174 libgnutlsxx_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libgnutlsxx.map
175 endif
176 endif
178 pkix_asn1_tab.c: pkix.asn
179         -asn1Parser pkix.asn pkix_asn1_tab.c
181 gnutls_asn1_tab.c: gnutls.asn
182         -asn1Parser gnutls.asn gnutls_asn1_tab.c