summaryrefslogtreecommitdiff
path: root/libappstream-glib/Makefile.am
blob: 9b4835b61aa066ef08d981814bff11775838fd50 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
if HAVE_INTROSPECTION
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
endif

AM_CPPFLAGS =							\
	$(GLIB_CFLAGS)						\
	-I$(top_srcdir)/libappstream-glib			\
	-I$(top_builddir)/libappstream-glib			\
	-I.							\
	-DAS_COMPILATION					\
	-DG_LOG_DOMAIN=\"As\"

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = 						\
	appstream-glib.pc

lib_LTLIBRARIES =						\
	libappstream-glib.la

libappstream_glib_includedir = $(includedir)/libappstream-glib
libappstream_glib_include_HEADERS =				\
	appstream-glib.h					\
	as-app.h						\
	as-image.h						\
	as-node.h						\
	as-release.h						\
	as-screenshot.h						\
	as-store.h						\
	as-tag.h						\
	as-utils.h						\
	as-version.h

libappstream_glib_la_SOURCES =					\
	as-app.c						\
	as-image.c						\
	as-node.c						\
	as-release.c						\
	as-screenshot.c						\
	as-store.c						\
	as-tag.c						\
	as-utils.c						\
	as-version.h

CLEANFILES = $(BUILT_SOURCES)

libappstream_glib_la_LIBADD =					\
	$(GLIB_LIBS)

libappstream_glib_la_LDFLAGS =					\
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)	\
	-export-dynamic						\
	-no-undefined						\
	-export-symbols-regex '^as_.*'

libappstream_glib_la_CFLAGS =					\
	$(WARNINGFLAGS_C)

check_PROGRAMS =						\
	as-self-test
as_self_test_SOURCES =						\
	as-self-test.c
as_self_test_LDADD =						\
	$(GLIB_LIBS)						\
	$(lib_LTLIBRARIES)
as_self_test_CFLAGS = $(WARNINGFLAGS_C)

TESTS = as-self-test

if HAVE_INTROSPECTION
introspection_sources =						\
	$(libappstream_glib_include_HEADERS)			\
	$(libappstream_glib_la_SOURCES)

AppStreamGlib-1.0.gir: libappstream-glib.la
AppStreamGlib_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
AppStreamGlib_1_0_gir_CFLAGS = $(AM_CPPFLAGS)
AppStreamGlib_1_0_gir_SCANNERFLAGS = --identifier-prefix=As \
				--symbol-prefix=as_ \
				--warn-all \
				--add-include-path=$(srcdir)
AppStreamGlib_1_0_gir_EXPORT_PACKAGES = appstream-glib
AppStreamGlib_1_0_gir_LIBS = libappstream-glib.la
AppStreamGlib_1_0_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += AppStreamGlib-1.0.gir

girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)

typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)

CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif

EXTRA_DIST =							\
	as-version.h.in						\
	appstream-glib.pc.in

clean-local:
	rm -f *~
	rm -f $(CLEANFILES)

-include $(top_srcdir)/git.mk