source: CMT/HEAD/mgr/fragments/library_no_static

Last change on this file was 628, checked in by rybkin, 12 years ago

See C.L. 499

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