Add configure debug switch to compile with debug symbols enabled
[libfso-glib.git] / src / Makefile.am
blobe7481fd92f4c5d3fa7da330186014a0419c5a786
1 AUTOMAKE_OPTIONS =
3 AM_CFLAGS = \
4         $(DEPS_CFLAGS) \
5         -include $(CONFIG_HEADER)
7 VALACFLAGS = \
8         --pkg gio-2.0 \
9         --header freesmartphone.h \
10         --library fso-glib-1.0
12 DBUSBINDINGTOOLFLAGS = \
13         --api-path=$(FSO_SPECS_DIR) \
14         --directory=./ --strip-namespace=org \
15         --rename-namespace=freedesktop:FreeDesktop \
16         --rename-namespace=freesmartphone:FreeSmartphone
18 if WANT_GDBUS
19 DBUSBINDINGTOOLFLAGS += --gdbus
20 else
21 VALACFLAGS += --pkg dbus-glib-1
22 endif
24 if WANT_DEBUG
25 VALACFLAGS += -g -D DEBUG
26 AM_CFLAGS += -ggdb -O0
27 endif
29 BUILT_SOURCES = libfso_glib_la.vala.stamp
31 lib_LTLIBRARIES = libfso-glib.la
33 libfso_glib_la_VALASOURCES = \
34         freesmartphone.vala \
35         freesmartphone-context.vala \
36         freesmartphone-data.vala \
37         freesmartphone-device.vala \
38         freesmartphone-gsm.vala \
39         freesmartphone-time.vala \
40         freesmartphone-pim.vala \
41         freesmartphone-audio.vala \
42         \
43         sflphone-sflphone.vala \
44         \
45         net-connman.vala \
46         \
47         bluez.vala
49 libfso_glibdir = $(includedir)/fso-glib
50 libfso_glib_HEADERS = \
51         freesmartphone.h
53 vapidir = $(datadir)/vala/vapi
54 vapi_DATA = \
55         fso-glib-1.0.vapi \
56         fso-glib-1.0.deps
58 libfso_glib_la_SOURCES = \
59         $(libfso_glib_la_VALASOURCES:.vala=.c)
61 libfso_glib_la.vala.stamp: gen-bindings $(libfso_glib_la_VALASOURCES)
62         $(VALAC) -C ${VALACFLAGS} --basedir . $(libfso_glib_la_VALASOURCES)
63         touch $@
65 gen-bindings:
66         vala-dbus-binding-tool $(DBUSBINDINGTOOLFLAGS)
68 if TYPELIB
69 girdir = $(datadir)/gir-1.0
70 gir_DATA = FreeSmartphone-1.0.gir
71 typelibdir = $(libdir)/girepository-1.0
72 typelib_DATA = FreeSmartphone-1.0.typelib
73 VALACFLAGS += --gir FreeSmartphone-1.0.gir
75 FreeSmartphone-1.0.typelib:FreeSmartphone-1.0.gir
76         $(GIR_COMPILER) --includedir /usr/share/gir-1.0/ FreeSmartphone-1.0.gir -o FreeSmartphone-1.0.typelib
77 endif
79 libfso_glib_la_LIBADD = \
80         $(DEPS_LIBS)
82 EXTRA_DIST = \
83         $(libfso_glib_la_VALASOURCES) \
84         libfso_glib_la.vala.stamp
86 CLEANFILES = \
87         *.c \
88         *.h \
89         *.vapi \
90         *.gir \
91         *.typelib \
92         libfso_glib_la.vala.stamp
94 DISTCLEANFILES = \
95         Makefile.in