source: CMT/HEAD/mgr/fragments/library_no_static @ 469

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

See C.L. 370

File size: 2.7 KB
Line 
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)
35        $(lib_silent) if test -f $(${CONSTITUENT}libname).$(shlibsuffix) ; then cat /dev/null >$(${CONSTITUENT}shstamp) ; fi
36
37${CONSTITUENT}clean ::
38        $(cleanup_echo) objects
39        $(cleanup_silent) /bin/rm -f ${OBJS}
40        $(cleanup_silent) cd $(bin); /bin/rm -rf ${CONSTITUENT}_deps ${CONSTITUENT}_dependencies.make
41
42#-----------------------------------------------------------------
43#
44#  New section for automatic installation
45#
46#-----------------------------------------------------------------
47
48install_dir = ${CMTINSTALLAREA}/$(tag)/lib
49${CONSTITUENT}installname = $(library_prefix)${CONSTITUENT}$(library_suffix).$(shlibsuffix)
50
51${CONSTITUENT} :: ${CONSTITUENT}install
52
53install :: ${CONSTITUENT}install
54
55${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname)
56ifdef CMTINSTALLAREA
57        $(echo) "installation done"
58endif
59
60$(install_dir)/$(${CONSTITUENT}installname) :: $(bin)$(${CONSTITUENT}installname)
61ifdef CMTINSTALLAREA
62        $(install_silent) $(cmt_install_action) \
63            -source "`(cd $(bin); pwd)`" \
64            -name "$(${CONSTITUENT}installname)" \
65            -out "$(install_dir)" \
66            -cmd "$(cmt_installarea_command)" \
67            -cmtpath "$($(package)_cmtpath)"
68endif
69
70##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall
71
72uninstall :: ${CONSTITUENT}uninstall
73
74${CONSTITUENT}uninstall ::
75ifdef CMTINSTALLAREA
76        $(cleanup_silent) $(cmt_uninstall_action) \
77            -source "`(cd $(bin); pwd)`" \
78            -name "$(${CONSTITUENT}installname)" \
79            -out "$(install_dir)" \
80            -cmtpath "$($(package)_cmtpath)"
81endif
82
83#-- end of library_no_static ------
Note: See TracBrowser for help on using the repository browser.