updated documentation
[gnutls.git] / guile / src / Makefile.am
blob10775027d3bf0f3cae8f1837205fa24089e51a08
1 #  GnuTLS --- Guile bindings for GnuTLS.
2 #  Copyright (C) 2007-2012 Free Software Foundation, Inc.
4 #  GnuTLS is free software; you can redistribute it and/or
5 #  modify it under the terms of the GNU Lesser General Public
6 #  License as published by the Free Software Foundation; either
7 #  version 2.1 of the License, or (at your option) any later version.
9 #  GnuTLS is distributed in the hope that it will be useful,
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 #  Lesser General Public License for more details.
14 #  You should have received a copy of the GNU Lesser General Public
15 #  License along with GnuTLS; if not, write to the Free Software
16 #  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18 GUILE_FOR_BUILD =                                               \
19   GUILE_AUTO_COMPILE=0 $(GUILE) -L $(top_srcdir)/guile/modules
21 noinst_HEADERS = errors.h utils.h
23 EXTRA_DIST =                                    \
24   make-enum-map.scm make-smob-types.scm         \
25   make-enum-header.scm make-smob-header.scm     \
26   make-session-priorities.scm
28 # Files generated by the (gnutls build ...) modules.
29 GENERATED_BINDINGS =                            \
30   enum-map.i.c smob-types.i.c enums.h smobs.h   \
31   priorities.i.c
33 BUILT_SOURCES =                                 \
34   $(GENERATED_BINDINGS)                         \
35   core.x errors.x
37 CLEANFILES = $(BUILT_SOURCES)
39 guileextension_LTLIBRARIES  = guile-gnutls-v-2.la
40 guile_gnutls_v_2_la_LDFLAGS = -module
42 # Linking against GnuTLS.
43 GNUTLS_CORE_LIBS  = $(top_builddir)/lib/libgnutls.la
45 # Linking against Gnulib modules.
46 GNULIB_LIBS    = $(top_builddir)/gl/libgnu.la
47 GNULIB_CFLAGS  = -I$(top_builddir)/gl -I$(top_srcdir)/gl
50 guile_gnutls_v_2_la_SOURCES = core.c errors.c utils.c
51 guile_gnutls_v_2_la_CFLAGS =                    \
52   $(AM_CFLAGS) $(GNULIB_CFLAGS) $(GUILE_CFLAGS)
53 guile_gnutls_v_2_la_LIBADD = \
54         $(GNUTLS_CORE_LIBS) $(GNULIB_LIBS) \
55         $(GUILE_LDFLAGS)
57 AM_CPPFLAGS = \
58         -I$(top_srcdir)/lib/includes \
59         -I$(top_builddir)/lib/includes  \
60         -I$(top_srcdir)/extra/includes \
61         -I$(top_builddir) \
62         -I$(builddir)
64 if HAVE_GCC
66 # Generated `.x' files and Guile's `scm_c_define_gsubr ()' require
67 # `-Wno-strict-prototypes'.  This trick makes sure `-Wno-s-p' appears
68 # after `-Ws-p'.
69 AM_CFLAGS = -Wno-strict-prototypes
71 # The `-fgnu89-inline' option appeared in GCC 4.1.3.
72 if HAVE_GCC_GNU89_INLINE_OPTION
74 # Guile and GMP currently rely on GNU inline semantics, not C99 inline.
75 AM_CFLAGS += -fgnu89-inline
77 endif HAVE_GCC_GNU89_INLINE_OPTION
79 endif HAVE_GCC
82 enums.h: $(srcdir)/make-enum-header.scm
83         $(GUILE_FOR_BUILD) $^ > $@
85 enum-map.i.c: $(srcdir)/make-enum-map.scm
86         $(GUILE_FOR_BUILD) $^ > $@
88 smobs.h: $(srcdir)/make-smob-header.scm
89         $(GUILE_FOR_BUILD) $^ > $@
91 smob-types.i.c: $(srcdir)/make-smob-types.scm
92         $(GUILE_FOR_BUILD) $^ > $@
94 priorities.i.c: $(srcdir)/make-session-priorities.scm
95         $(GUILE_FOR_BUILD) $^ > $@
98 # C file snarfing.
100 # `$(GUILE_CFLAGS)' may contain a series of `-I' switches so it must be
101 # included here, even though we'd really want `$(GUILE_CPPFLAGS)'.
102 snarfcppopts = $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
103                $(CFLAGS) $(guile_gnutls_v_2_la_CFLAGS)
105 .c.x: $(GENERATED_BINDINGS)
106         $(guile_snarf) -o $@ $< $(snarfcppopts)
108 # Target used by doc/Makefile, to create all built sources necessary
109 # for generating the manual.
111 .PHONY: built-sources
112 built-sources: $(BUILT_SOURCES)