add missing dependency in Makefile
[hcoop/debian/libnss-afs.git] / Makefile
1
2 SYS=$(shell uname)
3 CC=gcc
4 LIBNAMES=libnss_afs.so.2
5 EXTRALIBS=-lresolv
6 AFSROOT=/usr
7
8 # LIMIT_USERNAME_CHARS=n will cut down usernames to
9 # a maximum of n characters
10 CFLAGS=-I$(AFSROOT)/include -DHAVE_NSS_H -DLIMIT_USERNAME_CHARS=20
11
12 all: $(LIBNAMES) nss_afs_test
13
14 LDFLAGS=-L$(AFSROOT)/lib/afs -L$(AFSROOT)/lib -lprot \
15 -lubik -lauth -lrxkad -lrxstat -lrx -llwp -ldes -lcom_err -laudit \
16 $(AFSROOT)/lib/afs/util.a -lsys -lnsl $(EXTRALIBS)
17
18 nss_afs.o: nss_afs.c
19 $(CC) $(CFLAGS) -c nss_afs.c
20
21 libnss_afs.so.2: nss_afs.o
22 $(CC) -shared -o libnss_afs.so.2 nss_afs.o \
23 -Wl,-soname,libnss_afs.so.2 $(LDFLAGS)
24
25 nss_afs_test: nss_afs.o nss_afs_test.c
26 $(CC) -o nss_afs_test nss_afs_test.c nss_afs.o $(LDFLAGS)
27
28 install:
29 mkdir -p $(DESTDIR)/lib/
30 install -m 644 libnss_afs.so.2 $(DESTDIR)/lib/
31 install -m 755 nss_afs_test $(DESTDIR)/usr/bin/nss_afs_test
32
33 clean:
34 rm -f *.so.2 *.o $(LIBNAME) nss_afs_test