summaryrefslogtreecommitdiffstats
path: root/c/src/lib/wrapup/Makefile.in
blob: bef0aa637bff90efa8ef2c4701f27bbc790cb0d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
#  $Id$
#
#  build and install "glommed" librtemsall.a
#

@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@

include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/lib.cfg
 
LIB=$(PROJECT_RELEASE)/lib/librtemsall${LIB_VARIANT}.a
 
SRCS=$(wildcard $(PROJECT_RELEASE)/lib/libbsp$(LIB_VARIANT).a) \
     $(PROJECT_RELEASE)/lib/librtems$(LIB_VARIANT).a \
     $(wildcard $(PROJECT_RELEASE)/lib/libposix$(LIB_VARIANT).a) \
     $(wildcard $(PROJECT_RELEASE)/lib/libka9q$(LIB_VARIANT).a) \
     $(wildcard $(PROJECT_RELEASE)/lib/libcpu$(LIB_VARIANT).a) \
     $(PROJECT_RELEASE)/lib/libcsupport$(LIB_VARIANT).a \
     $(PROJECT_RELEASE)/lib/libmisc$(LIB_VARIANT).a \
     $(wildcard $(PROJECT_RELEASE)/lib/rtems-ctor$(LIB_VARIANT).o) \
     $(wildcard $(PROJECT_RELEASE)/lib/libno-ctor$(LIB_VARIANT).a)
 
CLEAN_ADDITIONS += $(ARCH)/check
CLOBBER_ADDITIONS +=
 
all:    $(ARCH) $(LIB)

install:  all

$(ARCH)/check:: $(SRCS)
	@$(RM) $@; touch $@;
	@for f in $(SRCS); do \
	  case $$f in \
	  *.o)   echo " `basename $$f`" >> $@ \
	    ;; \
	  *.rel) echo " `basename $$f`" >> $@ \
	    ;; \
	  *.a) \
	  ( list=`$(AR) t $$f`;\
	    for i in $$list; do \
	      if grep " $$i" $@; then \
	        echo "ERROR -- $$i in multiple files"; exit 1; \
	      fi;\
	      echo " $$i" >> $@;\
	    done; ) \
	    ;; \
	  esac; \
	done;

$(LIB):: $(ARCH)/check
	@for f in $(SRCS); do \
	  case $$f in \
	  *.o) $(AR) ru $@ $$f \
	    ;;\
	  *.rel) $(AR) ru $@ $$f \
	    ;;\
	  *.a) \
	    (cd $(ARCH); \
	    list=`$(AR) t $$f`; \
	    $(AR) x $$f $$list; $(AR) ru $@ $$list; \
	    $(RM) $$list ;)\
	    ;; \
	  esac; \
	done;
	@$(RANLIB) $@
	@echo "*** Glommed $@"