android_device_xiaomi_sdm66.../loc_api/libloc_api-rpc/gen-3200/Makefile.xdr
Ajay Dudani f77c85bb51 gps: Initial implementation of msm gps hal
Change-Id: Icf126a0bbb9dec414144b9b405694e41777920d5
2012-07-09 15:43:56 -07:00

29 lines
931 B
Text
Executable file

CLIENTS:= loc_api
SERVERS:= loc_api_cb
COMMON:= loc_api_common
RPC_INC:= inc-$(AMSS_VERSION)
all: $(CLIENTS) $(SERVERS) $(COMMON) fixup
$(CLIENTS) $(SERVERS) $(COMMON):: xdr = $(@:=.xdr)
$(CLIENTS) $(SERVERS) $(COMMON)::
rpcgen -h -M $(xdr) -o ../$(RPC_INC)/$(addsuffix .h, $@)
rpcgen -c -M $(xdr) -o $(addsuffix _xdr.c, $@)
$(CLIENTS)::
rpcgen -l -M $(xdr) -o $(addsuffix _clnt.c, $@)
$(SERVERS)::
rpcgen -m -M $(xdr) -o $(addsuffix _svc.c, $@)
fixup:
mv ../$(RPC_INC)/loc_api_common.h ../$(RPC_INC)/loc_api_common.h.bak
sed ../$(RPC_INC)/loc_api_common.h.bak -e "/#include <rpc/a#include \"loc_api_fixup.h\"" > ../$(RPC_INC)/loc_api_common.h
rm -f ../$(RPC_INC)/loc_api_common.h.bak
clean:
rm -f $(addsuffix _clnt.c, $(CLIENTS))
rm -f $(addsuffix _svc.c, $(SERVERS))
rm -f $(addsuffix _xdr.c, $(CLIENTS) $(SERVERS) $(COMMON))
rm -f $(addprefix ../$(RPC_INC)/, $(addsuffix .h, $(CLIENTS) $(SERVERS) $(COMMON)))