[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

automake and rpcgen

From: Paul J
Subject: automake and rpcgen
Date: Sun, 10 Nov 2002 15:04:16 +0000 (GMT)

Hash: SHA1

Dear All,

Please forgive my posting about this topic. I have read the archive but
the answer posted:

does not solve my problem. Add to that the fact I am a beginner with

I wish to produce a library from two xdr files, datarpc.x and
visualrpc.x. Originally, the following GNU make commands produced the
correct output files which, by means of a hand crafted makefile (using
g++ as the compiler), compiled the rpcgen produced files into .o's:


all: datarpc.h datarpcxdr.h visualrpcxdr.h visualrpc.h print datarpcserver.o 
datarpcclient.o visualrpcclient.o visualrpcserver.o include

# Visualiser RPC
visualrpcclient.c: visualrpc.x
        rm -f visualrpcclient.c
        rpcgen -l -C -o visualrpcclient.c visualrpc.x

visualrpcclient.o: visualrpcclient.c
        g++ -c visualrpcclient.c

visualrpcserver.c: visualrpc.x
        rm -f visualrpcserver.c
        rpcgen -m -C -o visualrpcserver.c visualrpc.x

visualrpcserver.o: visualrpcserver.c
        g++ -c visualrpcserver.c

visualrpcxdr.h: visualrpc.x
        rm -f visualrpcxdr.h
        rpcgen -c -C -o visualrpcxdr.h visualrpc.x

visualrpc.h: visualrpc.x
        rm -f visualrpc.h
        rpcgen -h -C -o visualrpc.h visualrpc.x

# Data RPC
datarpcxdr.h: datarpc.x
        rm -f datarpcxdr.h
        rpcgen -c -C -o datarpcxdr.h datarpc.x

datarpc.h: datarpc.x
        rm -f datarpc.h
        rpcgen -h -C -o datarpc.h datarpc.x

datarpcserver.c: datarpc.x
        rm -f datarpcserver.c
        rpcgen -m -C -o datarpcserver.c datarpc.x

datarpcserver.o: datarpcserver.c
        g++ -c datarpcserver.c

datarpcclient.c: datarpc.x
        rm -f datarpcclient.c
        rpcgen -l -C -o datarpcclient.c datarpc.x

datarpcclient.o: datarpcclient.c
        g++ -c datarpcclient.c

        rm -f *.o
        rm -f datarpcclient.c
        rm -f datarpcserver.c
        rm -f visualrpcclient.c
        rm -f visualrpcserver.c
        rm -f visualrpcxdr.h
        rm -f visualrpc.h
        rm -f datarpc.h
        rm -f datarpcxdr.h

cleaner: clean

.PHONY: clean cleaner include all print


Sick, isn't it? In converting this project to use autotools, I concluded
to create a library from the .o files. Hence, I started (initially the
lib will not be installed for testing purposes):



noinst_LIBRARIES = libInterFASECommon.a

libInterFASECommon_a_SOURCES = \
        datarpc.x \


Then my brain melted whilst trying to work out what rules I should include to
tell automake how to deal with .x files. The .c(xx) files produced by rpcgen
should be compiled with g++ (or equivalent) for use within the rest of the C++
project code.

Can anybody offer me some advice please?

Many thanks,

- --
Department of Computing, Imperial College London
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


reply via email to

[Prev in Thread] Current Thread [Next in Thread]