997ee301af1001c069fcf532a9402de8861dd117
[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 @SHARED_ONLY@SHARED_LIBS = libafsrpc.la
34
35 all: $(SHARED_LIBS) libafsrpc.a libafsrpc_pic.la \
36         $(TOP_LIBDIR)/libafsrpc.a \
37         $(TOP_LIBDIR)/libafsrpc_pic.a
38
39 # On AIX, we need to pull in the syscall import list from afsl.exp. Sadly
40 # there doesn't seem to be any way to get libtool to remember this requirement
41 # when it links the libafsrpc_sys.la convenience library.
42
43 libafsrpc.la: libafsrpc.la.sym $(LT_objs) $(LT_deps) libafsrpc_pic.la
44         @set -e; set -x; case "$(SYS_NAME)" in \
45         rs_aix*) \
46             $(LT_LDLIB_shlib_only) -Wl,-bI:../sys/afsl.exp \
47                 $(LT_objs) $(LT_deps) $(LT_libs) ;; \
48         *) \
49             $(LT_LDLIB_shlib_only) $(LT_objs) $(LT_deps) $(LT_libs);; \
50         esac
51
52 libafsrpc_pic.la: $(LT_objs)
53         $(LT_LDLIB_pic) $(LT_objs)
54
55 # AIX needs libafsrpc to also be linked against the syscall import list
56 # On most platforms, libtool will make shared and static libraries at the
57 # same time, but not on AIX, so we need separate rules.
58 libafsrpc.a: $(LT_objs)
59         $(LT_LDLIB_static) $(LT_objs)
60         @set -e; set -x; case "${SYS_NAME}" in \
61             rs_aix*) \
62                 $(AR) crv $@ ../sys/afsl.exp;; \
63         esac
64
65 ${TOP_LIBDIR}/libafsrpc.a: libafsrpc.a
66         ${INSTALL_DATA} $? $@
67
68 ${TOP_LIBDIR}/libafsrpc_pic.a: libafsrpc_pic.la
69         ${INSTALL_DATA} .libs/libafsrpc_pic.a $@
70
71 install: $(SHARED_LIBS) libafsrpc.a libafsrpc_pic.la
72         ${INSTALL} -d ${DESTDIR}${libdir}
73         @SHARED_ONLY@$(LT_INSTALL_DATA) libafsrpc.la $(DESTDIR)$(libdir)/libafsrpc.la
74         @SHARED_ONLY@$(RM) $(DESTDIR)$(libdir)/libafsrpc.la
75         $(INSTALL_DATA) libafsrpc.a $(DESTDIR)$(libdir)/libafsrpc.a
76         $(INSTALL_DATA) .libs/libafsrpc_pic.a $(DESTDIR)$(libdir)/libafsrpc_pic.a
77
78 dest: $(SHARED_LIBS) libafsrpc.a
79         ${INSTALL} -d ${DEST}/lib
80         @SHARED_ONLY@${LT_INSTALL_DATA} libafsrpc.la ${DEST}/lib/libafsrpc.la
81         @SHARED_ONLY@${RM} ${DEST}/lib/libafsrpc.la
82         ${INSTALL_DATA} libafsrpc.a ${DEST}/lib/libafsrpc.a
83         ${INSTALL_DATA} .libs/libafsrpc_pic.a ${DEST}/lib/libafsrpc_pic.a
84
85 clean:
86         $(LT_CLEAN)
87         $(RM) -f *.o libafsrpc.a