summaryrefslogtreecommitdiff
path: root/src/tests/Makefile.am
blob: bea8866d73783dc9d79afb4bccc4be1dcf3d4d7b (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

NULL =

INCLUDES =                                              		\
	-I$(top_builddir)/src                           		\
	-I$(top_srcdir)/src                             		\
	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\"       		\
	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\"       		\
	-DPACKAGE_DATA_DIR=\""$(datadir)"\"             		\
	-DPACKAGE_BIN_DIR=\""$(bindir)"\"               		\
	-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" 		\
	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\"         		\
	-DPACKAGE_LIB_DIR=\""$(libdir)"\"               		\
	-D_POSIX_PTHREAD_SEMANTICS                      		\
	-D_REENTRANT	                                		\
	-DEGG_DBUS_I_KNOW_API_IS_SUBJECT_TO_CHANGE			\
	$(NULL)

###########################################################################

noinst_LTLIBRARIES=libeggdbustests.la

BUILT_SOURCES = 							\
	test-built-sources.stamp					\
	$(NULL)

test-built-sources.stamp : Makefile.am $(top_builddir)/src/eggdbus/eggdbus-binding-tool com.example.Frob.xml com.example.Tweak.xml com.example.Twiddle.xml
	EGG_DBUS_GENMARSHAL=$(top_builddir)/src/eggdbus/eggdbus-glib-genmarshal $(top_builddir)/src/eggdbus/eggdbus-binding-tool									\
	  --namespace       "Test"										\
	  --dbus-namespace  "com.example"									\
	  --include-header  testtypes.h										\
	  --introspection-xml $(top_srcdir)/src/tests/com.example.Frob.xml					\
	  --introspection-xml $(top_srcdir)/src/tests/com.example.Tweak.xml					\
	  --introspection-xml $(top_srcdir)/src/tests/com.example.Twiddle.xml					\
	  --stamp-file test-built-sources.stamp									\
	  $(NULL)

# keep in sync with contents of test-built-sources.stamp (Thanks autotools)
#
test_built_sources = testbindingsmarshal.c testbindingsmarshal.h testbindingsmarshal.list testbindings.c testbindings.h testbindingstypes.h testtwiddle.c testtwiddle.h docbook-interface-com.example.Twiddle.xml testtweak.c testtweak.h docbook-interface-com.example.Tweak.xml testfrob.c testfrob.h docbook-interface-com.example.Frob.xml testvehicle.c testvehicle.h docbook-enum-Vehicle.xml testotherflags.c testotherflags.h docbook-enum-OtherFlags.xml testdeleteflags.c testdeleteflags.h docbook-enum-DeleteFlags.xml testcreateflags.c testcreateflags.h docbook-enum-CreateFlags.xml testdetailederror.c testdetailederror.h docbook-enum-DetailedError.xml testerror.c testerror.h docbook-enum-Error.xml teststructwithvariant.c teststructwithvariant.h testextendeddescribedpoint.c testextendeddescribedpoint.h testdescribedpair.c testdescribedpair.h testdescribedpoint.c testdescribedpoint.h testpair.c testpair.h testpoint.c testpoint.h

libeggdbustests_la_SOURCES = 				\
	test-built-sources.stamp			\
	$(test_built_sources)				\
	testsubject.h		testsubject.c		\
	testfrobimpl.h		testfrobimpl.c		\
	testtweakimpl.h		testtweakimpl.c		\
	testtwiddleimpl.h	testtwiddleimpl.c	\
	$(NULL)

libeggdbustests_la_CFLAGS =                		\
	$(GLIB_CFLAGS)					\
	$(NULL)

libeggdbustests_la_LIBADD =				\
	$(GLIB_LIBS)					\
	$(top_builddir)/src/eggdbus/libeggdbus-1.la	\
	$(NULL)

###########################################################################

noinst_PROGRAMS = testclient

testclient_SOURCES =					\
				testclient.c		\
	testtypes.h					\
	$(NULL)

testclient_CFLAGS =                			\
	$(GLIB_CFLAGS)					\
	$(NULL)

testclient_LDADD =					\
	$(GLIB_LIBS)					\
	$(top_builddir)/src/eggdbus/libeggdbus-1.la	\
	libeggdbustests.la				\
	$(NULL)

###########################################################################

noinst_PROGRAMS += testserver

testserver_SOURCES =					\
				testserver.c		\
	testtypes.h					\
	$(NULL)

testserver_CFLAGS =                			\
	$(GLIB_CFLAGS)					\
	$(NULL)

testserver_LDADD =					\
	$(GLIB_LIBS)					\
	$(top_builddir)/src/eggdbus/libeggdbus-1.la	\
	libeggdbustests.la				\
	$(NULL)

EXTRA_DIST = 								\
	com.example.Frob.xml 						\
	com.example.Tweak.xml						\
	com.example.Twiddle.xml						\
	$(NULL)

dist-hook :
	(for i in $(test_built_sources) $(BUILT_SOURCES) ; do rm -f $(distdir)/$$i ; done)

clean-local:
	rm -f *~ $(test_built_sources) $(BUILT_SOURCES)