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

Last change on this file since 593 was 593, checked in by rybkin, 13 years ago

See C.L. 470

File size: 2.9 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 \
36          cat /dev/null >$(${CONSTITUENT}stamp) && \
37          cat /dev/null >$(${CONSTITUENT}shstamp) ; fi
38
39${CONSTITUENT}clean ::
40        $(cleanup_echo) objects ${CONSTITUENT}
41        $(cleanup_silent) /bin/rm -f ${OBJS}
42        $(cleanup_silent) /bin/rm -f $(patsubst %.o,%.d,${OBJS}) $(patsubst %.o,%.dep,${OBJS}) $(patsubst %.o,%.d.stamp,${OBJS})
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
51install_dir = ${CMTINSTALLAREA}/$(tag)/lib
52${CONSTITUENT}installname = $(library_prefix)${CONSTITUENT}$(library_suffix).$(shlibsuffix)
53
54${CONSTITUENT} :: ${CONSTITUENT}install ;
55
56install :: ${CONSTITUENT}install ;
57
58${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname)
59ifdef CMTINSTALLAREA
60        $(echo) "installation done"
61endif
62
63$(install_dir)/$(${CONSTITUENT}installname) :: $(bin)$(${CONSTITUENT}installname)
64ifdef 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)"
71endif
72
73##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall
74
75uninstall :: ${CONSTITUENT}uninstall ;
76
77${CONSTITUENT}uninstall ::
78ifdef CMTINSTALLAREA
79        $(cleanup_silent) $(cmt_uninstall_action) \
80            -source "`(cd $(bin); pwd)`" \
81            -name "$(${CONSTITUENT}installname)" \
82            -out "$(install_dir)" \
83            -cmtpath "$($(package)_cmtpath)"
84endif
85
86#-- end of library_no_static ------
Note: See TracBrowser for help on using the repository browser.