Makefile.am 2.74 KB
Newer Older
1 2
include $(top_srcdir)/Makefile.decl

Zeeshan Ali's avatar
Zeeshan Ali committed
3 4
libexec_PROGRAMS = geoclue

5
SUBDIRS = public-api agent geocode-glib
6

Zeeshan Ali's avatar
Zeeshan Ali committed
7
if BUILD_GEOIP_SERVER
8
SUBDIRS += geoip-server
Zeeshan Ali's avatar
Zeeshan Ali committed
9
endif # BUILD_GEOIP_SERVER
10

11
interfacedir = $(datadir)/geoclue-$(GEOCLUE_API_VERSION)
12 13
interface_DATA = geoclue-interface.xml

Zeeshan Ali's avatar
Zeeshan Ali committed
14 15
dbus_built_sources = geoclue-interface.c geoclue-interface.h
geoclue-interface.c: geoclue-interface.h
16
geoclue-interface.h: Makefile.am $(interface_DATA)
17
	$(AM_V_GEN)$(GDBUS_CODEGEN) \
Zeeshan Ali's avatar
Zeeshan Ali committed
18 19 20
		--interface-prefix org.freedesktop.GeoClue2.	\
		--c-namespace GClue				\
		--generate-c-code geoclue-interface		\
21
    		--generate-docbook=docs				\
22
		$(srcdir)/$(interface_DATA)
Zeeshan Ali's avatar
Zeeshan Ali committed
23 24 25 26 27

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

28 29 30
noinst_LTLIBRARIES = libgeoclue.la

AM_CPPFLAGS = $(GEOCLUE_CFLAGS) 		     	  \
31 32
	      $(ModemManager_CFLAGS)			  \
	      $(NetworkManager_CFLAGS)			  \
33 34 35
	      $(WARN_CFLAGS)			     	  \
	      -DLOCALEDIR="\"$(datadir)/locale\"" 	  \
	      -DG_LOG_DOMAIN=\""Geoclue"\"	     	  \
36 37
	      -DABS_TOP_SRCDIR=\""$(abs_top_srcdir)"\" 	  \
	      -DSYSCONFDIR=\""$(sysconfdir)"\"		  \
38
	      -I$(srcdir)/agent				  \
39
	      -I$(srcdir)/public-api
40 41

libgeoclue_la_SOURCES =	 	 \
Zeeshan Ali's avatar
Zeeshan Ali committed
42
	$(BUILT_SOURCES) 	 \
43 44
	gclue-client-info.h 	 \
	gclue-client-info.c 	 \
45 46
	gclue-config.h 	 	 \
	gclue-config.c 	 	 \
47 48 49 50
	gclue-error.h 	 	 \
	gclue-error.c 	 	 \
	gclue-ipclient.h 	 \
	gclue-ipclient.c 	 \
51 52
	gclue-location-source.h	 \
	gclue-location-source.c	 \
Zeeshan Ali's avatar
Zeeshan Ali committed
53 54
	gclue-locator.h 	 \
	gclue-locator.c 	 \
Zeeshan Ali's avatar
Zeeshan Ali committed
55 56 57 58
	gclue-service-manager.h  \
	gclue-service-manager.c  \
	gclue-service-client.h   \
	gclue-service-client.c   \
59 60
	gclue-service-location.h \
	gclue-service-location.c \
61 62
	gclue-user-config.h 	 \
	gclue-user-config.c 	 \
Zeeshan Ali's avatar
Zeeshan Ali committed
63 64
	gclue-web-source.c	 \
	gclue-web-source.h	 \
Zeeshan Ali's avatar
Zeeshan Ali committed
65
	$(NULL)
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88

if BUILD_WIFI_SOURCE
libgeoclue_la_SOURCES += gclue-wifi.h gclue-wifi.c
endif

if BUILD_MODEM_SOURCE
libgeoclue_la_SOURCES += gclue-modem-source.c gclue-modem-source.h
endif

if BUILD_3G_SOURCE
libgeoclue_la_SOURCES += gclue-3g.c gclue-3g.h
endif

if BUILD_MODEM_GPS_SOURCE
libgeoclue_la_SOURCES += gclue-modem-gps.c gclue-modem-gps.h
endif

libgeoclue_la_LIBADD = \
	$(GEOCLUE_LIBS)			\
	$(NetworkManager_LIBS)		\
	$(ModemManager_LIBS)		\
	$(LIBS)				\
	$(NULL)
Zeeshan Ali's avatar
Zeeshan Ali committed
89

90 91 92
geoclue_SOURCES =	 	  \
	gclue-main.c	 	  \
	$(NULL)
93 94 95 96 97
geoclue_LDADD = $(GEOCLUE_LIBS) 	  		    	\
		$(LIBS) 		  		    	\
		$(builddir)/libgeoclue.la		    	\
		$(builddir)/agent/libgeoclue-agent.la 		\
		$(builddir)/geocode-glib/libgeocode-glib.la 	\
98
		$(builddir)/public-api/libgeoclue-public-api.la
Zeeshan Ali's avatar
Zeeshan Ali committed
99 100

CLEANFILES = $(BUILT_SOURCES)
Zeeshan Ali's avatar
Zeeshan Ali committed
101
EXTRA_DIST = $(interface_DATA) \
102
	     test-data/fedora-geoip-results.json \
Zeeshan Ali's avatar
Zeeshan Ali committed
103
	     test-data/freegeoip-results.json
Zeeshan Ali's avatar
Zeeshan Ali committed
104

Zeeshan Ali's avatar
Zeeshan Ali committed
105
pkgconfigdir = $(libdir)/pkgconfig
106
pkgconfig_DATA = geoclue-$(GEOCLUE_API_VERSION).pc
Zeeshan Ali's avatar
Zeeshan Ali committed
107

108 109
DISTCLEANFILES = $(pkgconfig_DATA)

Zeeshan Ali's avatar
Zeeshan Ali committed
110
-include $(top_srcdir)/git.mk