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