summaryrefslogtreecommitdiff
path: root/common/Makefile.am
blob: ce37f164455ff90e45c36f2abb697ebcc62a8f6b (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
# vi:set ts=8 sw=8 noet ai nocindent:

noinst_LTLIBRARIES = libcommon.la

la_handler_built_sources =						\
	la-handler-dbus.h						\
	la-handler-dbus.c

nsm_consumer_built_sources =						\
	nsm-consumer-dbus.h						\
	nsm-consumer-dbus.c

nsm_lifecycle_control_built_sources =					\
	nsm-lifecycle-control-dbus.h					\
	nsm-lifecycle-control-dbus.c

shutdown_consumer_built_sources =					\
	shutdown-consumer-dbus.h					\
	shutdown-consumer-dbus.c

libcommon_la_built_sources =						\
	$(la_handler_built_sources)					\
	$(nsm_consumer_built_sources)					\
	$(nsm_lifecycle_control_built_sources)				\
	$(shutdown_consumer_built_sources)

libcommon_la_SOURCES =							\
	nsm-enum-types.c						\
	nsm-enum-types.h						\
	shutdown-client.c						\
	shutdown-client.h						\
	watchdog-client.c						\
	watchdog-client.h						\
	$(libcommon_la_built_sources)

libcommon_la_CFLAGS =							\
	-DG_LOG_DOMAIN=\"common\"					\
	-I$(top_srcdir)							\
	$(GIO_CFLAGS)							\
	$(GIO_UNIX_CFLAGS)						\
	$(GLIB_CFLAGS)							\
	$(PLATFORM_CFLAGS)						\
	$(PLATFORM_CPPFLAGS)						\
	$(SYSTEMD_DAEMON_CFLAGS)

libcommon_la_LDFLAGS =							\
	-no-undefined							\
	$(PLATFORM_LDFLAGS)

libcommon_la_LIBADD =							\
	$(GIO_LIBS)							\
	$(GIO_UNIX_LIBS)						\
	$(GLIB_LIBS)							\
	$(SYSTEMD_DAEMON_LIBS)

EXTRA_DIST =								\
	la-handler-dbus.xml						\
	nsm-consumer-dbus.xml						\
	nsm-lifecycle-control-dbus.xml					\
	shutdown-consumer-dbus.xml

DISTCLEANFILES =							\
	$(libcommon_la_built_sources)

BUILT_SOURCES =								\
	$(libcommon_la_built_sources)

$(la_handler_built_sources): la-handler-dbus.xml Makefile
	$(AM_V_GEN) $(GDBUS_CODEGEN)					\
	    --interface-prefix org.genivi				\
	    --c-namespace ""						\
	    --generate-c-code la-handler-dbus				\
	    --annotate							\
	      org.genivi.NodeStartupController1.LegacyAppHandler	\
	      org.gtk.GDBus.C.Name					\
	      LA_Handler $<

$(nsm_consumer_built_sources): nsm-consumer-dbus.xml Makefile
	$(AM_V_GEN) $(GDBUS_CODEGEN)					\
	    --interface-prefix org.genivi.NodeStateManager		\
	    --c-namespace ""						\
	    --generate-c-code nsm-consumer-dbus				\
	    --annotate							\
	      org.genivi.NodeStateManager.Consumer			\
	      org.gtk.GDBus.C.Name NSM_Consumer $<

$(nsm_lifecycle_control_built_sources): nsm-lifecycle-control-dbus.xml Makefile
	$(AM_V_GEN) $(GDBUS_CODEGEN)					\
	    --interface-prefix org.genivi.NodeStateManager		\
	    --c-namespace ""						\
	    --generate-c-code nsm-lifecycle-control-dbus		\
	    --annotate							\
	      org.genivi.NodeStateManager.LifecycleControl		\
	      org.gtk.GDBus.C.Name NSM_Lifecycle_Control $<

$(shutdown_consumer_built_sources): shutdown-consumer-dbus.xml Makefile
	$(AM_V_GEN) $(GDBUS_CODEGEN)					\
	    --interface-prefix org.genivi				\
	    --c-namespace ""						\
	    --generate-c-code shutdown-consumer-dbus			\
	    --annotate							\
	      org.genivi.NodeStateManager.LifeCycleConsumer		\
	      org.gtk.GDBus.C.Name Shutdown_Consumer $<