Unix: Rework build system
[openafs.git] / src / procmgmt / 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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.lwp
11
12 INSTALL = @INSTALL@
13 INSTALL_DATA = @INSTALL_DATA@
14 INSTALL_PROGRAM = @INSTALL_PROGRAM@
15 INSTALL_SCRIPT = @INSTALL_SCRIPT@
16
17 all: ${TOP_LIBDIR}/libprocmgmt.a ${TOP_INCDIR}/afs/procmgmt.h
18
19 buildtools: ${TOP_INCDIR}/afs/procmgmt.h
20
21 ${TOP_LIBDIR}/libprocmgmt.a: libprocmgmt.a
22         ${INSTALL_DATA} $? $@
23
24 ${TOP_INCDIR}/afs/procmgmt.h: ${srcdir}/procmgmt.h
25         ${INSTALL_DATA} $? $@
26
27 #
28 # Build targets
29 #
30 libprocmgmt.a: procmgmt_unix.o AFS_component_version_number.o
31         $(RM) -f $@
32         $(AR) crv $@ procmgmt_unix.o AFS_component_version_number.o
33         $(RANLIB) $@
34
35 procmgmt_unix.o: ${srcdir}/procmgmt_unix.c ${srcdir}/procmgmt.h
36
37 #
38 # Install targets
39 #
40 install: libprocmgmt.a
41         ${INSTALL} -d ${DESTDIR}${libdir}/afs
42         ${INSTALL} -d ${DESTDIR}${includedir}/afs
43         ${INSTALL_DATA} libprocmgmt.a ${DESTDIR}${libdir}/afs/libprocmgmt.a
44         ${INSTALL_DATA} ${srcdir}/procmgmt.h \
45                 ${DESTDIR}${includedir}/afs/procmgmt.h
46
47 dest: libprocmgmt.a
48         ${INSTALL} -d ${DEST}/lib/afs
49         ${INSTALL} -d ${DEST}/include/afs
50         ${INSTALL_DATA} libprocmgmt.a ${DEST}/lib/afs/libprocmgmt.a
51         ${INSTALL_DATA} ${srcdir}/procmgmt.h \
52                 ${DEST}/include/afs/procmgmt.h
53
54 #
55 # Misc targets
56 #
57 clean:
58         $(RM) -f *.a *.o core AFS_component_version_number.c
59
60 include ../config/Makefile.version