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) [ ! -f $@ ] || \rm -f $@ |
---|
9 | $(lib_silent) $(ar) $(${CONSTITUENT}lib) ${OBJS} |
---|
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_echo) "shared library $@" |
---|
31 | $(lib_silent) if test "$(makecmd)"; then QUIET=; else QUIET=1; fi; QUIET=$${QUIET} bin="$(bin)" ld="$(shlibbuilder)" ldflags="$(shlibflags)" suffix=$(shlibsuffix) libprefix=$(library_prefix) libsuffix=$(library_suffix) $(make_shlib) "$(tags)" ${CONSTITUENT} $(${CONSTITUENT}_shlibflags) |
---|
32 | |
---|
33 | $(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}libname).$(shlibsuffix) |
---|
34 | $(lib_silent) if test -f $(${CONSTITUENT}libname).$(shlibsuffix) ; then cat /dev/null >$(${CONSTITUENT}shstamp) ; fi |
---|
35 | |
---|
36 | ${CONSTITUENT}clean :: |
---|
37 | $(cleanup_echo) objects ${CONSTITUENT} |
---|
38 | $(cleanup_silent) /bin/rm -f ${OBJS} |
---|
39 | $(cleanup_silent) /bin/rm -f $(patsubst %.o,%.d,${OBJS}) $(patsubst %.o,%.dep,${OBJS}) $(patsubst %.o,%.d.stamp,${OBJS}) |
---|
40 | $(cleanup_silent) cd $(bin); /bin/rm -rf ${CONSTITUENT}_deps ${CONSTITUENT}_dependencies.make |
---|
41 | |
---|
42 | #----------------------------------------------------------------- |
---|
43 | # |
---|
44 | # New section for automatic installation |
---|
45 | # |
---|
46 | #----------------------------------------------------------------- |
---|
47 | |
---|
48 | install_dir = ${CMTINSTALLAREA}/$(tag)/lib |
---|
49 | ${CONSTITUENT}installname = $(library_prefix)${CONSTITUENT}$(library_suffix).$(shlibsuffix) |
---|
50 | |
---|
51 | ${CONSTITUENT} :: ${CONSTITUENT}install ; |
---|
52 | |
---|
53 | install :: ${CONSTITUENT}install ; |
---|
54 | |
---|
55 | ${CONSTITUENT}install :: $(install_dir)/$(${CONSTITUENT}installname) |
---|
56 | ifdef CMTINSTALLAREA |
---|
57 | $(echo) "installation done" |
---|
58 | endif |
---|
59 | |
---|
60 | $(install_dir)/$(${CONSTITUENT}installname) :: $(bin)$(${CONSTITUENT}installname) |
---|
61 | ifdef CMTINSTALLAREA |
---|
62 | $(install_silent) $(cmt_install_action) \ |
---|
63 | -source "`(cd $(bin); pwd)`" \ |
---|
64 | -name "$(${CONSTITUENT}installname)" \ |
---|
65 | -out "$(install_dir)" \ |
---|
66 | -cmd "$(cmt_installarea_command)" \ |
---|
67 | -cmtpath "$($(package)_cmtpath)" |
---|
68 | endif |
---|
69 | |
---|
70 | ##${CONSTITUENT}clean :: ${CONSTITUENT}uninstall |
---|
71 | |
---|
72 | uninstall :: ${CONSTITUENT}uninstall ; |
---|
73 | |
---|
74 | ${CONSTITUENT}uninstall :: |
---|
75 | ifdef CMTINSTALLAREA |
---|
76 | $(cleanup_silent) $(cmt_uninstall_action) \ |
---|
77 | -source "`(cd $(bin); pwd)`" \ |
---|
78 | -name "$(${CONSTITUENT}installname)" \ |
---|
79 | -out "$(install_dir)" \ |
---|
80 | -cmtpath "$($(package)_cmtpath)" |
---|
81 | endif |
---|
82 | |
---|
83 | #-- end of libary ----------------------- |
---|