v1.05: fail-fast if network is likely to be down
[hcoop/debian/libnss-afs.git] / Makefile
CommitLineData
03b6b479 1
2SYS=$(shell uname)
3CC=gcc
4LIBNAMES=libnss_afs.so.2
5EXTRALIBS=-lresolv
6AFSROOT=/usr
7
8# LIMIT_USERNAME_CHARS=n will cut down usernames to
9# a maximum of n characters
10CFLAGS=-I$(AFSROOT)/include -DHAVE_NSS_H -DLIMIT_USERNAME_CHARS=20
11
12all: $(LIBNAMES) nss_afs_test
13
14LDFLAGS=-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
18nss_afs.o: nss_afs.c
19 $(CC) $(CFLAGS) -c nss_afs.c
20
21libnss_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
25nss_afs_test: nss_afs.o
26 $(CC) -o nss_afs_test nss_afs_test.c nss_afs.o $(LDFLAGS)
27
28install:
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
33clean:
34 rm -f *.so.2 *.o $(LIBNAME) nss_afs_test