aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 254022e7c3edc4159d7f35384d1317e61e5fae4b (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

ccpaneldir = $(CCPANELDIR)
ccpanel_LTLIBRARIES = libindicator-datetime.la

libexec_PROGRAMS = indicator-datetime-service

indicator_datetime_service_SOURCES = \
	datetime-interface.c \
	datetime-interface.h \
	gen-datetime-service.xml.c \
	datetime-service.c \
	utils.c \
	utils.h \
	dbus-shared.h \
	settings-shared.h
indicator_datetime_service_CFLAGS = \
	-Wall \
	-Werror \
	$(SERVICE_CFLAGS) \
	-DTIMEZONE_FILE="\"/etc/timezone\"" \
	-DG_LOG_DOMAIN=\"Indicator-Datetime\"
indicator_datetime_service_LDADD = \
	$(SERVICE_LIBS)

datetimelibdir = $(INDICATORDIR)
datetimelib_LTLIBRARIES = libdatetime.la
libdatetime_la_SOURCES = \
	gen-datetime-service.xml.h \
	dbus-shared.h \
	settings-shared.h \
	utils.c \
	utils.h \
	indicator-datetime.c
libdatetime_la_CFLAGS = \
	$(INDICATOR_CFLAGS) \
	-Wall -Werror \
	-DTIMEZONE_FILE="\"/etc/timezone\"" \
	-DG_LOG_DOMAIN=\"Indicator-Datetime\"
libdatetime_la_LIBADD = \
	$(INDICATOR_LIBS)
libdatetime_la_LDFLAGS = \
	-module \
	-avoid-version

libindicator_datetime_la_SOURCES =\
	datetime-prefs.c \
	datetime-prefs-locations.c \
	datetime-prefs-locations.h \
	timezone-completion.c \
	timezone-completion.h \
	utils.c \
	utils.h \
	settings-shared.h
libindicator_datetime_la_CFLAGS = \
	-Wall \
	-Werror \
	-I$(top_srcdir)/libmap \
	$(PREF_CFLAGS) \
	-DTIMEZONE_FILE="\"/etc/timezone\"" \
	-DPKGDATADIR="\"$(pkgdatadir)\""
libindicator_datetime_la_LIBADD = \
	 $(top_builddir)/libmap/libmap.la \
	$(PREF_LIBS)
libindicator_datetime_la_LDFLAGS = -module -avoid-version

gen-%.xml.c: %.xml
	@echo "Building $@ from $<"
	@echo "const char * _$(subst -,_,$(subst .,_,$(basename $<))) = " > $@
	@sed -e "s:\":\\\\\":g" -e s:^:\": -e s:\$$:\\\\n\": $< >> $@
	@echo ";" >> $@

gen-%.xml.h: %.xml
	@echo "Building $@ from $<"
	@echo "extern const char * _$(subst -,_,$(subst .,_,$(basename $<)));" > $@

BUILT_SOURCES = \
	gen-datetime-service.xml.c \
	gen-datetime-service.xml.h


CLEANFILES = \
	$(BUILT_SOURCES)

EXTRA_DIST = \
	datetime-service.xml