rx-race-condition-cleanup-by-adding-busy-status-20010605
[openafs.git] / src / util / Makefile
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 SHELL = /bin/sh
9 COMPONENT=util
10 include ../config/Makefile.${SYS_NAME}
11
12 CFLAGS = ${OPTMZ} -I. -I$(SRCDIR)include ${XCFLAGS}
13 LDFLAGS = ${OPTMZ} ${XLDFLAGS}
14
15 objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
16          hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
17          dirpath.o fileutil.o netutils.o flipbase64.o \
18          afs_atomlist.o afs_lhash.o snprintf.o ${REGEX_OBJ}
19
20 headers = assert.h potpourri.h itc.h errors.h afsutil.h pthread_glock.h \
21           dirpath.h afs_atomlist.h afs_lhash.h
22
23 include ../config/Makefile.version
24
25 system noversion: install
26
27 all:    util.a sys
28
29 ${DESTDIR}bin/sys: sys
30         ${INSTALL} sys ${DESTDIR}bin/sys
31
32 install0: ${DESTDIR}include/afs/dirpath.h \
33         ${DESTDIR}include/afs/pthread_nosigs.h \
34         ${objects} util.a ${DESTDIR}bin/sys ${someheaders} doc 
35         ${INSTALL} util.a ${DESTDIR}lib/afs
36         ${INSTALL} util.a ${DESTDIR}lib/afs/libafsutil.a
37         ${INSTALL} assert.h errors.h vice.h remote.h ktime.h fileutil.h \
38                 netutils.h packages.h afsutil.h pthread_glock.h \
39                 afs_atomlist.h afs_lhash.h \
40                 ${DESTDIR}include/afs
41         ${INSTALL} itc.h potpourri.h ${DESTDIR}include
42
43 install: install0 kinstall ukinstall
44
45 install_headers:
46         ${INSTALL} assert.h errors.h vice.h remote.h ktime.h fileutil.h \
47                 netutils.h packages.h afsutil.h pthread_glock.h \
48                 afs_atomlist.h afs_lhash.h \
49                 ${DESTDIR}include/afs
50
51 kinstall:
52         ${INSTALL} vice.h ../libafs/afs
53         ${INSTALL} base64.c ../libafs/afs/afs_base64.c
54         ${INSTALL} uuid.c ../libafs/afs/afs_uuid.c
55         ${INSTALL} afs_atomlist.c ../libafs/afs
56         ${INSTALL} afs_atomlist.h ../libafs/afs
57         ${INSTALL} afs_lhash.c ../libafs/afs
58         ${INSTALL} afs_lhash.h ../libafs/afs
59
60 ukinstall webinstall: install0
61         ${INSTALL} pthread_glock.h vice.h errors.h afsutil.h dirpath.h fileutil.h netutils.h casestrcpy.c dirpath.c hostparse.c fileutil.c netutils.c ../libuafs/afs
62         ${INSTALL} uuid.c ../libuafs/afs/afs_uuid.c
63         ${INSTALL} afs_atomlist.c ../libuafs/afs
64         ${INSTALL} afs_atomlist.h ../libuafs/afs
65         ${INSTALL} afs_lhash.c ../libuafs/afs
66         ${INSTALL} afs_lhash.h ../libuafs/afs
67
68 ${DESTDIR}include/afs/dirpath.h: dirpath.h
69         ${INSTALL} dirpath.h  ${DESTDIR}include/afs
70
71 ${DESTDIR}include/afs/pthread_nosigs.h: pthread_nosigs.h
72         ${INSTALL} pthread_nosigs.h  ${DESTDIR}include/afs
73
74 doc:
75         echo no documents in this directory
76
77 util.a: ${objects} AFS_component_version_number.o
78         rm -f util.a
79         $(AR) r util.a ${objects} AFS_component_version_number.o
80         $(RANLIB) util.a
81
82 volparse.o: volparse.c
83         ${CC} ${CFLAGS} -c volparse.c
84
85 snprintf.o: snprintf.c
86         ${CC} ${CFLAGS} -c snprintf.c
87
88 base64.o: base64.c
89         ${CC} ${CFLAGS} -c base64.c
90
91 hostparse.o: hostparse.c afsutil.h
92         ${CC} ${CFLAGS} -c hostparse.c
93
94 ktime.o: ktime.c
95         ${CC} ${CFLAGS} -c ktime.c
96
97 kreltime.o: kreltime.c
98         ${CC} ${CFLAGS} -c kreltime.c
99
100 get_krbrlm.o: get_krbrlm.c
101         ${CC} ${CFLAGS} -c get_krbrlm.c
102
103 uuid.o: uuid.c
104         ${CC} ${CFLAGS} -c uuid.c
105
106 sys.o: sys.c ${SRCDIR}include/afs/param.h AFS_component_version_number.c
107         ${CC} ${CFLAGS} -c sys.c
108
109 sys: sys.o 
110         ${CC} ${LDFLAGS} -o sys sys.o
111
112 isathing.o: isathing.c
113         ${CC} ${CFLAGS} -c isathing.c
114
115 serverLog.o: serverLog.c
116         ${CC} ${CFLAGS} -c serverLog.c
117
118 dirpath.o: dirpath.c dirpath.h
119         ${CC} ${CFLAGS} -c dirpath.c
120
121 fileutil.o: fileutil.c fileutil.h
122         ${CC} ${CFLAGS} -c fileutil.c
123
124 netutils.o: netutils.c netutils.h
125         ${CC} ${CFLAGS} -c netutils.c
126
127 afs_atomlist.o: afs_atomlist.c afs_atomlist.h
128         ${CC} ${CFLAGS} -c afs_atomlist.c
129
130 afs_lhash.o: afs_lhash.c afs_lhash.h afs_atomlist.h
131         ${CC} ${CFLAGS} -c afs_lhash.c
132
133 clean:
134         rm -f ${objects} sys
135         rm -f util.a *.o core AFS_component_version_number.c
136
137 beancount:
138         wc -l *.c *.h
139
140 test:
141         cd test; $(MAKE)
142