2eed8e1407a71fba482fc95ffc8116982cc5a885
[openafs.git] / src / audit / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 # # Auditing is currently only supported for AIX32 machines.  It is
9 # # integrated with the AIX auditing facility.  The objects, events, 
10 # # and config files are AIX specific.  The Audit file is not but is
11 # # included in the rs_aix32 case since other platforms are not
12 # # supported (if not supported, don't show it).
13 # ######################################################################
14
15 srcdir=@srcdir@
16 include @TOP_OBJDIR@/src/config/Makefile.config
17 INSTALL = @INSTALL@
18 INSTALL_DATA = @INSTALL_DATA@
19 INSTALL_PROGRAM = @INSTALL_PROGRAM@
20 INSTALL_SCRIPT = @INSTALL_SCRIPT@
21
22 CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
23
24 all: ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
25
26 ${TOP_LIBDIR}/libaudit.a: libaudit.a
27         ${INSTALL_DATA} $? $@
28
29 ${TOP_INCDIR}/afs/audit.h: audit.h
30         ${INSTALL_DATA} $? $@
31
32 libaudit.a: audit.o audit-file.o audit-sysvmq.o AFS_component_version_number.o
33         $(RM) -f libaudit.a
34         ar r libaudit.a audit.o audit-file.o audit-sysvmq.o AFS_component_version_number.o
35         $(RANLIB) libaudit.a
36
37 audit.o: audit.c audit.h audit-api.h
38         ${CC} ${CFLAGS} -c ${srcdir}/audit.c
39
40 audit-file.o: audit-file.c audit.h audit-api.h
41         ${CC} ${CFLAGS} -c ${srcdir}/audit-file.c
42
43 audit-sysvmq.o: audit-sysvmq.c audit.h audit-api.h
44         ${CC} ${CFLAGS} -c ${srcdir}/audit-sysvmq.c
45
46 # XXX-INST: where to install the AIX audit files?
47 install: audit.h libaudit.a
48         ${INSTALL} -d ${DESTDIR}${libdir}/afs
49         ${INSTALL} -d ${DESTDIR}${includedir}/afs
50         ${INSTALL_DATA} libaudit.a ${DESTDIR}${libdir}/afs/libaudit.a
51         ${INSTALL_DATA} audit.h ${DESTDIR}${includedir}/afs/audit.h
52
53 dest: libaudit.a audit.h
54         ${INSTALL} -d ${DEST}/lib/afs
55         ${INSTALL} -d ${DEST}/include/afs
56         ${INSTALL_DATA} libaudit.a ${DEST}/lib/afs/libaudit.a
57         ${INSTALL_DATA} audit.h ${DEST}/include/afs/audit.h
58         case ${SYS_NAME} in \
59         rs_aix*) \
60            ${INSTALL} -d ${DEST}/root.server/usr/afs/local ; \
61            ${INSTALL} -d ${DEST}/root.server/usr/afs/local/audit ; \
62            ${INSTALL_DATA} ${srcdir}/Audit              ${DEST}/root.server/usr/afs/local/Audit ;  \
63            ${INSTALL_DATA} ${srcdir}/objects.aix.sample ${DEST}/root.server/usr/afs/local/audit/objects.sample ;  \
64            ${INSTALL_DATA} ${srcdir}/events.aix.sample  ${DEST}/root.server/usr/afs/local/audit/events.sample  ;  \
65            ${INSTALL_DATA} ${srcdir}/config.aix.sample  ${DEST}/root.server/usr/afs/local/audit/config.sample  ;; \
66         *) ;; \
67         esac ;
68
69 clean:
70         $(RM) -f *.a *.o core AFS_component_version_number.c
71
72 include ../config/Makefile.version