source: CMT/v1r20p20080222/mgr/fragments/library @ 597

Last change on this file since 597 was 445, checked in by rybkin, 16 years ago

See C.L. 349

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1#-- start of libary ----------------------
2
3${CONSTITUENT}LIB :: $(${CONSTITUENT}lib) $(${CONSTITUENT}shstamp)
4        $(echo) "${CONSTITUENT} : library ok"
5
6$(${CONSTITUENT}lib) :: ${OBJS}
7        $(lib_echo) "static library $@"
8        $(lib_silent) cd $(bin); \
9          $(ar) $(${CONSTITUENT}lib) $?
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)
30        $(lib_echo) "shared library $@"
31        $(lib_silent) cd $(bin); if test "$(makecmd)"; then QUIET=; else QUIET=1; fi; QUIET=$${QUIET} $(make_shlib) "$(tags)" ${CONSTITUENT} $(${CONSTITUENT}_shlibflags)
32
33$(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}libname).$(shlibsuffix)
34        $(lib_silent) if test -f $(${CONSTITUENT}libname).$(shlibsuffix) ; then cat /dev/null >$(${CONSTITUENT}shstamp) ; fi
35
36${CONSTITUENT}clean ::
37        $(cleanup_echo) objects
38        $(cleanup_silent) cd $(bin); /bin/rm -f ${OBJS}
39        $(cleanup_silent) cd $(bin); /bin/rm -rf ${CONSTITUENT}_deps ${CONSTITUENT}_dependencies.make
40
41#-----------------------------------------------------------------
42#
43#  New section for automatic installation
44#
45#-----------------------------------------------------------------
46
47install_dir = ${CMTINSTALLAREA}/$(tag)/lib
48${CONSTITUENT}installname = $(library_prefix)${CONSTITUENT}$(library_suffix).$(shlibsuffix)
49
50${CONSTITUENT} :: ${CONSTITUENT}install
51
52install :: ${CONSTITUENT}install
53
54${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname)
55ifdef CMTINSTALLAREA
56        $(echo) "installation done"
57endif
58
59$(install_dir)/$(${CONSTITUENT}installname) :: $(bin)$(${CONSTITUENT}installname)
60ifdef CMTINSTALLAREA
61        $(install_silent) $(cmt_install_action) \
62            -source "`(cd $(bin); pwd)`" \
63            -name "$(${CONSTITUENT}installname)" \
64            -out "$(install_dir)" \
65            -cmd "$(cmt_installarea_command)" \
66            -cmtpath "$($(package)_cmtpath)"
67endif
68
69##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall
70
71uninstall :: ${CONSTITUENT}uninstall
72
73${CONSTITUENT}uninstall ::
74ifdef CMTINSTALLAREA
75        $(cleanup_silent) $(cmt_uninstall_action) \
76            -source "`(cd $(bin); pwd)`" \
77            -name "$(${CONSTITUENT}installname)" \
78            -out "$(install_dir)" \
79            -cmtpath "$($(package)_cmtpath)"
80endif
81
82#-- end of libary -----------------------
Note: See TracBrowser for help on using the repository browser.