[20db683] | 1 | ## |
---|
| 2 | ## $Id$ |
---|
| 3 | ## |
---|
| 4 | |
---|
[405c7d1] | 5 | LIB = $(project_libdir)$(MULTISUBDIR)/librtemscpu$(LIB_VARIANT).a |
---|
[20db683] | 6 | |
---|
[fed6210d] | 7 | include $(top_srcdir)/automake/multilib.am |
---|
| 8 | include $(top_srcdir)/automake/compile.am |
---|
| 9 | include $(top_srcdir)/automake/lib.am |
---|
[20db683] | 10 | |
---|
[33e6983] | 11 | LIBS = |
---|
[2a582aa5] | 12 | if LIBSCORECPU |
---|
[33e6983] | 13 | LIBS += ../score/cpu/$(RTEMS_CPU)/$(ARCH)/libscorecpu.a |
---|
[2a582aa5] | 14 | endif |
---|
[33e6983] | 15 | LIBS += ../score/$(ARCH)/libscore.a |
---|
| 16 | LIBS += ../sapi/$(ARCH)/libsapi.a |
---|
| 17 | LIBS += ../rtems/$(ARCH)/librtems.a |
---|
[20db683] | 18 | |
---|
| 19 | if HAS_POSIX |
---|
[33e6983] | 20 | LIBS += ../posix/$(ARCH)/libposix.a |
---|
[20db683] | 21 | endif |
---|
| 22 | |
---|
| 23 | if HAS_ITRON |
---|
[33e6983] | 24 | LIBS += ../itron/$(ARCH)/libitron.a |
---|
[20db683] | 25 | endif |
---|
| 26 | |
---|
[33e6983] | 27 | LIBS += ../libcsupport/$(ARCH)/libcsupport.a |
---|
[90926129] | 28 | |
---|
[33e6983] | 29 | LIBS += ../libblock/$(ARCH)/libblock.a |
---|
[35cd6ae] | 30 | if !UNIX |
---|
[33e6983] | 31 | LIBS += ../libfs/src/dosfs/$(ARCH)/libdosfs.a |
---|
[35cd6ae] | 32 | endif |
---|
[33e6983] | 33 | LIBS += ../libfs/src/imfs/$(ARCH)/libimfs.a |
---|
[35cd6ae] | 34 | |
---|
[3e39b47] | 35 | if HAS_NETWORKING |
---|
[33e6983] | 36 | LIBS += ../libnetworking/wrapup/$(ARCH)/libnetworking.a |
---|
[2a582aa5] | 37 | endif |
---|
| 38 | |
---|
| 39 | if LIBRPC |
---|
[33e6983] | 40 | LIBS += ../librpc/src/rpc/$(ARCH)/librpc.a |
---|
| 41 | LIBS += ../librpc/src/xdr/$(ARCH)/libxdr.a |
---|
[3e39b47] | 42 | endif |
---|
| 43 | |
---|
[33e6983] | 44 | $(LIB): ${LIBS} |
---|
[3e39b47] | 45 | rm -f $@ |
---|
| 46 | test -d $(ARCH) || mkdir $(ARCH) |
---|
| 47 | rm -rf $(ARCH)/* |
---|
[33e6983] | 48 | for f in $(LIBS); do \ |
---|
[3e39b47] | 49 | case $$f in \ |
---|
[305dd8bd] | 50 | *.$(OBJEXT) | *.rel) \ |
---|
[3e39b47] | 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 |
---|
[405c7d1] | 71 | test -d $(project_libdir)$(MULTISUBDIR) || $(mkinstalldirs) $(project_libdir)$(MULTISUBDIR) |
---|
[3e39b47] | 72 | $(AR) rc $@ $(ARCH)/* |
---|
[305dd8bd] | 73 | rm -f $(ARCH)/*.$(OBJEXT) |
---|
[3e39b47] | 74 | $(RANLIB) $@ |
---|
[20db683] | 75 | |
---|
[405c7d1] | 76 | TMPINSTALL_FILES += $(project_libdir)$(MULTISUBDIR)/librtemscpu$(LIB_VARIANT).a |
---|
[20db683] | 77 | |
---|
[fa348b7d] | 78 | cpulibdir = $(libdir) |
---|
| 79 | cpulib_DATA = $(LIB) |
---|
[dd2906e] | 80 | |
---|
[20db683] | 81 | all-local: ${ARCH} $(TMPINSTALL_FILES) |
---|
| 82 | |
---|
[fed6210d] | 83 | include $(top_srcdir)/automake/local.am |
---|