1 | ## |
---|
2 | ## $Id$ |
---|
3 | ## |
---|
4 | |
---|
5 | LIB = $(project_libdir)$(MULTISUBDIR)/librtemscpu$(LIB_VARIANT).a |
---|
6 | |
---|
7 | include $(top_srcdir)/automake/multilib.am |
---|
8 | include $(top_srcdir)/automake/compile.am |
---|
9 | include $(top_srcdir)/automake/lib.am |
---|
10 | |
---|
11 | LIBS = |
---|
12 | if LIBSCORECPU |
---|
13 | LIBS += ../score/cpu/$(RTEMS_CPU)/$(ARCH)/libscorecpu.a |
---|
14 | endif |
---|
15 | LIBS += ../score/$(ARCH)/libscore.a |
---|
16 | LIBS += ../sapi/$(ARCH)/libsapi.a |
---|
17 | LIBS += ../rtems/$(ARCH)/librtems.a |
---|
18 | |
---|
19 | if HAS_POSIX |
---|
20 | LIBS += ../posix/$(ARCH)/libposix.a |
---|
21 | endif |
---|
22 | |
---|
23 | if HAS_ITRON |
---|
24 | LIBS += ../itron/$(ARCH)/libitron.a |
---|
25 | endif |
---|
26 | |
---|
27 | LIBS += ../libcsupport/$(ARCH)/libcsupport.a |
---|
28 | |
---|
29 | LIBS += ../libblock/$(ARCH)/libblock.a |
---|
30 | if !UNIX |
---|
31 | LIBS += ../libfs/src/dosfs/$(ARCH)/libdosfs.a |
---|
32 | endif |
---|
33 | LIBS += ../libfs/src/imfs/$(ARCH)/libimfs.a |
---|
34 | |
---|
35 | if HAS_NETWORKING |
---|
36 | LIBS += ../libnetworking/wrapup/$(ARCH)/libnetworking.a |
---|
37 | endif |
---|
38 | |
---|
39 | if LIBRPC |
---|
40 | LIBS += ../librpc/src/rpc/$(ARCH)/librpc.a |
---|
41 | LIBS += ../librpc/src/xdr/$(ARCH)/libxdr.a |
---|
42 | endif |
---|
43 | |
---|
44 | $(LIB): ${LIBS} |
---|
45 | rm -f $@ |
---|
46 | test -d $(ARCH) || mkdir $(ARCH) |
---|
47 | rm -rf $(ARCH)/* |
---|
48 | for f in $(LIBS); do \ |
---|
49 | case $$f in \ |
---|
50 | *.$(OBJEXT) | *.rel) \ |
---|
51 | if test -f $(ARCH)/`basename $$f`; then \ |
---|
52 | if cmp $$f $(ARCH)/`basename $$f`; then \ |
---|
53 | true; \ |
---|
54 | else \ |
---|
55 | echo 1>&2 "ERROR -- `basename $$f` in multiple files"; \ |
---|
56 | exit 1; \ |
---|
57 | fi; \ |
---|
58 | else \ |
---|
59 | cp $$f $(ARCH)/; \ |
---|
60 | chmod a-w $(ARCH)/`basename $$f`; \ |
---|
61 | fi; \ |
---|
62 | ;; \ |
---|
63 | *.a) \ |
---|
64 | cd $(ARCH); \ |
---|
65 | $(AR) xv ../$$f || exit 1; \ |
---|
66 | chmod a-w * ; \ |
---|
67 | cd ..; \ |
---|
68 | ;; \ |
---|
69 | esac; \ |
---|
70 | done |
---|
71 | test -d $(project_libdir)$(MULTISUBDIR) || $(mkinstalldirs) $(project_libdir)$(MULTISUBDIR) |
---|
72 | $(AR) rc $@ $(ARCH)/* |
---|
73 | rm -f $(ARCH)/*.$(OBJEXT) |
---|
74 | $(RANLIB) $@ |
---|
75 | |
---|
76 | TMPINSTALL_FILES += $(project_libdir)$(MULTISUBDIR)/librtemscpu$(LIB_VARIANT).a |
---|
77 | |
---|
78 | cpulibdir = $(libdir) |
---|
79 | cpulib_DATA = $(LIB) |
---|
80 | |
---|
81 | all-local: ${ARCH} $(TMPINSTALL_FILES) |
---|
82 | |
---|
83 | include $(top_srcdir)/automake/local.am |
---|