Build rxgk support into libafsrpc
[openafs.git] / src / libafsrpc / Makefile.in
1 # Copyright (c) 2012 Your File System Inc.
2 # All rights reserved.
3 #
4 # This file is released under the terms of the two clause BSD
5 # License. For details, see the LICENSE file at the top level of
6 # this distribution.
7
8 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10 include @TOP_OBJDIR@/src/config/Makefile.libtool
11
12 # Increment these according to libtool's versioning rules (look them up!)
13 # The library output looks like libafsrpc.so.<current - age>.<revision>
14 LT_current = 2
15 LT_revision = 0
16 LT_age = 0
17
18 LT_objs = \
19         $(top_builddir)/src/fsint/libfsint_pic.la \
20         $(top_builddir)/src/rx/librx_pic.la \
21         $(top_builddir)/src/rxkad/librxkad_pic.la \
22         $(top_builddir)/src/crypto/rfc3961/librfc3961_pic.la \
23         $(top_builddir)/src/comerr/libcomerr_pic.la \
24         $(top_builddir)/src/util/libafsrpc_util.la \
25         $(top_builddir)/src/rxstat/librxstat_pic.la \
26         $(top_builddir)/src/sys/libafsrpc_sys.la \
27         $(top_builddir)/src/lwp/liblwpcompat_pic.la \
28         $(top_builddir)/src/opr/libopr_pic.la \
29         @RXGK_LIBS_RPC@
30
31 LT_libs = $(LIB_hcrypto) $(LIB_roken) $(MT_LIBS) $(RXGK_GSSAPI_LIBS)
32
33 all: libafsrpc.la libafsrpc.a libafsrpc_pic.la \
34         $(TOP_LIBDIR)/libafsrpc.a \
35         $(TOP_LIBDIR)/libafsrpc_pic.a
36
37 # On AIX, we need to pull in the syscall import list from afsl.exp. Sadly
38 # there doesn't seem to be any way to get libtool to remember this requirement
39 # when it links the libafsrpc_sys.la convenience library.
40
41 libafsrpc.la: libafsrpc.la.sym $(LT_objs) $(LT_deps) libafsrpc_pic.la
42         @set -e; set -x; case "$(SYS_NAME)" in \
43         rs_aix*) \
44             $(LT_LDLIB_shlib) -Wl,-bI:../sys/afsl.exp \
45                 $(LT_objs) $(LT_deps) $(LT_libs) ;; \
46         *) \
47             $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs);; \
48         esac
49
50 libafsrpc_pic.la: $(LT_objs)
51         $(LT_LDLIB_pic) $(LT_objs)
52
53 # AIX needs libafsrpc to also be linked against the syscall import list
54 # On most platforms, libtool will make shared and static libraries at the
55 # same time, but not on AIX, so we need separate rules.
56 libafsrpc.a: $(LT_objs) libafsrpc.la
57         $(LT_LDLIB_static) $(LT_objs)
58         @set -e; set -x; case "${SYS_NAME}" in \
59             rs_aix*) \
60                 $(AR) crv $@ ../sys/afsl.exp;; \
61         esac
62
63 ${TOP_LIBDIR}/libafsrpc.a: libafsrpc.a
64         ${INSTALL_DATA} $? $@
65
66 ${TOP_LIBDIR}/libafsrpc_pic.a: libafsrpc_pic.la
67         ${INSTALL_DATA} .libs/libafsrpc_pic.a $@
68
69 install: libafsrpc.la libafsrpc.a libafsrpc_pic.la
70         ${INSTALL} -d ${DESTDIR}${libdir}
71         $(LT_INSTALL_DATA) libafsrpc.la $(DESTDIR)$(libdir)/libafsrpc.la
72         $(RM) $(DESTDIR)$(libdir)/libafsrpc.la
73         $(INSTALL_DATA) libafsrpc.a $(DESTDIR)$(libdir)/libafsrpc.a
74         $(INSTALL_DATA) .libs/libafsrpc_pic.a $(DESTDIR)$(libdir)/libafsrpc_pic.a
75
76 dest: libafsrpc.la libafsrpc.a
77         ${INSTALL} -d ${DEST}/lib
78         ${LT_INSTALL_DATA} libafsrpc.la ${DEST}/lib/libafsrpc.la
79         ${RM} ${DEST}/lib/libafsrpc.la
80         ${INSTALL_DATA} libafsrpc.a ${DEST}/lib/libafsrpc.a
81         ${INSTALL_DATA} .libs/libafsrpc_pic.a ${DEST}/lib/libafsrpc_pic.a
82
83 clean:
84         $(LT_CLEAN)
85         $(RM) -f *.o libafsrpc.a