Commit | Line | Data |
---|---|---|
805e021f CE |
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 | # Portions Copyright (c) 2003 Apple Computer, Inc. | |
9 | ||
10 | srcdir=@srcdir@ | |
11 | include @TOP_OBJDIR@/src/config/Makefile.config | |
12 | include @TOP_OBJDIR@/src/config/Makefile.libtool | |
13 | include @TOP_OBJDIR@/src/config/Makefile.pthread | |
14 | ||
15 | LT_current = 2 | |
16 | LT_revision = 0 | |
17 | LT_age = 0 | |
18 | ||
19 | LT_objs = glue.lo pioctl.lo setpag.lo kopenafs.lo \ | |
20 | AFS_component_version_number.lo | |
21 | ||
22 | MODULE_INCLUDE = -I. -I${srcdir} -I../sys | |
23 | ||
24 | SFLAGS = -I${TOP_INCDIR} | |
25 | SYS = ${srcdir}/../sys | |
26 | ||
27 | all: ${TOP_LIBDIR}/libkopenafs.${SHLIB_SUFFIX} ${TOP_LIBDIR}/libkopenafs.a \ | |
28 | ${TOP_INCDIR}/kopenafs.h | |
29 | ||
30 | ${TOP_LIBDIR}/libkopenafs.${SHLIB_SUFFIX}: libkopenafs.la | |
31 | ${LT_INSTALL_DATA} libkopenafs.la ${TOP_LIBDIR}/libkopenafs.la | |
32 | ${RM} ${TOP_LIBDIR}/libkopenafs.la | |
33 | ||
34 | ${TOP_LIBDIR}/libkopenafs.a: libkopenafs.a | |
35 | ${INSTALL_DATA} libkopenafs.a $@ | |
36 | ||
37 | ${TOP_INCDIR}/kopenafs.h: kopenafs.h | |
38 | ${INSTALL_DATA} $? $@ | |
39 | ||
40 | # Build rules for foreign sources. The implicit ones don't work when our | |
41 | # sources are in a different castle. | |
42 | glue.lo: $(SYS)/glue.c $(SYS)/afssyscalls.h | |
43 | $(LT_CCRULE) $(SYS)/glue.c | |
44 | ||
45 | pioctl.lo: $(SYS)/pioctl.c $(SYS)/afssyscalls.h | |
46 | $(LT_CCRULE) $(SYS)/pioctl.c | |
47 | ||
48 | setpag.lo: $(SYS)/setpag.c $(SYS)/afssyscalls.h | |
49 | $(LT_CCRULE) $(SYS)/setpag.c | |
50 | ||
51 | # This file is only actually used on SGI and AIX, but some systems can't cope | |
52 | # with an empty .o file being included in a link. | |
53 | ||
54 | syscall.lo: $(SYS)/syscall.s | |
55 | @set -e; set -x; case "$(SYS_NAME)" in \ | |
56 | sgi_*) \ | |
57 | ${CC} ${AFS_CFLAGS} -c ${SYS}/syscall.s; \ | |
58 | ;; \ | |
59 | rs_aix* | hp_ux10*) \ | |
60 | $(PATH_CPP) -P ${SFLAGS} ${SYS}/syscall.s > syscall.ss; \ | |
61 | as -o syscall.o syscall.ss; \ | |
62 | $(RM) syscall.ss; \ | |
63 | ;; \ | |
64 | *) \ | |
65 | touch syscall.c ; \ | |
66 | $(CC) $(AFS_CFLAGS) -c syscall.c -o syscall.o; \ | |
67 | ;; \ | |
68 | esac | |
69 | rm -f $@ | |
70 | echo "# Generated by libtool (GNU libtool) 0.0.0" > $@ | |
71 | echo "pic_object='syscall.o'" >> $@ | |
72 | echo "non_pic_object='syscall.o'" >> $@ | |
73 | ||
74 | libkopenafs.a: $(LT_objs) | |
75 | $(LT_LDLIB_static) $(LT_objs) | |
76 | ||
77 | libkopenafs.la: libkopenafs.la.sym $(LT_objs) | |
78 | $(LT_LDLIB_shlib) $(LT_objs) | |
79 | ||
80 | test-unlog: test-unlog.lo libkopenafs.la | |
81 | $(LT_LDRULE_static) test-unlog.lo libkopenafs.la $(XLIBS) | |
82 | ||
83 | test-setpag: test-setpag.lo libkopenafs.la | |
84 | $(LT_LDRULE_static) test-setpag.lo libkopenafs.la $(XLIBS) | |
85 | ||
86 | # | |
87 | # Installation targets | |
88 | # | |
89 | install: libkopenafs.la libkopenafs.a | |
90 | ${INSTALL} -d ${DESTDIR}${libdir} | |
91 | ${INSTALL} -d ${DESTDIR}${includedir} | |
92 | ${LT_INSTALL_DATA} libkopenafs.la ${DESTDIR}${libdir}/libkopenafs.la | |
93 | ${RM} ${DESTDIR}${libdir}/libkopenafs.la | |
94 | ${INSTALL_DATA} libkopenafs.a ${DESTDIR}${libdir}/libkopenafs.a | |
95 | ${INSTALL_DATA} ${srcdir}/kopenafs.h ${DESTDIR}${includedir}/kopenafs.h | |
96 | ||
97 | dest: libkopenafs.la libkopenafs.a | |
98 | ${INSTALL} -d ${DEST}/lib | |
99 | ${INSTALL} -d ${DEST}/include | |
100 | ${LT_INSTALL_DATA} libkopenafs.la ${DEST}/lib/libkopenafs.la | |
101 | ${RM} ${DEST}/lib/libkopenafs.la | |
102 | ${INSTALL_DATA} libkopenafs.a ${DEST}/lib/libkopenafs.a | |
103 | ${INSTALL_DATA} ${srcdir}/kopenafs.h ${DEST}/include/kopenafs.h | |
104 | ||
105 | # | |
106 | # Misc targets | |
107 | # | |
108 | clean: | |
109 | ${LT_CLEAN} | |
110 | $(RM) -f *.o *.a AFS_component_version_number.c \ | |
111 | test-setpag test-unlog | |
112 | ||
113 | include ../config/Makefile.version |