VXI := vxi11_clnt.o vxi11_xdr.o
OBJ := vxi11.o vxi11_write.o vxi11_close.o vxi11_read.o __vxi11_pkg_lock__.o
OCT := ../vxi11.oct
VXCLASS := vxi11_class.o 

RPCGEN     ?= @RPCGEN@
RPCGENOPTS ?= @RPCGENOPTS@

LFLAGS = $(LIBS)
CFLAGS += $(CPPFLAGS) @DEFS@

BUILD_VXI11 = @BUILD_VXI11@

RPC_GENERATED_FILES := vxi11.h vxi11_clnt.c vxi11_xdr.c

ifneq (X$(BUILD_VXI11),X1)
VXI =
VXCLASS = 
else

CFLAGS      += @RPCINCLUDE@
LFLAGS      += @RPCLIBS@
endif

OBJ += $(VXI) $(VXCLASS)

default: all

$(RPC_GENERATED_FILES): vxi11.x
	$(RPCGEN) $(RPCGENOPTS) vxi11.x

include ../common.mk

extraclean: distclean
	rm -f $(RPC_GENERATED_FILES)

ifeq (X$(BUILD_VXI11),X1)
prebuild: $(RPC_GENERATED_FILES)
else
prebuild:
endif

.PHONY: prebuild extraclean
