dfe185d5eff28675d0959bd2abb630dbc5e9a18c
[oweals/gnunet.git] / src / json / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if USE_COVERAGE
5   AM_CFLAGS = --coverage -O0
6   XLIB = -lgcov
7 endif
8
9 lib_LTLIBRARIES = \
10   libgnunetjson.la
11
12 libgnunetjson_la_LDFLAGS = \
13   -version-info 0:0:0 \
14   -no-undefined
15 libgnunetjson_la_SOURCES = \
16   json.c \
17   json_mhd.c \
18   json_generator.c \
19   json_helper.c \
20   json_gnsrecord.c
21 libgnunetjson_la_LIBADD = \
22   $(top_builddir)/src/util/libgnunetutil.la \
23   $(top_builddir)/src/gnsrecord/libgnunetgnsrecord.la \
24   -ljansson \
25   -lmicrohttpd \
26   $(XLIB) \
27   $(Z_LIBS)
28
29 check_PROGRAMS = \
30   test_json \
31   test_json_mhd
32
33 TESTS = \
34   $(check_PROGRAMS)
35
36 test_json_SOURCES = \
37   test_json.c
38 test_json_LDADD = \
39   libgnunetjson.la \
40   $(top_builddir)/src/util/libgnunetutil.la \
41   -ljansson
42
43
44 if HAVE_LIBGNURL
45 LIB_GNURL=@LIBGNURL@
46 CPP_GNURL=@LIBGNURL_CPPFLAGS@
47 else
48 if HAVE_LIBCURL
49 LIB_GNURL=@LIBCURL@
50 CPP_GNURL=@LIBCURL_CPPFLAGS@
51 endif
52 endif
53
54
55 test_json_mhd_SOURCES = \
56   test_json_mhd.c
57 test_json_mhd_LDADD = \
58   libgnunetjson.la \
59   $(top_builddir)/src/util/libgnunetutil.la \
60   -ljansson \
61   -lmicrohttpd \
62   $(Z_LIBS) \
63   $(LIB_GNURL)
64 test_json_mhd_CPPFLAGS = \
65  $(CPP_GNURL) $(AM_CPPFLAGS)