9598045947833edd3d002046b33ae00a219eaad2
[openafs.git] / src / vfsck / Makefile
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 COMPONENT=vfsck
20 include ../config/Makefile.${SYS_NAME}
21
22 CFLAGS= ${DBUG} -w -I${TOP_SRCDIR}/config -I${SRCDIR}include ${XCFLAGS}
23 LIBC=   /lib/libc.a
24 SRCS=   dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
25         pass5.c setup.c utilities.c ufs_subr.c ufs_tables.c dirutils.c\
26         vprintf.c proplist.c
27 LOCOBJS=dir.o inode.o main.o pass1.o pass1b.o pass2.o pass3.o pass4.o \
28         pass5.o setup.o utilities.o dirutils.o vprintf.o proplist.o
29 SYSOBJS=ufs_subr.o ufs_tables.o
30 OBJS=   ${LOCOBJS} ${SYSOBJS}
31 MAN =
32 #MAN=   fsck.0
33
34 include ../config/Makefile.version
35
36 all: vfsck
37
38 vfsck: main.o ${OBJS} 
39
40 ${OBJS}:        ${SRCS}
41         case ${SYS_NAME} in                                     \
42           hp_ux11? )                                            \
43             ${CC} -o vfsck -I/usr/old/usr/include ${DBUG} -w -I${SRCDIR}include ${SRCS} ${NON_SHARED} +DA1.0 -Wl,-a,archive -D_FILE64 \
44                         ;;                                      \
45           hp?00_ux101 | hp_ux10? )                              \
46             ${CC} -o vfsck ${CFLAGS} ${SRCS} ${NON_SHARED} ${XLIBS} -D_FILE64\
47                         ;;                                      \
48             * )                                                 \
49             ${CC} -o vfsck ${CFLAGS} ${SRCS} ${NON_SHARED} ${XLIBS}\
50                         ;;                                      \
51         esac
52
53 main.o: main.c AFS_component_version_number.c
54
55 #${LOCOBJS}:
56 #       ${CC} ${CFLAGS} -c $*.c
57
58 clean:
59         rm -f ${OBJS} vfsck core AFS_component_version_number.c
60
61 cleandir: clean
62         rm -f ${MAN} tags .depend
63
64 depend: ${SRCS}
65         mkdep ${CFLAGS} ${SRCS}
66
67 system: install
68
69 install: all ${MAN}
70         ${INSTALL} -s -c vfsck ${DESTDIR}/root.server/etc
71         ${INSTALL} -s -c vfsck ${DESTDIR}/root.server/usr/afs/bin
72         case ${SYS_NAME} in                             \
73                 hp_ux10? )                              \
74                         ${CP} bcheckrc ${DESTDIR}/root.server/etc; \
75                         ;;                              \
76                 hp_ux11? )                              \
77                         ${CP} bcheckrc-hp_ux110 ${DESTDIR}/root.server/etc/bcheckrc; \
78                         ;;                              \
79         esac
80         case ${SYS_NAME} in                             \
81                 hp_ux10? | hp_ux11? )                   \
82                          ${CP} mount ${DESTDIR}/root.server/etc ;\
83                          ${CP} umount ${DESTDIR}/root.server/etc; \
84                          chmod 755 ${DESTDIR}/root.server/etc/bcheckrc ${DESTDIR}/root.server/etc/mount ${DESTDIR}/root.server/etc/umount ;\
85                                 ;;                                      \
86         esac
87 lint: ${SRCS}
88         lint ${CFLAGS} ${SRCS}
89
90 tags: ${SRCS}
91         ctags ${SRCS}