source: rtems/c/src/wrapup/Makefile.am @ f92cc34

4.104.114.84.95
Last change on this file since f92cc34 was f92cc34, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 20, 2001 at 5:32:49 PM

2001-12-20 Ralf Corsepius <corsepiu@…>

  • configure.ac: Add AM_CONDITIONAL for enable_multilib, enable_posix, enable_itron.
  • Makefile.am: Compute MULTISUBDIR on-the-fly. Conditionally add libposix and libitron to SRCS. Apply MULTISUBDIR for picking up librtems, libposix and libitron.
  • Property mode set to 100644
File size: 2.5 KB
Line 
1##
2##  $Id$
3##
4##  build and install "glommed" librtemsall.a
5##
6
7AUTOMAKE_OPTIONS = foreign 1.4
8ACLOCAL_AMFLAGS = -I ../../../aclocal
9
10include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
11include $(top_srcdir)/../../../automake/compile.am
12include $(top_srcdir)/../../../automake/lib.am
13
14LIB = $(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
15
16# HACK: We need to evaluate CFLAGS at make-time, because these
17#       fscking <bsp>.cfgs change CFLAGS and can change
18#       MULTISUBDIR on-the-fly - A true PITA :(
19if MULTILIB
20MULTISUBDIR = /$(shell $(CC) --print-multi-directory $(CFLAGS))
21PROJECT_CPUdir = $(PROJECT_ROOT)/lib$(MULTISUBDIR)
22else
23PROJECT_CPUdir = $(PROJECT_RELEASE)/lib
24endif
25
26if HAS_NETWORKING
27LIBNETWORKING = $(PROJECT_RELEASE)/lib/libnetworking$(LIB_VARIANT).a \
28    $(wildcard $(PROJECT_RELEASE)/lib/librpc$(LIB_VARIANT).a) \
29    $(wildcard $(PROJECT_RELEASE)/lib/libxdr$(LIB_VARIANT).a)
30endif
31
32if HAS_RDBG
33LIBRDBG = $(PROJECT_RELEASE)/lib/librdbg$(LIB_VARIANT).a
34endif
35
36if HAS_POSIX
37LIBPOSIX = $(PROJECT_CPUdir)/libposix$(LIB_VARIANT).a
38endif
39
40if HAS_ITRON
41LIBITRON = $(PROJECT_CPUdir)/libitron$(LIB_VARIANT).a
42endif
43
44SRCS =  $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a
45SRCS += $(PROJECT_CPUdir)/librtems$(LIB_VARIANT).a
46SRCS += $(LIBNETWORKING) $(LIBRDBG) $(LIBPOSIX) $(LIBITRON) \
47    $(wildcard $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a) \
48    $(wildcard $(PROJECT_RELEASE)/lib/librtcio$(LIB_VARIANT).a) \
49    $(wildcard $(PROJECT_RELEASE)/lib/libserialio$(LIB_VARIANT).a) \
50    $(wildcard $(PROJECT_RELEASE)/lib/libnetchip$(LIB_VARIANT).a) \
51    $(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \
52    $(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
53    $(PROJECT_RELEASE)/lib/libfs$(LIB_VARIANT).a \
54    $(wildcard $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o)
55
56TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
57
58all-local: $(ARCH) $(TMPINSTALL_FILES)
59
60$(LIB): $(SRCS)
61        rm -f $@
62        rm -rf $(ARCH)/*
63        for f in $(SRCS); do \
64          case $$f in \
65          *.o | *.rel) \
66            if test -f $(ARCH)/`basename $$f`; then \
67              if cmp $$f $(ARCH)/`basename $$f`; then \
68                true; \
69              else \
70                echo 1>&2 "ERROR -- `basename $$f` in multiple files"; \
71                exit 1; \
72              fi; \
73            else \
74              cp $$f $(ARCH)/; \
75              chmod a-w $(ARCH)/`basename $$f`; \
76            fi; \
77            ;; \
78          *.a) \
79            cd $(ARCH); \
80              $(AR) xv ../$$f || exit 1; \
81              chmod a-w * ; \
82            cd ..; \
83            ;; \
84          esac; \
85        done
86        $(AR) rc $@ $(ARCH)/*
87        rm -f $(ARCH)/*
88        $(RANLIB) $@
89
90include $(top_srcdir)/../../../automake/local.am
Note: See TracBrowser for help on using the repository browser.