| 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 | srcdir=@srcdir@ |
| 9 | include @TOP_OBJDIR@/src/config/Makefile.config |
| 10 | include @TOP_OBJDIR@/src/config/Makefile.lwp |
| 11 | include @TOP_OBJDIR@/src/config/Makefile.lwptool |
| 12 | |
| 13 | HELPER_SPLINT=@HELPER_SPLINT@ |
| 14 | |
| 15 | LT_rpc_objs = base64.lo |
| 16 | |
| 17 | LT_objs =$(LT_rpc_objs) \ |
| 18 | ktime.lo volparse.lo hostparse.lo exec.lo \ |
| 19 | hputil.lo kreltime.lo uuid.lo serverLog.lo \ |
| 20 | dirpath.lo fileutil.lo flipbase64.lo fstab.lo \ |
| 21 | afs_atomlist.lo afs_lhash.lo pthread_glock.lo tabular_output.lo \ |
| 22 | pthread_threadname.lo ${REGEX_OBJ} |
| 23 | |
| 24 | LT_deps = $(top_builddir)/src/opr/liboafs_opr.la |
| 25 | LT_libs = $(LIB_roken) $(MT_LIBS) |
| 26 | |
| 27 | includes = \ |
| 28 | ${TOP_INCDIR}/afs/dirpath.h \ |
| 29 | ${TOP_INCDIR}/afs/pthread_nosigs.h \ |
| 30 | ${TOP_INCDIR}/afs/errors.h \ |
| 31 | ${TOP_INCDIR}/afs/vice.h \ |
| 32 | ${TOP_INCDIR}/afs/ktime.h \ |
| 33 | ${TOP_INCDIR}/afs/fileutil.h \ |
| 34 | ${TOP_INCDIR}/afs/afsutil.h \ |
| 35 | ${TOP_INCDIR}/afs/afsutil_prototypes.h \ |
| 36 | ${TOP_INCDIR}/afs/pthread_glock.h \ |
| 37 | ${TOP_INCDIR}/afs/afs_atomlist.h \ |
| 38 | ${TOP_INCDIR}/afs/afs_lhash.h \ |
| 39 | ${TOP_INCDIR}/afs/work_queue.h \ |
| 40 | ${TOP_INCDIR}/afs/work_queue_types.h \ |
| 41 | ${TOP_INCDIR}/afs/thread_pool.h \ |
| 42 | ${TOP_INCDIR}/afs/thread_pool_types.h \ |
| 43 | ${TOP_INCDIR}/afs/tabular_output.h |
| 44 | |
| 45 | all: ${includes} \ |
| 46 | ${TOP_LIBDIR}/util.a \ |
| 47 | ${TOP_LIBDIR}/libafsutil.a \ |
| 48 | ${TOP_LIBDIR}/libafsutil_pic.a \ |
| 49 | sys \ |
| 50 | liboafs_util.la \ |
| 51 | libafsrpc_util.la |
| 52 | |
| 53 | util.a: $(LT_objs) |
| 54 | $(LT_LDLIB_lwp) $(LT_objs) |
| 55 | |
| 56 | libafsutil_pic.la: $(LT_objs) |
| 57 | $(LT_LDLIB_pic) $(LT_objs) |
| 58 | |
| 59 | liboafs_util.la: liboafs_util.la.sym $(LT_objs) $(LT_deps) |
| 60 | $(LT_LDLIB_shlib) $(LT_objs) $(LT_deps) $(LT_libs) |
| 61 | |
| 62 | libafsrpc_util.la: $(LT_rpc_objs) |
| 63 | $(LT_LDLIB_pic) $(LT_rpc_objs) |
| 64 | |
| 65 | buildtools: ${TOP_LIBDIR}/libafsutil.a ${TOP_INCDIR}/afs/afsutil.h |
| 66 | buildtools_clean: clean |
| 67 | |
| 68 | depinstall: ${includes} |
| 69 | |
| 70 | ${TOP_INCDIR}/afs/dirpath.h: dirpath.h |
| 71 | ${INSTALL_DATA} $? $@ |
| 72 | |
| 73 | ${TOP_INCDIR}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h |
| 74 | ${INSTALL_DATA} $? $@ |
| 75 | |
| 76 | ${TOP_INCDIR}/afs/errors.h: ${srcdir}/errors.h |
| 77 | ${INSTALL_DATA} $? $@ |
| 78 | |
| 79 | ${TOP_INCDIR}/afs/vice.h: ${srcdir}/vice.h |
| 80 | ${INSTALL_DATA} $? $@ |
| 81 | |
| 82 | ${TOP_INCDIR}/afs/ktime.h: ${srcdir}/ktime.h |
| 83 | ${INSTALL_DATA} $? $@ |
| 84 | |
| 85 | ${TOP_INCDIR}/afs/fileutil.h: ${srcdir}/fileutil.h |
| 86 | ${INSTALL_DATA} $? $@ |
| 87 | |
| 88 | ${TOP_INCDIR}/afs/afsutil.h: ${srcdir}/afsutil.h |
| 89 | ${INSTALL_DATA} $? $@ |
| 90 | |
| 91 | ${TOP_INCDIR}/afs/afsutil_prototypes.h: ${srcdir}/afsutil_prototypes.h |
| 92 | ${INSTALL_DATA} $? $@ |
| 93 | |
| 94 | ${TOP_INCDIR}/afs/pthread_glock.h: ${srcdir}/pthread_glock.h |
| 95 | ${INSTALL_DATA} $? $@ |
| 96 | |
| 97 | ${TOP_INCDIR}/afs/afs_atomlist.h: ${srcdir}/afs_atomlist.h |
| 98 | ${INSTALL_DATA} $? $@ |
| 99 | |
| 100 | ${TOP_INCDIR}/afs/afs_lhash.h: ${srcdir}/afs_lhash.h |
| 101 | ${INSTALL_DATA} $? $@ |
| 102 | |
| 103 | ${TOP_INCDIR}/afs/work_queue.h: ${srcdir}/work_queue.h |
| 104 | ${INSTALL_DATA} $? $@ |
| 105 | |
| 106 | ${TOP_INCDIR}/afs/work_queue_types.h: ${srcdir}/work_queue_types.h |
| 107 | ${INSTALL_DATA} $? $@ |
| 108 | |
| 109 | ${TOP_INCDIR}/afs/thread_pool.h: ${srcdir}/thread_pool.h |
| 110 | ${INSTALL_DATA} $? $@ |
| 111 | |
| 112 | ${TOP_INCDIR}/afs/thread_pool_types.h: ${srcdir}/thread_pool_types.h |
| 113 | ${INSTALL_DATA} $? $@ |
| 114 | |
| 115 | ${TOP_INCDIR}/afs/tabular_output.h: ${srcdir}/tabular_output.h |
| 116 | ${INSTALL_DATA} $? $@ |
| 117 | |
| 118 | ${TOP_LIBDIR}/util.a: util.a |
| 119 | ${INSTALL_DATA} $? $@ |
| 120 | |
| 121 | ${TOP_LIBDIR}/libafsutil.a: util.a |
| 122 | ${INSTALL_DATA} $? $@ |
| 123 | |
| 124 | ${TOP_LIBDIR}/libafsutil_pic.a: libafsutil_pic.la |
| 125 | ${INSTALL_DATA} .libs/libafsutil_pic.a $@ |
| 126 | |
| 127 | # Use " as the sed boundary character because we lose anyway if that occurs |
| 128 | # in path names. |
| 129 | dirpath.h: ${srcdir}/dirpath.hin Makefile |
| 130 | sed \ |
| 131 | -e 's"@afsconfdir"${afsconfdir}"' \ |
| 132 | -e 's"@viceetcdir"${viceetcdir}"' \ |
| 133 | -e 's"@afssrvbindir"${afssrvbindir}"' \ |
| 134 | -e 's"@afssrvsbindir"${afssrvsbindir}"' \ |
| 135 | -e 's"@afssrvlibexecdir"${afssrvlibexecdir}"' \ |
| 136 | -e 's"@afsdbdir"${afsdbdir}"' \ |
| 137 | -e 's"@afslogsdir"${afslogsdir}"' \ |
| 138 | -e 's"@afslocaldir"${afslocaldir}"' \ |
| 139 | -e 's"@afsbackupdir"${afsbackupdir}"' \ |
| 140 | -e 's"@afsbosconfigdir"${afsbosconfigdir}"' \ |
| 141 | -e 's"@afsdatadir"${afsdatadir}"' \ |
| 142 | ${srcdir}/dirpath.hin >dirpath.h |
| 143 | |
| 144 | |
| 145 | $(LT_objs): ${includes} |
| 146 | |
| 147 | sys.o: sys.c AFS_component_version_number.c ${includes} |
| 148 | |
| 149 | sys: sys.o |
| 150 | $(AFS_LDRULE) sys.o |
| 151 | |
| 152 | # |
| 153 | # Install targets |
| 154 | # |
| 155 | KDIR=../libafs/afs |
| 156 | UKDIR=../libuafs/afs |
| 157 | |
| 158 | install: dirpath.h util.a sys |
| 159 | ${INSTALL} -d ${DESTDIR}${includedir}/afs |
| 160 | ${INSTALL} -d ${DESTDIR}${libdir}/afs |
| 161 | ${INSTALL} -d ${DESTDIR}${bindir} |
| 162 | ${INSTALL_DATA} dirpath.h ${DESTDIR}${includedir}/afs/dirpath.h |
| 163 | ${INSTALL_DATA} ${srcdir}/pthread_nosigs.h ${DESTDIR}${includedir}/afs/pthread_nosigs.h |
| 164 | ${INSTALL_DATA} ${srcdir}/errors.h ${DESTDIR}${includedir}/afs/errors.h |
| 165 | ${INSTALL_DATA} ${srcdir}/vice.h ${DESTDIR}${includedir}/afs/vice.h |
| 166 | ${INSTALL_DATA} ${srcdir}/ktime.h ${DESTDIR}${includedir}/afs/ktime.h |
| 167 | ${INSTALL_DATA} ${srcdir}/fileutil.h ${DESTDIR}${includedir}/afs/fileutil.h |
| 168 | ${INSTALL_DATA} ${srcdir}/afsutil.h ${DESTDIR}${includedir}/afs/afsutil.h |
| 169 | ${INSTALL_DATA} ${srcdir}/afsutil_prototypes.h ${DESTDIR}${includedir}/afs/afsutil_prototypes.h |
| 170 | ${INSTALL_DATA} ${srcdir}/pthread_glock.h ${DESTDIR}${includedir}/afs/pthread_glock.h |
| 171 | ${INSTALL_DATA} ${srcdir}/afs_atomlist.h ${DESTDIR}${includedir}/afs/afs_atomlist.h |
| 172 | ${INSTALL_DATA} ${srcdir}/afs_lhash.h ${DESTDIR}${includedir}/afs/afs_lhash.h |
| 173 | ${INSTALL_DATA} ${srcdir}/work_queue.h ${DESTDIR}${includedir}/afs/work_queue.h |
| 174 | ${INSTALL_DATA} ${srcdir}/work_queue_types.h ${DESTDIR}${includedir}/afs/work_queue_types.h |
| 175 | ${INSTALL_DATA} ${srcdir}/thread_pool.h ${DESTDIR}${includedir}/afs/thread_pool.h |
| 176 | ${INSTALL_DATA} ${srcdir}/thread_pool_types.h ${DESTDIR}${includedir}/afs/thread_pool_types.h |
| 177 | ${INSTALL_DATA} ${srcdir}/tabular_output.h ${DESTDIR}${includedir}/afs/tabular_output.h |
| 178 | ${INSTALL_DATA} util.a ${DESTDIR}${libdir}/afs/util.a |
| 179 | ${INSTALL_DATA} util.a ${DESTDIR}${libdir}/afs/libafsutil.a |
| 180 | ${INSTALL_PROGRAM} sys ${DESTDIR}${bindir}/sys |
| 181 | |
| 182 | dest: dirpath.h util.a sys |
| 183 | ${INSTALL} -d ${DEST}/include/afs |
| 184 | ${INSTALL} -d ${DEST}/lib/afs |
| 185 | ${INSTALL} -d ${DEST}/bin |
| 186 | ${INSTALL_DATA} dirpath.h ${DEST}/include/afs/dirpath.h |
| 187 | ${INSTALL_DATA} ${srcdir}/pthread_nosigs.h ${DEST}/include/afs/pthread_nosigs.h |
| 188 | ${INSTALL_DATA} ${srcdir}/errors.h ${DEST}/include/afs/errors.h |
| 189 | ${INSTALL_DATA} ${srcdir}/vice.h ${DEST}/include/afs/vice.h |
| 190 | ${INSTALL_DATA} ${srcdir}/ktime.h ${DEST}/include/afs/ktime.h |
| 191 | ${INSTALL_DATA} ${srcdir}/fileutil.h ${DEST}/include/afs/fileutil.h |
| 192 | ${INSTALL_DATA} ${srcdir}/afsutil.h ${DEST}/include/afs/afsutil.h |
| 193 | ${INSTALL_DATA} ${srcdir}/afsutil_prototypes.h ${DEST}/include/afs/afsutil_prototypes.h |
| 194 | ${INSTALL_DATA} ${srcdir}/pthread_glock.h ${DEST}/include/afs/pthread_glock.h |
| 195 | ${INSTALL_DATA} ${srcdir}/afs_atomlist.h ${DEST}/include/afs/afs_atomlist.h |
| 196 | ${INSTALL_DATA} ${srcdir}/afs_lhash.h ${DEST}/include/afs/afs_lhash.h |
| 197 | ${INSTALL_DATA} ${srcdir}/work_queue.h ${DEST}/include/afs/work_queue.h |
| 198 | ${INSTALL_DATA} ${srcdir}/work_queue_types.h ${DEST}/include/afs/work_queue_types.h |
| 199 | ${INSTALL_DATA} ${srcdir}/thread_pool.h ${DEST}/include/afs/thread_pool.h |
| 200 | ${INSTALL_DATA} ${srcdir}/thread_pool_types.h ${DEST}/include/afs/thread_pool_types.h |
| 201 | ${INSTALL_DATA} ${srcdir}/tabular_output.h ${DEST}/include/afs/tabular_output.h |
| 202 | ${INSTALL_DATA} util.a ${DEST}/lib/afs/util.a |
| 203 | ${INSTALL_DATA} util.a ${DEST}/lib/afs/libafsutil.a |
| 204 | ${INSTALL_PROGRAM} sys ${DEST}/bin/sys |
| 205 | |
| 206 | # |
| 207 | # Misc targets |
| 208 | # |
| 209 | |
| 210 | clean: |
| 211 | $(LT_CLEAN) |
| 212 | $(RM) -f sys dirpath.h |
| 213 | $(RM) -f util.a *.o core AFS_component_version_number.c |
| 214 | |
| 215 | test: |
| 216 | cd test; $(MAKE) |
| 217 | |
| 218 | include ../config/Makefile.version |
| 219 | |
| 220 | check-splint: |
| 221 | sh $(HELPER_SPLINT) $(CFLAGS) \ |
| 222 | base64.c ktime.c volparse.c hostparse.c \ |
| 223 | hputil.c kreltime.c uuid.c serverLog.c \ |
| 224 | dirpath.c fileutil.c flipbase64.c \ |
| 225 | afs_atomlist.c afs_lhash.c fstab.c |