# # supported (if not supported, don't show it).
# ######################################################################
-DESTDIR=@DESTDIR@
-SRCDIR=@SRCDIR@
-TOP_SRCDIR=@TOP_SRCDIR@
-SYS_NAME=@AFS_SYSNAME@
+srcdir=@srcdir@
+include @TOP_OBJDIR@/src/config/Makefile.config
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
-SHELL = /bin/sh
+CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
+all: ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
-include ../config/Makefile.${SYS_NAME}
-MKDIR_IF_NEEDED=[ -d $$1 ] || mkdir -p $$1
+${TOP_LIBDIR}/libaudit.a: libaudit.a
+ ${INSTALL_DATA} $? $@
-UKERNELDIR = ../libuafs/
-LOCALDIR = ${DESTDIR}root.server/usr/afs/local/
+${TOP_INCDIR}/afs/audit.h: audit.h
+ ${INSTALL_DATA} $? $@
-audobjs = audit.o
-
-CFLAGS = ${OPTMZ} -I${TOP_SRCDIR}/config -I$(SRCDIR)include ${XCFLAGS}
-
-include ../config/Makefile.version
-
-noversion system: install
-
-UKSRCS = audit.h
-
-all: libaudit.a
-
-headers: audit.h
- ${INSTALL} audit.h ${DESTDIR}include/afs
+libaudit.a: audit.o AFS_component_version_number.o
+ $(RM) -f libaudit.a
+ ar r libaudit.a audit.o AFS_component_version_number.o
+ $(RANLIB) libaudit.a
-install: ukinstall libaudit.a
- ${INSTALL} libaudit.a ${DESTDIR}lib/afs
- ${INSTALL} audit.h ${DESTDIR}include/afs
+audit.o: audit.c audit.h
+ ${CC} ${CFLAGS} -c ${srcdir}/audit.c
+
+# XXX-INST: where to install the AIX audit files?
+install: audit.h libaudit.a
+ ${INSTALL} -d ${DESTDIR}${libdir}/afs
+ ${INSTALL} -d ${DESTDIR}${includedir}/afs
+ ${INSTALL_DATA} libaudit.a ${DESTDIR}${libdir}/afs/libaudit.a
+ ${INSTALL_DATA} audit.h ${DESTDIR}${includedir}/afs/audit.h
+
+dest: libaudit.a audit.h
+ ${INSTALL} -d ${DEST}/lib/afs
+ ${INSTALL} -d ${DEST}/include/afs
+ ${INSTALL_DATA} libaudit.a ${DEST}/lib/afs/libaudit.a
+ ${INSTALL_DATA} audit.h ${DEST}/include/afs/audit.h
case ${SYS_NAME} in \
rs_aix*) \
- ${INSTALL} Audit ${LOCALDIR} ; \
- ${INSTALL} objects.aix.sample ${LOCALDIR}audit/objects.sample ; \
- ${INSTALL} events.aix.sample ${LOCALDIR}audit/events.sample ; \
- ${INSTALL} config.aix.sample ${LOCALDIR}audit/config.sample ;; \
+ ${INSTALL} -d ${DEST}/root.server/usr/afs/local ; \
+ ${INSTALL} -d ${DEST}/root.server/usr/afs/local/audit ; \
+ ${INSTALL_DATA} ${srcdir}/Audit ${DEST}/root.server/usr/afs/local/Audit ; \
+ ${INSTALL_DATA} ${srcdir}/objects.aix.sample ${DEST}/root.server/usr/afs/local/audit/objects.sample ; \
+ ${INSTALL_DATA} ${srcdir}/events.aix.sample ${DEST}/root.server/usr/afs/local/audit/events.sample ; \
+ ${INSTALL_DATA} ${srcdir}/config.aix.sample ${DEST}/root.server/usr/afs/local/audit/config.sample ;; \
*) ;; \
esac ;
-
-kinstall:
- @echo No $@ source here.
-
-ukinstall webinstall:
- set ${UKERNELDIR}afs; $(MKDIR_IF_NEEDED)
- ${INSTALL} ${UKSRCS} ${UKERNELDIR}afs
-
-doc:
- echo no documents in this directory
-
-libaudit.a: ${audobjs} AFS_component_version_number.o
- rm -f libaudit.a
- ar r libaudit.a ${audobjs} AFS_component_version_number.o
- $(RANLIB) libaudit.a
-
-audit.o: audit.c audit.h
- ${CC} ${CFLAGS} -c audit.c
-
clean:
- rm -f *.o core AFS_component_version_number.c *.a
-
-beancount:
- wc -l *.c *.h
+ $(RM) -f *.a *.o core AFS_component_version_number.c
+include ../config/Makefile.version