1 # GNUTLS -- Guile bindings for GnuTLS.
2 # Copyright (C) 2007, 2008, 2009 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
19 GUILE_AUTO_COMPILE=0 $(GUILE) -L $(top_srcdir)/guile/modules
21 noinst_HEADERS = errors.h utils.h
24 make-enum-map.scm make-smob-types.scm \
25 make-enum-header.scm make-smob-header.scm \
26 make-session-priorities.scm
28 BUILT_SOURCES = enum-map.i.c smob-types.i.c enums.h smobs.h \
30 extra-smobs.h extra-enums.h \
31 extra-enum-map.i.c extra-smob-types.i.c \
32 core.x errors.x extra.x
34 CLEANFILES = $(BUILT_SOURCES)
36 lib_LTLIBRARIES = libguile-gnutls-v-1.la libguile-gnutls-extra-v-1.la
38 # Linking against GnuTLS.
39 GNUTLS_CORE_LIBS = $(top_builddir)/lib/libgnutls.la
40 GNUTLS_EXTRA_LIBS = $(top_builddir)/libextra/libgnutls-extra.la
42 # Linking against Gnulib modules.
43 GNULIB_LIBS = $(top_builddir)/lib/gl/liblgnu.la
44 GNULIB_CFLAGS = -I$(top_builddir)/lib/gl -I$(top_srcdir)/lib/gl
47 libguile_gnutls_v_1_la_SOURCES = core.c errors.c utils.c
48 libguile_gnutls_v_1_la_CFLAGS = \
49 $(AM_CFLAGS) $(GNULIB_CFLAGS) $(GUILE_CFLAGS)
50 libguile_gnutls_v_1_la_LIBADD = \
51 $(GNUTLS_CORE_LIBS) $(GNULIB_LIBS) \
54 libguile_gnutls_extra_v_1_la_SOURCES = extra.c
55 libguile_gnutls_extra_v_1_la_CFLAGS = \
56 $(AM_CFLAGS) $(GNULIB_CFLAGS) $(GUILE_CFLAGS)
57 libguile_gnutls_extra_v_1_la_LIBADD = \
58 $(GNUTLS_CORE_LIBS) $(GNUTLS_EXTRA_LIBS) \
59 $(builddir)/libguile-gnutls-v-1.la \
60 $(GNULIB_LIBS) $(GUILE_LDFLAGS)
63 -I$(top_srcdir)/lib/includes \
64 -I$(top_builddir)/lib/includes \
65 -I$(top_srcdir)/libextra/includes \
71 # Generated `.x' files and Guile's `scm_c_define_gsubr ()' require
72 # `-Wno-strict-prototypes'. This trick makes sure `-Wno-s-p' appears
74 AM_CFLAGS = -Wno-strict-prototypes
76 # The `-fgnu89-inline' option appeared in GCC 4.1.3.
77 if HAVE_GCC_GNU89_INLINE_OPTION
79 # Guile and GMP currently rely on GNU inline semantics, not C99 inline.
80 AM_CFLAGS += -fgnu89-inline
82 endif HAVE_GCC_GNU89_INLINE_OPTION
87 enums.h: $(srcdir)/make-enum-header.scm
88 $(GUILE_FOR_BUILD) $^ > $@
90 enum-map.i.c: $(srcdir)/make-enum-map.scm
91 $(GUILE_FOR_BUILD) $^ > $@
93 smobs.h: $(srcdir)/make-smob-header.scm
94 $(GUILE_FOR_BUILD) $^ > $@
96 smob-types.i.c: $(srcdir)/make-smob-types.scm
97 $(GUILE_FOR_BUILD) $^ > $@
99 priorities.i.c: $(srcdir)/make-session-priorities.scm
100 $(GUILE_FOR_BUILD) $^ > $@
105 extra-enums.h: $(srcdir)/make-enum-header.scm
106 $(GUILE_FOR_BUILD) $^ extra > $@
108 extra-enum-map.i.c: $(srcdir)/make-enum-map.scm
109 $(GUILE_FOR_BUILD) $^ extra > $@
111 extra-smobs.h: $(srcdir)/make-smob-header.scm
112 $(GUILE_FOR_BUILD) $^ extra > $@
114 extra-smob-types.i.c: $(srcdir)/make-smob-types.scm
115 $(GUILE_FOR_BUILD) $^ extra > $@
120 # `$(GUILE_CFLAGS)' may contain a series of `-I' switches so it must be
121 # included here, even though we'd really want `$(GUILE_CPPFLAGS)'.
122 snarfcppopts = $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
123 $(CFLAGS) $(AM_CFLAGS) $(GUILE_CFLAGS)
126 $(guile_snarf) -o $@ $< $(snarfcppopts)
128 # Target used by doc/Makefile, to create all built sources necessary
129 # for generating the manual.
131 .PHONY: built-sources
132 built-sources: $(BUILT_SOURCES)