source: CMT/HEAD/mgr/fragments/library @ 487

Last change on this file since 487 was 487, checked in by rybkin, 15 years ago

See C.L. 382

  • Property svn:eol-style set to native
File size: 2.9 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 ${CONSTITUENT}
37        $(cleanup_silent) /bin/rm -f ${OBJS}
38        $(cleanup_silent) /bin/rm -f $(patsubst %.o,%.d,${OBJS}) $(patsubst %.o,%.dep,${OBJS}) $(patsubst %.o,%.d.stamp,${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.