cpp-fixes-20080630
[openafs.git] / src / rxgen / Makefile.in
index cb48bf1..9240f2f 100644 (file)
@@ -4,17 +4,12 @@
 # Makefile for rpc protocol compiler
 # Copyright (C) 1987, Sun Microsystems, Inc.
 #
-DESTDIR=@DESTDIR@
-SRCDIR=@SRCDIR@
-TOP_SRCDIR=@TOP_SRCDIR@
-SYS_NAME=@AFS_SYSNAME@
-
-SHELL = /bin/sh
-
-include ../config/Makefile.${SYS_NAME}
-
-UKERNELDIR=../libuafs/
-MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
+srcdir=@srcdir@
+include @TOP_OBJDIR@/src/config/Makefile.config
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 
 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
@@ -22,84 +17,37 @@ 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 = ${DBUG} -I. -I${DESTDIR}include -I${TOP_SRCDIR}/config ${XCFLAGS}
-
-USNS=cellname
-SD=../../../src/CML
-VN=AFS_component_version_number
-ID=``
-
-include ../config/Makefile.version
-
-$(VN).o: $(VN).c
-
-.c.o:
-       $(SPEW) $(CC) $(CFLAGS) -c $<
-
-$(GOAL): $(OBJS) AFS_component_version_number.c
-       $(SPEW) $(CC) $(CFLAGS) $(OBJS) $(XLIBS) -o $@
-
-all:   $(GOAL)
+all: rxgen ${TOP_INCDIR}/afs/rxgen_consts.h
 
-system: install0
+${TOP_INCDIR}/afs/rxgen_consts.h: rxgen_consts.h
+       ${INSTALL_DATA} $? $@
 
-kinstall: install0
+rxgen: $(OBJS) AFS_component_version_number.c $(HDRS)
+       $(CC) $(CFLAGS) $(OBJS) $(XLIBS) -o $@
 
-ukinstall webinstall: install0
-       set ${UKERNELDIR}afs; $(MKDIR_IF_NEEDED)
-       $(INSTALL) rxgen_consts.h $(UKERNELDIR)afs
+rpc_main.o: rpc_main.c
+       $(CCOBJ) $(CFLAGS) -c $< -DPATH_CPP="\"$(PATH_CPP)\""
 
-$(DESTDIR)/bin/$(GOAL): $(GOAL)
-       @echo "Installing the Rx Protocol Compiler (rxgen)"
-       $(INSTALL) rxgen $(DESTDIR)bin
-
-install0: $(DESTDIR)/bin/$(GOAL)
-       $(INSTALL) rxgen_consts.h $(DESTDIR)include/afs
-
-install: install0 ukinstall
-
-lint: $(SRCS) $(HDRS)
-       lint $(SRCS)
+#
+# Install targets
+#
+install: rxgen rxgen_consts.h
+       ${INSTALL} -d ${DESTDIR}${bindir}
+       ${INSTALL} -d ${DESTDIR}${includedir}/afs
+       ${INSTALL_PROGRAM} rxgen ${DESTDIR}${bindir}/rxgen
+       ${INSTALL_DATA} 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} rxgen_consts.h ${DEST}/include/afs/rxgen_consts.h
 
+#
+# Misc. targets
+#
 clean:
-       rm -f $(GOAL) $(OBJS) core AFS_component_version_number.c
+       $(RM) -f *.o rxgen core AFS_component_version_number.c
 
-depend: $(SRCS) $(HDRS)
-       @${CC} ${CFLAGS} -M ${SRCS} > makedep
-       @echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
-       @echo '$$r makedep' >>eddep
-       @echo 'w' >>eddep
-       @cp Makefile makefile.bak
-       @ed - Makefile < eddep
-       @rm eddep makedep makefile.bak
-
-rpc_main.o: AFS_component_version_number.c
-# DO NOT DELETE THIS LINE
-rpc_main.o: rpc_main.c 
-rpc_main.o: ./rpc_util.h
-rpc_main.o: ./rpc_parse.h
-rpc_main.o: ./rpc_scan.h
-rpc_hout.o: rpc_hout.c
-rpc_hout.o: ./rpc_util.h
-rpc_hout.o: ./rpc_parse.h
-rpc_cout.o: rpc_cout.c
-rpc_cout.o: ./rpc_util.h
-rpc_cout.o: ./rpc_parse.h
-rpc_parse.o: rpc_parse.c
-rpc_parse.o: ./rpc_util.h
-rpc_parse.o: ./rpc_scan.h
-rpc_parse.o: ./rpc_parse.h
-rpc_scan.o: rpc_scan.c
-rpc_scan.o: ./rpc_scan.h
-rpc_scan.o: ./rpc_util.h
-rpc_util.o: rpc_util.c
-rpc_util.o: ./rpc_scan.h
-rpc_util.o: ./rpc_parse.h
-rpc_util.o: ./rpc_util.h
-rpc_svcout.o: rpc_svcout.c
-rpc_svcout.o: ./rpc_parse.h
-rpc_svcout.o: ./rpc_util.h
-rpc_clntout.o: rpc_clntout.c
-rpc_clntout.o: ./rpc_parse.h
-rpc_clntout.o: ./rpc_util.h
+include ../config/Makefile.version