summaryrefslogtreecommitdiff
path: root/json-glib/Makefile.am
blob: ff5ea273714049294bd2974d6d3eb16d556b9d6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
NULL =

INCLUDES = \
	-I$(top_srcdir) 		\
	-DPREFIX=\""$(prefix)"\" 	\
	-DLIBDIR=\""$(libdir)"\" 	\
	-DG_DISABLE_DEPRECATED 		\
	-DG_LOG_DOMAIN=\"Json\" 	\
	$(JSON_CFLAGS) 			\
	$(JSON_DEBUG_CFLAGS) 		\
	$(NULL)

LDADD = $(JSON_LT_LDFLAGS) -export-dynamic -rpath $(libdir)

BUILT_SOURCES = json-marshal.h json-marshal.c

STAMP_FILES = stamp-json-marshal.h

json-marshal.h: stamp-json-marshal.h
	@true
stamp-json-marshal.h: Makefile json-marshal.list
	$(GLIB_GENMARSHAL) \
		--prefix=_json_marshal \
		--header \
	$(srcdir)/json-marshal.list > xgen-jmh && \
	(cmp -s xgen-jmh json-marshal.h || cp -f xgen-jmh json-marshal.h) && \
	rm -f xgen-jmh && \
	echo timestamp > $(@F)

json-marshal.c: Makefile json-marshal.list
	(echo "#include \"json-marshal.h\"" ; \
	 $(GLIB_GENMARSHAL) \
		--prefix=_json_marshal \
		--body \
	 $(srcdir)/json-marshal.list ) > xgen-jmc && \
	cp -f xgen-jmc json-marshal.c && \
	rm -f xgen-jmc

source_h = \
	$(srcdir)/json-generator.h \
	$(srcdir)/json-gobject.h \
	$(srcdir)/json-parser.h \
	$(srcdir)/json-types.h \
	$(srcdir)/json-version.h \
	$(NULL)

source_h_private =

source_c = \
	json-array.c \
	json-generator.c \
	json-gobject.c \
	json-node.c \
	json-object.c \
	json-parser.c \
	$(NULL)

lib_LTLIBRARIES = libjson-glib-1.0.la

libjson_glib_1_0_la_LIBADD = $(JSON_LIBS)
libjson_glib_1_0_la_SOURCES = \
	$(source_c) \
	$(source_h) \
	$(source_h_priv) \
	$(BUILT_SOURCES) \
	$(NULL)
libjson_glib_1_0_la_LDFLAGS = $(LDADD)

jsoninclude_DATA = $(source_h) json-glib.h
jsonincludedir = $(includedir)/json-glib-1.0/json-glib

CLEANFILES = $(STAMP_FILES) $(BUILT_SOURCES)

DISTCLEANFILES = json-version.h

EXTRA_DIST = json-version.h.in