15
15
### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16
16
################################################################################
18
noinst_LIBRARIES = libGuestRpc.a
20
libGuestRpc_a_SOURCES =
21
libGuestRpc_a_SOURCES += ghiGetBinaryHandlers_xdr.c
22
libGuestRpc_a_SOURCES += ghiProtocolHandler_xdr.c
23
libGuestRpc_a_SOURCES += nicinfo_xdr.c
24
libGuestRpc_a_SOURCES += unityActive_xdr.c
26
nodist_libGuestRpc_a_SOURCES =
27
nodist_libGuestRpc_a_SOURCES += ghiGetBinaryHandlers.h
28
nodist_libGuestRpc_a_SOURCES += ghiGetBinaryHandlers_xdr.c
29
nodist_libGuestRpc_a_SOURCES += ghiProtocolHandler.h
30
nodist_libGuestRpc_a_SOURCES += ghiProtocolHandler_xdr.c
31
nodist_libGuestRpc_a_SOURCES += nicinfo.h
32
nodist_libGuestRpc_a_SOURCES += nicinfo_xdr.c
33
nodist_libGuestRpc_a_SOURCES += unityActive.h
34
nodist_libGuestRpc_a_SOURCES += unityActive_xdr.c
18
noinst_LTLIBRARIES = libGuestRpc.la
20
libGuestRpc_la_SOURCES =
21
libGuestRpc_la_SOURCES += ghiGetBinaryHandlers_xdr.c
22
libGuestRpc_la_SOURCES += ghiProtocolHandler_xdr.c
23
libGuestRpc_la_SOURCES += guestlibV3_xdr.c
24
libGuestRpc_la_SOURCES += nicinfo_xdr.c
25
libGuestRpc_la_SOURCES += unityActive_xdr.c
36
27
# XXX: Autoreconf complains about this and recommends using AM_CFLAGS instead.
37
# Neither that nor libGuestRpc_a_CFLAGS work, though. What gives?
28
# Problem is, $(CFLAGS) is appended to the compiler command line after AM_CFLAGS
29
# and after libGuestRpc_la_CFLAGS, so "-Wall -Werror" will override this flag.
38
30
CFLAGS += -Wno-unused
51
45
EXTRA_DIST += ghiGetBinaryHandlers.x
52
46
EXTRA_DIST += ghiProtocolHandler.x
47
EXTRA_DIST += guestlibV3.x
53
48
EXTRA_DIST += nicinfo.x
54
49
EXTRA_DIST += unityActive.x
56
51
## `make clean` should also remove the copied headers.
58
$(RM) -rf $(top_builddir)/lib/include/guestrpc
53
rm -rf $(top_builddir)/lib/include/guestrpc
54
if [ $(top_builddir) != $(top_srcdir) ]; then \
58
# Rules to invoke rpcgen. rpcgen will generate funny paths in the generated
59
# files if not invoked in the same directory as the source file, so we need
60
# to copy the sources to the build dir before compiling them.
60
62
ghiGetBinaryHandlers.h: ghiGetBinaryHandlers.x
61
$(RPCGEN) -h -o $@ ghiGetBinaryHandlers.x
63
if [ $(top_builddir) != $(top_srcdir) ]; then \
64
cp -f $(top_srcdir)/lib/guestRpc/ghiGetBinaryHandlers.x $(builddir); \
66
$(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiGetBinaryHandlers.x
62
67
$(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp
64
69
$(MKDIR_P) $(top_builddir)/lib/include/guestrpc
65
70
cp $@ $(top_builddir)/lib/include/guestrpc
67
72
ghiGetBinaryHandlers_xdr.c: ghiGetBinaryHandlers.x ghiGetBinaryHandlers.h
68
$(RPCGEN) -c -o $@ ghiGetBinaryHandlers.x
73
$(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiGetBinaryHandlers.x
70
75
ghiProtocolHandler.h: ghiProtocolHandler.x
71
$(RPCGEN) -h -o $@ ghiProtocolHandler.x
76
if [ $(top_builddir) != $(top_srcdir) ]; then \
77
cp -f $(top_srcdir)/lib/guestRpc/ghiProtocolHandler.x $(builddir); \
79
$(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/ghiProtocolHandler.x
72
80
$(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp
74
82
$(MKDIR_P) $(top_builddir)/lib/include/guestrpc
75
83
cp $@ $(top_builddir)/lib/include/guestrpc
77
85
ghiProtocolHandler_xdr.c: ghiProtocolHandler.x ghiProtocolHandler.h
78
$(RPCGEN) -c -o $@ ghiProtocolHandler.x
86
$(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/ghiProtocolHandler.x
80
88
nicinfo.h: nicinfo.x
81
$(RPCGEN) -h -o $@ nicinfo.x
89
if [ $(top_builddir) != $(top_srcdir) ]; then \
90
cp -f $(top_srcdir)/lib/guestRpc/nicinfo.x $(builddir); \
92
$(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/nicinfo.x
82
93
$(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp
84
95
$(MKDIR_P) $(top_builddir)/lib/include/guestrpc
85
96
cp $@ $(top_builddir)/lib/include/guestrpc
87
98
nicinfo_xdr.c: nicinfo.x nicinfo.h
88
$(RPCGEN) -c -o $@ nicinfo.x
99
$(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/nicinfo.x
101
guestlibV3.h: guestlibV3.x
102
if [ $(top_builddir) != $(top_srcdir) ]; then \
103
cp -f $(top_srcdir)/lib/guestRpc/guestlibV3.x $(builddir); \
105
$(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/guestlibV3.x
106
$(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp
108
$(MKDIR_P) $(top_builddir)/lib/include/guestrpc
109
cp $@ $(top_builddir)/lib/include/guestrpc
111
guestlibV3_xdr.c: guestlibV3.x guestlibV3.h
112
$(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/guestlibV3.x
90
114
unityActive.h: unityActive.x
91
$(RPCGEN) -h -o $@ unityActive.x
115
if [ $(top_builddir) != $(top_srcdir) ]; then \
116
cp -f $(top_srcdir)/lib/guestRpc/unityActive.x $(builddir); \
118
$(RPCGEN) $(RPCGENFLAGS) -h -o $@ $(builddir)/unityActive.x
92
119
$(SED) 's,rpc/rpc\.h,vmxrpc.h,' $@ > $@.tmp
94
121
$(MKDIR_P) $(top_builddir)/lib/include/guestrpc
95
122
cp $@ $(top_builddir)/lib/include/guestrpc
97
124
unityActive_xdr.c: unityActive.x unityActive.h
98
$(RPCGEN) -c -o $@ unityActive.x
125
$(RPCGEN) $(RPCGENFLAGS) -c -o $@ $(builddir)/unityActive.x