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

libexec_PROGRAMS = indicator-example-service

indicator_example_service_SOURCES = \
	example-interface.c \
	example-interface.h \
	gen-example-service.xml.c \
	example-service.c \
	dbus-shared.h \
	settings-shared.h
indicator_example_service_CFLAGS = \
	-Wall \
	-Werror \
	$(SERVICE_CFLAGS) \
	-DTIMEZONE_FILE="\"/etc/timezone\"" \
	-DG_LOG_DOMAIN=\"Indicator-Example\"
indicator_example_service_LDADD = \
	$(SERVICE_LIBS)

examplelibdir = $(INDICATORDIR)
examplelib_LTLIBRARIES = libexample.la
libexample_la_SOURCES = \
	gen-example-service.xml.h \
	dbus-shared.h \
	settings-shared.h \
	indicator-example.c
libexample_la_CFLAGS = \
	$(INDICATOR_CFLAGS) \
	-Wall -Werror \
	-DG_LOG_DOMAIN=\"Indicator-Example\"
libexample_la_LIBADD = \
	$(INDICATOR_LIBS)
libexample_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-example-service.xml.c \
	gen-example-service.xml.h


CLEANFILES = \
	$(BUILT_SOURCES)

EXTRA_DIST = \
	example-service.xml