make-install-support-for-transarc-and-prefix-style-universes-20010907
[openafs.git] / src / vfsck / Makefile.in
1 #
2 # Copyright (c) 1987 The Regents of the University of California.
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms are permitted
6 # provided that the above copyright notice and this paragraph are
7 # duplicated in all such forms and that any documentation,
8 # advertising materials, and other materials related to such
9 # distribution and use acknowledge that the software was developed
10 # by the University of California, Berkeley.  The name of the
11 # University may not be used to endorse or promote products derived
12 # from this software without specific prior written permission.
13 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 #
17 #       @(#)Makefile    5.12 (Berkeley) 6/26/89
18 #
19 DEST=@DEST@
20 TOP_INCDIR=@TOP_INCDIR@
21 TOP_LIBDIR=@TOP_LIBDIR@
22 prefix=@prefix@
23 exec_prefix=@exec_prefix@
24 bindir=@bindir@
25 sbindir=@sbindir@
26 libexecdir=@libexecdir@
27 libdir=@libdir@
28 includedir=@includedir@
29 mandir=@mandir@
30 afssrvbindir=@afssrvbindir@
31 afssrvsbindir=@afssrvsbindir@
32 afssrvlibexecdir=@afssrvlibexecdir@
33 COMPILE_ET=${TOP_SRCDIR}/comerr/compile_et
34 RXGEN=${TOP_SRCDIR}/rxgen/rxgen
35 TOP_SRCDIR=@TOP_SRCDIR@
36 SYS_NAME=@AFS_SYSNAME@
37
38
39 include ../config/Makefile.${SYS_NAME}
40
41 CFLAGS=${DBUG} -w -I${TOP_SRCDIR}/config -I${TOP_INCDIR} ${XCFLAGS}
42 LIBC=   /lib/libc.a
43 SRCS=   dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
44         pass5.c setup.c utilities.c ufs_subr.c ufs_tables.c dirutils.c\
45         vprintf.c proplist.c
46 LOCOBJS=dir.o inode.o main.o pass1.o pass1b.o pass2.o pass3.o pass4.o \
47         pass5.o setup.o utilities.o dirutils.o vprintf.o proplist.o
48 SYSOBJS=ufs_subr.o ufs_tables.o
49 OBJS=   ${LOCOBJS} ${SYSOBJS}
50 MAN =
51 #MAN=   fsck.0
52
53 include ../config/Makefile.version
54
55 all: vfsck
56
57 vfsck: main.o ${OBJS} 
58
59 ${OBJS}:        ${SRCS}
60         case ${SYS_NAME} in                                     \
61           hp_ux11? )                                            \
62             ${CC} -o vfsck -I/usr/old/usr/include ${DBUG} -w -I${TOP_INCDIR} ${SRCS} ${NON_SHARED} +DA1.0 -Wl,-a,archive -D_FILE64 \
63                         ;;                                      \
64           hp?00_ux101 | hp_ux10? )                              \
65             ${CC} -o vfsck ${CFLAGS} ${SRCS} ${NON_SHARED} ${XLIBS} -D_FILE64\
66                         ;;                                      \
67             * )                                                 \
68             ${CC} -o vfsck ${CFLAGS} ${SRCS} ${NON_SHARED} ${XLIBS}\
69                         ;;                                      \
70         esac
71
72 main.o: main.c AFS_component_version_number.c
73
74 #${LOCOBJS}:
75 #       ${CC} ${CFLAGS} -c $*.c
76
77 clean:
78         $(RM) -f ${OBJS} vfsck core AFS_component_version_number.c
79
80 cleandir: clean
81         $(RM) -f ${MAN} tags .depend
82
83 depend: ${SRCS}
84         mkdep ${CFLAGS} ${SRCS}
85
86 system: install
87
88 install: ${DESTDIR}${afssrvlibexecdir}/vfsck
89
90 ${DEST}/root.server/etc/vfsck: vfsck
91         ${INSTALL} $? $@
92
93 ${DEST}/root.server/usr/afs/bin/vfsck: vfsck
94         ${INSTALL} $? $@
95
96 ${DESTDIR}${afssrvlibexecdir}/vfsck: vfsck
97         ${INSTALL} $? $@
98
99
100 dest: ${DEST}/root.server/etc/vfsck ${DEST}/root.server/usr/afs/bin/vfsck
101         case ${SYS_NAME} in                             \
102                 hp_ux10? )                              \
103                         ${CP} bcheckrc ${DEST}/root.server/etc; \
104                         ;;                              \
105                 hp_ux11? )                              \
106                         ${CP} bcheckrc-hp_ux110 ${DEST}/root.server/etc/bcheckrc; \
107                         ;;                              \
108         esac
109         case ${SYS_NAME} in                             \
110                 hp_ux10? | hp_ux11? )                   \
111                          ${CP} mount ${DEST}/root.server/etc ;\
112                          ${CP} umount ${DEST}/root.server/etc; \
113                          chmod 755 ${DEST}/root.server/etc/bcheckrc ${DEST}/root.server/etc/mount ${DEST}/root.server/etc/umount ;\
114                                 ;;                                      \
115         esac