summaryrefslogtreecommitdiff
path: root/libgeoclue/Makefile.am
blob: 159aafc873a9ec576390f52e9f1dbb111d1c440d (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
include $(top_srcdir)/Makefile.decl

CLIENT_INTERFACE_XML = $(top_srcdir)/src/org.freedesktop.GeoClue2.Client.xml
LOCATION_INTERFACE_XML = $(top_srcdir)/src/org.freedesktop.GeoClue2.Location.xml
MANAGER_INTERFACE_XML = $(top_srcdir)/src/org.freedesktop.GeoClue2.Manager.xml

dbus_built_sources = gclue-client.c   \
		     gclue-client.h   \
		     gclue-location.c \
		     gclue-location.h \
		     gclue-manager.c  \
		     gclue-manager.h

gclue-client.c: gclue-client.h
gclue-client.h: Makefile.am $(CLIENT_INTERFACE_XML)
	$(AM_V_GEN)$(GDBUS_CODEGEN) \
		--interface-prefix org.freedesktop.GeoClue2.	\
		--c-namespace GClue				\
		--generate-c-code gclue-client			\
		$(CLIENT_INTERFACE_XML)

gclue-location.c: gclue-location.h
gclue-location.h: Makefile.am $(LOCATION_INTERFACE_XML)
	$(AM_V_GEN)$(GDBUS_CODEGEN) \
		--interface-prefix org.freedesktop.GeoClue2.	\
		--c-namespace GClue				\
		--generate-c-code gclue-location		\
		$(LOCATION_INTERFACE_XML)

gclue-manager.c: gclue-manager.h
gclue-manager.h: Makefile.am $(MANAGER_INTERFACE_XML)
	$(AM_V_GEN)$(GDBUS_CODEGEN) \
		--interface-prefix org.freedesktop.GeoClue2.	\
		--c-namespace GClue				\
		--generate-c-code gclue-manager			\
		$(MANAGER_INTERFACE_XML)

BUILT_SOURCES = 		\
	$(dbus_built_sources)	\
	$(NULL)

lib_LTLIBRARIES = libgeoclue-2.la

geoclue_includedir = $(includedir)/libgeoclue-$(GEOCLUE_API_VERSION)
geoclue_include_HEADERS = geoclue.h          \
			  gclue-client.h     \
			  gclue-location.h   \
			  gclue-manager.h    \
			  gclue-helpers.h    \
			  gclue-simple.h     \
			  $(NULL)

AM_CPPFLAGS = $(LIBGEOCLUE_CFLAGS) 		     	  \
	      $(WARN_CFLAGS)			     	  \
	      -DLOCALEDIR="\"$(datadir)/locale\"" 	  \
	      -DG_LOG_DOMAIN=\""Geoclue"\"	     	  \
	      -DABS_TOP_SRCDIR=\""$(abs_top_srcdir)"\" 	  \
	      -DSYSCONFDIR=\""$(sysconfdir)"\"		  \
	      -I$(top_srcdir)/public-api		  \
	      -I$(top_builddir)/public-api

ENUMS_HEADER = $(top_srcdir)/public-api/gclue-enums.h
ENUMS_LIB = $(top_builddir)/public-api/libgeoclue-public-api.la

libgeoclue_2_la_SOURCES =  \
	gclue-client.c 	   \
	gclue-location.c   \
	gclue-manager.c    \
	gclue-helpers.c    \
	gclue-simple.c     \
	$(NULL)

libgeoclue_2_la_LIBADD =   \
	$(LIBGEOCLUE_LIBS) \
	$(LIBS)		   \
	$(ENUMS_LIB) 	   \
	$(NULL)

CLEANFILES = $(BUILT_SOURCES) \
	     $(NULL)

if HAVE_INTROSPECTION
girdir = $(datadir)/gir-1.0
gir_DATA = Geoclue-2.0.gir

typelibsdir = $(libdir)/girepository-1.0
typelibs_DATA = Geoclue-2.0.typelib

Geoclue-2.0.gir: $(libgeoclue_2_la_SOURCES) $(geoclue_include_HEADERS)
	$(AM_V_GEN) env CPPFLAGS="$(CPPFLAGS)"  \
	    CFLAGS="$(CFLAGS)"			\
	    LDFLAGS="$(LDFLAGS)"		\
	    CC="$(CC)"				\
	    PKG_CONFIG="$(PKG_CONFIG)"		\
	    DLLTOOL="$(DLLTOOL)" 		\
	    $(INTROSPECTION_SCANNER) -v 	\
	    --warn-all                          \
	    --namespace Geoclue                 \
	    --identifier-prefix=GClue           \
	    --symbol-prefix=gclue               \
	    --nsversion=2.0                     \
	    --include=Gio-2.0                   \
	    --library=geoclue-2	                \
	    --output $@                         \
	    --pkg=glib-2.0                      \
	    --pkg=gobject-2.0                   \
	    --pkg=gio-2.0                       \
	    --pkg-export=libgeoclue-2.0         \
	    --libtool=$(top_builddir)/libtool   \
	    -I$(srcdir)				\
	    -I$(top_srcdir)/public-api		\
	    -I$(top_builddir)/public-api	\
	    --c-include='geoclue.h'             \
	    $^                                  \
	    $(ENUMS_HEADER) 			\
	    $(NULL)

Geoclue-2.0.gir: libgeoclue-2.la $(INTROSPECTION_SCANNER) Makefile.am
Geoclue-2.0.typelib: Geoclue-2.0.gir $(INTROSPECTION_COMPILER)
	$(INTROSPECTION_COMPILER) $< -o $@

CLEANFILES += $(gir_DATA) $(typelibs_DATA)

endif # HAVE_INTROSPECTION

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgeoclue-$(GEOCLUE_API_VERSION).pc

DISTCLEANFILES = $(pkgconfig_DATA)

-include $(top_srcdir)/git.mk