source: CMT/v1r18p20041201/mgr/fragments/library @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

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