introduce-autoconf-for-openafs-20010628
[openafs.git] / src / sia / 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 # */
9
10
11 SHELL = /bin/sh
12 COMPONENT=sia
13 DEBUG = 
14 #UNRESOLVED = -expect_unresolved \*
15 UNRESOLVED =
16 include ../config/Makefile.${SYS_NAME}
17
18 LIBS1 = ${DESTDIR}/lib/libubik.a        ${DESTDIR}/lib/afs/libprot.a 
19 LIBS2 = ${DESTDIR}/lib/librxkad.a       ${DESTDIR}/lib/afs/libaudit.a \
20         ${DESTDIR}/lib/librx.a          ${DESTDIR}/lib/liblwp.a \
21         ${DESTDIR}/lib/libdes.a         ${DESTDIR}/lib/afs/libcmd.a \
22         ${DESTDIR}/lib/afs/libcom_err.a ${DESTDIR}/lib/afs/util.a \
23         ${DESTDIR}/lib/afs/libsys.a
24
25 LIBS  = ${DESTDIR}/lib/afs/libkauth.a ${LIBS1}     ${DESTDIR}/lib/afs/libauth.a ${LIBS2}
26 KLIBS = ${DESTDIR}/lib/afs/libkauth.krb.a ${LIBS1} ${DESTDIR}/lib/afs/libauth.krb.a ${LIBS2}
27
28 all: test-reauth ${DESTDIR}/lib/afs/libafssiad.so ${DESTDIR}/lib/afs/libafssiad.krb.so
29
30 clean:
31         rm -f test-reauth libafssiad.so libafssiad.krb.so *.s *.o *.b core *~ *.com *.ld AFS_component_version_number.c
32
33 CFLAGS = $(DEBUG) -I${SRCDIR}include ${XCFLAGS}
34
35 ${DESTDIR}/lib/afs/libafssiad.so: libafssiad.so
36         ${INSTALL} $? $@
37
38 ${DESTDIR}/lib/afs/libafssiad.krb.so: libafssiad.krb.so
39         ${INSTALL} $? $@
40
41 siad.o: siad.c
42         $(CC) $(CFLAGS) -c -g siad.c -o siad.o
43
44 siad_krb.o: siad.c
45         $(CC) $(CFLAGS) -DAFS_KERBEROS_ENV -c -g siad.c -o siad_krb.o
46
47 libafssiad.so: siad.o
48         $(LD) $(LDFLAGS) -g -shared -no_archive -o libafssiad.so \
49                  ${UNRESOLVED} siad.o ${LIBS} -none -lc
50
51 libafssiad.krb.so: siad_krb.o
52         $(LD) $(LDFLAGS) -g -shared -no_archive -o libafssiad.krb.so \
53                  ${UNRESOLVED} siad_krb.o ${KLIBS} ${LIBS} -none -lc
54
55 test-reauth: test-reauth.o
56         $(CC) $(CFLAGS) -g -o test-reauth test-reauth.o -lc
57
58 install: all
59
60
61