summaryrefslogtreecommitdiff
path: root/gdbus/Makefile.am
blob: 20faee5c3f59f665f4fd6b8c806acd730d1f42de (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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
include $(top_srcdir)/Makefile.decl

NULL =

SUBDIRS=. tests

AM_CPPFLAGS = \
	-DG_LOG_DOMAIN=\"GLib-DBus-Standalone\"			\
	-I$(top_builddir)					\
	-I$(top_srcdir)						\
	-DG_DISABLE_DEPRECATED					\
	-DG_DBUS_COMPILATION					\
	-DG_DBUS_I_UNDERSTAND_THAT_ABI_AND_API_IS_UNSTABLE	\
	$(NULL)

lib_LTLIBRARIES = libgdbus-standalone.la

marshal_sources = \
        gdbus-marshal.h	\
        gdbus-marshal.c	\
	$(NULL)

glib_genmarshal=glib-genmarshal

gdbus-marshal.h: gdbus-marshal.list
	$(glib_genmarshal) --prefix=_gdbus_marshal $(srcdir)/gdbus-marshal.list --header --internal > $@.tmp && \
	  mv $@.tmp $@

gdbus-marshal.c: gdbus-marshal.h gdbus-marshal.list
	(echo "#include \"gdbus-marshal.h\""; \
	$(glib_genmarshal) --prefix=_gdbus_marshal $(srcdir)/gdbus-marshal.list --body --internal) > $@.tmp && \
	  mv $@.tmp $@

gdbus_headers =				\
	gdbus.h				\
	gdbusenums.h			\
	gdbustypes.h			\
	gdbusutils.h			\
	gdbuserror.h			\
	gdbusaddress.h			\
	gdbusconnection.h		\
	gdbusmessage.h			\
	gdbusnameowning.h		\
	gdbusnamewatching.h		\
	gdbusproxywatching.h		\
	gdbusproxy.h			\
	gdbusintrospection.h		\
	gdbusmethodinvocation.h		\
	gdbusserver.h			\
	$(NULL)

libgdbus_standalone_la_SOURCES =					\
	gdbus.h								\
	gdbustypes.h							\
	gdbusutils.h			gdbusutils.c			\
	gdbusenumtypes.h						\
	gdbus-marshal.h 		gdbus-marshal.c 		\
	gdbusenumtypes.h		gdbusenumtypes.c		\
	gdbusaddress.h			gdbusaddress.c			\
	gdbusauth.h			gdbusauth.c			\
	gdbusauthmechanism.h		gdbusauthmechanism.c		\
	gdbusauthmechanismanon.h	gdbusauthmechanismanon.c	\
	gdbusauthmechanismexternal.h	gdbusauthmechanismexternal.c	\
	gdbuserror.h			gdbuserror.c			\
	gdbusconnection.h		gdbusconnection.c		\
	gdbusmessage.h			gdbusmessage.c			\
	gdbusnameowning.h		gdbusnameowning.c		\
	gdbusnamewatching.h		gdbusnamewatching.c		\
	gdbusproxywatching.h		gdbusproxywatching.c		\
	gdbusproxy.h			gdbusproxy.c			\
	gdbusprivate.h			gdbusprivate.c			\
	gdbusintrospection.h		gdbusintrospection.c		\
	gdbusmethodinvocation.h		gdbusmethodinvocation.c		\
	gdbusserver.h			gdbusserver.c			\
	$(NULL)

$(libgdbus_standalone_la_OBJECTS): $(marshal_sources)

libgdbus_standalone_la_CFLAGS = 			\
	$(GLIB2_CFLAGS)					\
	$(GOBJECT2_CFLAGS)				\
	$(GIO2_CFLAGS)					\
	$(GIO_UNIX2_CFLAGS)				\
	$(NULL)

libgdbus_standalone_la_LIBADD = 			\
	$(GLIB2_LIBS)					\
	$(GOBJECT2_LIBS)				\
	$(GIO2_LIBS)					\
	$(GIO_UNIX2_LIBS)				\
	$(NULL)
install-def-file:
uninstall-def-file:

export_symbols = -export-symbols-regex '^g_.*'

LT_CURRENT=0
LT_REVISION=0
LT_AGE=0

libgdbus_standalone_la_LDFLAGS = \
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
	-export-dynamic $(no_undefined) $(export_symbols)

libgdbus_standalone_la_DEPENDENCIES = $(gdbus_def)

gdbusincludedir=$(includedir)/gdbus-standalone/gdbus
gdbusinclude_HEADERS = 			\
	$(gdbus_headers)		\
	gdbusenumtypes.h		\
	$(NULL)

# these sources (also mentioned above) are generated.
BUILT_SOURCES = 			\
	gdbus-marshal.h 		\
	gdbus-marshal.c 		\
	gdbusenumtypes.h		\
	gdbusenumtypes.c		\
	$(NULL)

EXTRA_DIST += 				\
	gdbus-marshal.list		\
	gdbusenumtypes.h.template	\
	gdbusenumtypes.c.template	\
	$(NULL)

CLEANFILES = 			\
	$(marshal_sources)	\
	$(NULL)

gdbusenumtypes.h: $(gdbus_headers) gdbusenumtypes.h.template Makefile.am
	( top_builddir=`cd $(top_builddir) && pwd`; \
	  cd $(srcdir) && glib-mkenums --template gdbusenumtypes.h.template $(gdbus_headers) ) > \
	    gdbusenumtypes.h.tmp && \
	    mv gdbusenumtypes.h.tmp gdbusenumtypes.h

gdbusenumtypes.c: $(gdbus_headers) gdbusenumtypes.c.template Makefile.am
	( top_builddir=`cd $(top_builddir) && pwd`; \
	  cd $(srcdir) && glib-mkenums --template gdbusenumtypes.c.template $(gdbus_headers) ) > \
	    gdbusenumtypes.c.tmp && mv gdbusenumtypes.c.tmp gdbusenumtypes.c

noinst_PROGRAMS =
noinst_PROGRAMS += example-own-name
noinst_PROGRAMS += example-watch-name
noinst_PROGRAMS += example-watch-proxy
noinst_PROGRAMS += example-server
noinst_PROGRAMS += example-unix-fd-client
noinst_PROGRAMS += example-subtree
noinst_PROGRAMS += example-peer

example_watch_name_SOURCES = example-watch-name.c
example_watch_name_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
example_watch_name_LDADD   = libgdbus-standalone.la  $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

example_watch_proxy_SOURCES = example-watch-proxy.c
example_watch_proxy_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
example_watch_proxy_LDADD   = libgdbus-standalone.la  $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

example_own_name_SOURCES = example-own-name.c
example_own_name_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
example_own_name_LDADD   = libgdbus-standalone.la $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

example_server_SOURCES = example-server.c
example_server_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
example_server_LDADD   = libgdbus-standalone.la $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

example_unix_fd_client_SOURCES = example-unix-fd-client.c
example_unix_fd_client_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
example_unix_fd_client_LDADD   = libgdbus-standalone.la $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

example_subtree_SOURCES = example-subtree.c
example_subtree_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
example_subtree_LDADD   = libgdbus-standalone.la $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

example_peer_SOURCES = example-peer.c
example_peer_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
example_peer_LDADD   = libgdbus-standalone.la $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

bin_PROGRAMS = gdbus

gdbus_SOURCES = gdbus.c
gdbus_CFLAGS  = $(GLIB2_CFLAGS) $(GOBJECT2_CFLAGS) $(GIO2_CFLAGS) $(GIO_UNIX2_CFLAGS)
gdbus_LDADD   = libgdbus-standalone.la  $(GLIB2_LIBS) $(GOBJECT2_LIBS) $(GIO2_LIBS) $(GIO_UNIX2_LIBS)

completiondir = $(sysconfdir)/bash_completion.d
completion_SCRIPTS = gdbus-bash-completion.sh
EXTRA_DIST += $(completion_SCRIPTS)

profiledir = $(sysconfdir)/profile.d
profile_SCRIPTS = gdbus-bash-completion.sh
EXTRA_DIST += $(profile_SCRIPTS)


clean-local :
	rm -f *~