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