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

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

See C.L. 370

  • 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) $(ar) $(${CONSTITUENT}lib) $?
9        $(lib_silent) $(ranlib) $(${CONSTITUENT}lib)
10        $(lib_silent) cat /dev/null >$(${CONSTITUENT}stamp)
11
12#------------------------------------------------------------------
13#  Future improvement? to empty the object files after
14#  storing in the library
15#
16##        for f in $?; do \
17##          rm $${f}; touch $${f}; \
18##        done
19#------------------------------------------------------------------
20
21#
22# We add one level of dependency upon the true shared library
23# (rather than simply upon the stamp file)
24# this is for cases where the shared library has not been built
25# while the stamp was created (error??)
26#
27
28$(${CONSTITUENT}libname).$(shlibsuffix) :: $(${CONSTITUENT}lib) requirements $(use_requirements) $(${CONSTITUENT}stamps)
29        $(lib_echo) "shared library $@"
30        $(lib_silent) if test "$(makecmd)"; then QUIET=; else QUIET=1; fi; QUIET=$${QUIET} bin=$(bin) $(make_shlib) "$(tags)" ${CONSTITUENT} $(${CONSTITUENT}_shlibflags)
31
32$(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}libname).$(shlibsuffix)
33        $(lib_silent) if test -f $(${CONSTITUENT}libname).$(shlibsuffix) ; then cat /dev/null >$(${CONSTITUENT}shstamp) ; fi
34
35${CONSTITUENT}clean ::
36        $(cleanup_echo) objects
37        $(cleanup_silent) /bin/rm -f ${OBJS}
38        $(cleanup_silent) cd $(bin); /bin/rm -rf ${CONSTITUENT}_deps ${CONSTITUENT}_dependencies.make
39
40#-----------------------------------------------------------------
41#
42#  New section for automatic installation
43#
44#-----------------------------------------------------------------
45
46install_dir = ${CMTINSTALLAREA}/$(tag)/lib
47${CONSTITUENT}installname = $(library_prefix)${CONSTITUENT}$(library_suffix).$(shlibsuffix)
48
49${CONSTITUENT} :: ${CONSTITUENT}install
50
51install :: ${CONSTITUENT}install
52
53${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname)
54ifdef CMTINSTALLAREA
55        $(echo) "installation done"
56endif
57
58$(install_dir)/$(${CONSTITUENT}installname) :: $(bin)$(${CONSTITUENT}installname)
59ifdef CMTINSTALLAREA
60        $(install_silent) $(cmt_install_action) \
61            -source "`(cd $(bin); pwd)`" \
62            -name "$(${CONSTITUENT}installname)" \
63            -out "$(install_dir)" \
64            -cmd "$(cmt_installarea_command)" \
65            -cmtpath "$($(package)_cmtpath)"
66endif
67
68##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall
69
70uninstall :: ${CONSTITUENT}uninstall
71
72${CONSTITUENT}uninstall ::
73ifdef CMTINSTALLAREA
74        $(cleanup_silent) $(cmt_uninstall_action) \
75            -source "`(cd $(bin); pwd)`" \
76            -name "$(${CONSTITUENT}installname)" \
77            -out "$(install_dir)" \
78            -cmtpath "$($(package)_cmtpath)"
79endif
80
81#-- end of libary -----------------------
Note: See TracBrowser for help on using the repository browser.