5 # This script is to generate lib lustre library as a whole. It will leave
6 # two files on current directory: liblustre.a and liblustre.so.
7 # Integrate them into Makefile.am later
12 RANLIB=/usr/bin/ranlib
18 #if [ ! -f $SYSIO/lib/libsysio.a ]; then
19 # echo "ERROR: $SYSIO/lib/libsysio.a dosen't exist"
30 for _lib in $_objs; do
31 ALL_OBJS=$ALL_OBJS"$1/$_lib ";
36 # special treatment for libsysio
38 #sysio_tmp=$CWD/sysio_tmp_`date +%s`
39 #build_sysio_obj_list() {
43 # mv $_objs $sysio_tmp
44 # for _lib in $_objs; do
45 # ALL_OBJS=$ALL_OBJS"$sysio_tmp/$_lib ";
49 # lustre components libs
50 build_obj_list . libllite.a
51 build_obj_list ../lov liblov.a
52 build_obj_list ../obdecho libobdecho.a
53 build_obj_list ../osc libosc.a
54 build_obj_list ../mdc libmdc.a
55 build_obj_list ../ptlrpc libptlrpc.a
56 build_obj_list ../obdclass liblustreclass.a
57 build_obj_list ../lvfs liblvfs.a
59 # portals components libs
60 build_obj_list ../portals/utils libuptlctl.a
61 build_obj_list ../portals/unals libtcpnal.a
62 build_obj_list ../portals/portals libportals.a
64 # create static lib lsupport
65 rm -f $CWD/liblsupport.a
66 $AR -cru $CWD/liblsupport.a $ALL_OBJS
67 $RANLIB $CWD/liblsupport.a
69 # libsysio components libs
70 build_obj_list $SYSIO/drivers/native libsysio_native.a
71 build_obj_list $SYSIO/drivers/sockets libsysio_sockets.a
72 build_obj_list $SYSIO/src libsysio.a
73 build_obj_list $SYSIO/dev/stdfd libsysio_stdfd.a
75 #build_sysio_obj_list $SYSIO/lib/libsysio.a
78 # create static lib lustre
79 rm -f $CWD/liblustre.a
80 $AR -cru $CWD/liblustre.a $ALL_OBJS
81 $RANLIB $CWD/liblustre.a
83 # create shared lib lustre
84 rm -f $CWD/liblustre.so
85 $LD -shared -o $CWD/liblustre.so -init __liblustre_setup_ -fini __liblustre_cleanup_ \
86 $ALL_OBJS -lcap -lpthread