Home | History | Annotate | Download | only in gen-3200
      1 CLIENTS:= loc_api
      2 SERVERS:= loc_api_cb
      3 COMMON:= loc_api_common
      4 RPC_INC:= inc-$(AMSS_VERSION)
      5 
      6 all: $(CLIENTS) $(SERVERS) $(COMMON) fixup
      7 
      8 $(CLIENTS) $(SERVERS) $(COMMON):: xdr = $(@:=.xdr) 
      9 
     10 $(CLIENTS) $(SERVERS) $(COMMON)::
     11 	rpcgen -h -M $(xdr) -o ../$(RPC_INC)/$(addsuffix .h, $@)
     12 	rpcgen -c -M $(xdr) -o $(addsuffix _xdr.c, $@)
     13 
     14 $(CLIENTS)::
     15 	rpcgen -l -M $(xdr) -o $(addsuffix _clnt.c, $@)
     16 
     17 $(SERVERS)::
     18 	rpcgen -m -M $(xdr) -o $(addsuffix _svc.c, $@)
     19 
     20 fixup:
     21 	mv ../$(RPC_INC)/loc_api_common.h ../$(RPC_INC)/loc_api_common.h.bak
     22 	sed ../$(RPC_INC)/loc_api_common.h.bak -e "/#include <rpc/a#include \"loc_api_fixup.h\"" > ../$(RPC_INC)/loc_api_common.h
     23 	rm -f ../$(RPC_INC)/loc_api_common.h.bak
     24 
     25 clean:
     26 	rm -f $(addsuffix _clnt.c, $(CLIENTS))
     27 	rm -f $(addsuffix _svc.c, $(SERVERS))
     28 	rm -f $(addsuffix _xdr.c, $(CLIENTS) $(SERVERS) $(COMMON))
     29 	rm -f $(addprefix ../$(RPC_INC)/, $(addsuffix .h, $(CLIENTS) $(SERVERS) $(COMMON)))
     30