Remove sunrpc compatibility
[openafs.git] / src / rxgen / Makefile.in
index 884c8a0..8653974 100644 (file)
@@ -4,53 +4,47 @@
 # Makefile for rpc protocol compiler
 # Copyright (C) 1987, Sun Microsystems, Inc.
 #
-DESTDIR=@DESTDIR@
-SRCDIR=@SRCDIR@
-TOP_SRCDIR=@TOP_SRCDIR@
-SYS_NAME=@AFS_SYSNAME@
+srcdir=@srcdir@
+include @TOP_OBJDIR@/src/config/Makefile.config
+include @TOP_OBJDIR@/src/config/Makefile.lwp
 
-SHELL = /bin/sh
 
-include ../config/Makefile.${SYS_NAME}
-
-UKERNELDIR=../libuafs/
-MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
-
-SRCS= rpc_main.c rpc_hout.c rpc_cout.c rpc_parse.c rpc_scan.c rpc_util.c \
-       rpc_svcout.c rpc_clntout.c
+SRCS= rpc_main.c rpc_hout.c rpc_cout.c rpc_parse.c rpc_scan.c rpc_util.c
 HDRS= rpc_util.h rpc_parse.h rpc_scan.h
-OBJS= rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o rpc_scan.o rpc_util.o \
-       rpc_svcout.o rpc_clntout.o
-
-GOAL=rxgen
-CFLAGS = -I. -I${DESTDIR}/include -I${TOP_SRCDIR}/config ${XCFLAGS}
-
-all: install
-
-rxgen: $(OBJS) AFS_component_version_number.c
-       $(CC) $(CFLAGS) $(OBJS) $(XLIBS) -o $@
+OBJS= rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o rpc_scan.o rpc_util.o
 
-install: ukinstall \
-       ${DESTDIR}/bin/rxgen \
-       ${DESTDIR}/include/afs/rxgen_consts.h
+all: rxgen ${TOP_INCDIR}/afs/rxgen_consts.h
 
-ukinstall: \
-       ${UKERNELDIR}/afs \
-       ${UKERNELDIR}/afs/rxgen_consts.h
+buildtools: rxgen
 
-${UKERNELDIR}/afs:
-       mkdir -p ${UKERNELDIR}/afs
+${TOP_INCDIR}/afs/rxgen_consts.h: rxgen_consts.h
+       ${INSTALL_DATA} $? $@
 
-${UKERNELDIR}/afs/rxgen_consts.h: rxgen_consts.h
-       ${INSTALL} $? $@
+rxgen: $(OBJS) AFS_component_version_number.c $(HDRS)
+       $(AFS_LDRULE) $(OBJS) $(XLIBS)
 
-${DESTDIR}/bin/rxgen: rxgen
-       ${INSTALL} $? $@
+CFLAGS_rpc_main.o= -DPATH_CPP="\"$(PATH_CPP)\""
 
-${DESTDIR}/include/afs/rxgen_consts.h: rxgen_consts.h
-       ${INSTALL} $? $@
+#
+# Install targets
+#
+install: rxgen rxgen_consts.h
+       ${INSTALL} -d ${DESTDIR}${bindir}
+       ${INSTALL} -d ${DESTDIR}${includedir}/afs
+       ${INSTALL_PROGRAM} rxgen ${DESTDIR}${bindir}/rxgen
+       ${INSTALL_DATA} ${srcdir}/rxgen_consts.h \
+               ${DESTDIR}${includedir}/afs/rxgen_consts.h
+
+dest: rxgen rxgen_consts.h
+       ${INSTALL} -d ${DEST}/bin
+       ${INSTALL} -d ${DEST}/include/afs
+       ${INSTALL_PROGRAM} rxgen ${DEST}/bin/rxgen
+       ${INSTALL_DATA} ${srcdir}/rxgen_consts.h ${DEST}/include/afs/rxgen_consts.h
 
+#
+# Misc. targets
+#
 clean:
-       rm -f *.o rxgen core AFS_component_version_number.c
+       $(RM) -f *.o rxgen core AFS_component_version_number.c
 
 include ../config/Makefile.version