[2] | 1 | #-- start of libary ---------------------- |
---|
| 2 | |
---|
| 3 | ${CONSTITUENT}LIB :: $(${CONSTITUENT}lib) $(${CONSTITUENT}shstamp) |
---|
[441] | 4 | $(echo) "${CONSTITUENT} : library ok" |
---|
[2] | 5 | |
---|
| 6 | $(${CONSTITUENT}lib) :: ${OBJS} |
---|
[442] | 7 | $(lib_echo) "static library $@" |
---|
[502] | 8 | $(lib_silent) [ ! -f $@ ] || \rm -f $@ |
---|
| 9 | $(lib_silent) $(ar) $(${CONSTITUENT}lib) ${OBJS} |
---|
[2] | 10 | $(lib_silent) $(ranlib) $(${CONSTITUENT}lib) |
---|
| 11 | $(lib_silent) cat /dev/null >$(${CONSTITUENT}stamp) |
---|
| 12 | |
---|
| 13 | #------------------------------------------------------------------ |
---|
| 14 | # Future improvement? to empty the object files after |
---|
| 15 | # storing in the library |
---|
| 16 | # |
---|
| 17 | ## for f in $?; do \ |
---|
| 18 | ## rm $${f}; touch $${f}; \ |
---|
| 19 | ## done |
---|
| 20 | #------------------------------------------------------------------ |
---|
| 21 | |
---|
| 22 | # |
---|
| 23 | # We add one level of dependency upon the true shared library |
---|
| 24 | # (rather than simply upon the stamp file) |
---|
| 25 | # this is for cases where the shared library has not been built |
---|
| 26 | # while the stamp was created (error??) |
---|
| 27 | # |
---|
| 28 | |
---|
| 29 | $(${CONSTITUENT}libname).$(shlibsuffix) :: $(${CONSTITUENT}lib) requirements $(use_requirements) $(${CONSTITUENT}stamps) |
---|
[442] | 30 | $(lib_echo) "shared library $@" |
---|
[591] | 31 | $(lib_silent) if test "$(makecmd)"; then QUIET=; else QUIET=1; fi; QUIET=$${QUIET} bin="$(bin)" ld="$(shlibbuilder)" ldflags="$(shlibflags)" suffix=$(shlibsuffix) libprefix=$(library_prefix) libsuffix=$(library_suffix) $(make_shlib) "$(tags)" ${CONSTITUENT} $(${CONSTITUENT}_shlibflags) |
---|
[628] | 32 | $(lib_silent) cat /dev/null >$(${CONSTITUENT}shstamp) |
---|
[2] | 33 | |
---|
| 34 | $(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}libname).$(shlibsuffix) |
---|
[445] | 35 | $(lib_silent) if test -f $(${CONSTITUENT}libname).$(shlibsuffix) ; then cat /dev/null >$(${CONSTITUENT}shstamp) ; fi |
---|
[2] | 36 | |
---|
| 37 | ${CONSTITUENT}clean :: |
---|
[487] | 38 | $(cleanup_echo) objects ${CONSTITUENT} |
---|
[469] | 39 | $(cleanup_silent) /bin/rm -f ${OBJS} |
---|
[487] | 40 | $(cleanup_silent) /bin/rm -f $(patsubst %.o,%.d,${OBJS}) $(patsubst %.o,%.dep,${OBJS}) $(patsubst %.o,%.d.stamp,${OBJS}) |
---|
[79] | 41 | $(cleanup_silent) cd $(bin); /bin/rm -rf ${CONSTITUENT}_deps ${CONSTITUENT}_dependencies.make |
---|
[2] | 42 | |
---|
| 43 | #----------------------------------------------------------------- |
---|
| 44 | # |
---|
| 45 | # New section for automatic installation |
---|
| 46 | # |
---|
| 47 | #----------------------------------------------------------------- |
---|
| 48 | |
---|
| 49 | install_dir = ${CMTINSTALLAREA}/$(tag)/lib |
---|
| 50 | ${CONSTITUENT}installname = $(library_prefix)${CONSTITUENT}$(library_suffix).$(shlibsuffix) |
---|
| 51 | |
---|
[593] | 52 | ${CONSTITUENT} :: ${CONSTITUENT}install ; |
---|
[2] | 53 | |
---|
[593] | 54 | install :: ${CONSTITUENT}install ; |
---|
[2] | 55 | |
---|
| 56 | ${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname) |
---|
[441] | 57 | ifdef CMTINSTALLAREA |
---|
| 58 | $(echo) "installation done" |
---|
| 59 | endif |
---|
[2] | 60 | |
---|
| 61 | $(install_dir)/$(${CONSTITUENT}installname) :: $(bin)$(${CONSTITUENT}installname) |
---|
[441] | 62 | ifdef CMTINSTALLAREA |
---|
| 63 | $(install_silent) $(cmt_install_action) \ |
---|
[2] | 64 | -source "`(cd $(bin); pwd)`" \ |
---|
| 65 | -name "$(${CONSTITUENT}installname)" \ |
---|
| 66 | -out "$(install_dir)" \ |
---|
| 67 | -cmd "$(cmt_installarea_command)" \ |
---|
[441] | 68 | -cmtpath "$($(package)_cmtpath)" |
---|
| 69 | endif |
---|
[2] | 70 | |
---|
| 71 | ##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall |
---|
| 72 | |
---|
[593] | 73 | uninstall :: ${CONSTITUENT}uninstall ; |
---|
[2] | 74 | |
---|
| 75 | ${CONSTITUENT}uninstall :: |
---|
[441] | 76 | ifdef CMTINSTALLAREA |
---|
| 77 | $(cleanup_silent) $(cmt_uninstall_action) \ |
---|
[2] | 78 | -source "`(cd $(bin); pwd)`" \ |
---|
| 79 | -name "$(${CONSTITUENT}installname)" \ |
---|
| 80 | -out "$(install_dir)" \ |
---|
[441] | 81 | -cmtpath "$($(package)_cmtpath)" |
---|
| 82 | endif |
---|
[2] | 83 | |
---|
| 84 | #-- end of libary ----------------------- |
---|