Makefile.inc.am 1.7 KB
Newer Older
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
ADMIN_PROTOCOL = $(srcdir)/admin/admin_protocol.x

ADMIN_PROTOCOL_GENERATED = \
	admin/admin_protocol.c \
	admin/admin_protocol.h \
	admin/admin_client.h \
	admin/admin_server_dispatch_stubs.h \
	$(NULL)

EXTRA_DIST += $(ADMIN_PROTOCOL) $(ADMIN_PROTOCOL_GENERATED)
BUILT_SOURCES += $(ADMIN_PROTOCOL_GENERATED)
MAINTAINERCLEANFILES += $(ADMIN_PROTOCOL_GENERATED)

admin/admin_server_dispatch.c: admin/admin_server_dispatch_stubs.h

noinst_LTLIBRARIES += libvirt_driver_admin.la
libvirt_driver_admin_la_SOURCES = \
	admin/admin_protocol.c \
	admin/admin_protocol.h \
	admin/admin_server.c \
	admin/admin_server.h \
	admin/admin_server_dispatch.c \
	admin/admin_server_dispatch.h \
	admin/admin_server_dispatch_stubs.h \
	$(NULL)
libvirt_driver_admin_la_CFLAGS = \
	$(AM_CFLAGS) \
	$(XDR_CFLAGS) \
	-I$(top_srcdir)/src/util \
	-I$(top_srcdir)/src/admin \
	$(NULL)
libvirt_driver_admin_la_LIBADD = ../gnulib/lib/libgnu.la
libvirt_driver_admin_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)

35 36 37 38 39 40
if WITH_SASL
libvirt_driver_admin_la_CFLAGS += \
	$(SASL_CFLAGS) \
	$(NULL)
endif WITH_SASL

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
# admin/admin_remote.c is being included in libvirt-admin.c, so we
# need to include it in the dist
EXTRA_DIST += admin/admin_remote.c


admin/admin_client.h: $(srcdir)/rpc/gendispatch.pl \
		$(ADMIN_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=client \
	  admin ADMIN $(ADMIN_PROTOCOL) \
	  > $(srcdir)/admin/admin_client.h

admin/admin_server_dispatch_stubs.h: $(srcdir)/rpc/gendispatch.pl \
		$(ADMIN_PROTOCOL) Makefile.am
	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=server \
	  admin ADMIN $(ADMIN_PROTOCOL) \
	  > $(srcdir)/admin/admin_server_dispatch_stubs.h