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
|
## Process this file with automake to generate Makefile.in
SUBDIRS = stdlib pmstring string misc $(LIB_QSORT_DIR) .
DIST_SUBDIRS = stdlib pmstring string misc bsd gnu .
noinst_LIBRARIES = libc.a
# content of AVR_CRT_xxx is determined by configure according to the multilib
# subdir (see acinclude.m4 in top directory)
noinst_DATA = $(AVR_CRT_AT90) $(AVR_CRT_TINY) $(AVR_CRT_MEGA) $(AVR_CRT_OTHER)
# must be added to the package, but automake doesn't know them as source
# files until now
EXTRA_DIST = gcrt1.S
# must be defined as empty, so that make dist will work
libc_a_SOURCES =
# if we have no sources, COMPILE is not defined by automake
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
SUBLIBS = \
stdlib/lib.a \
pmstring/lib.a \
string/lib.a \
misc/lib.a \
$(LIB_QSORT_DIR)/lib.a
libc.a: $(SUBLIBS)
rm -f $@
rm -rf tmp
mkdir tmp
cd tmp; \
for i in $(SUBLIBS); do \
$(AR) x ../$$i; \
done; \
$(AR) $(AR_FLAGS) ../$@ *.o
$(RANLIB) $@
rm -rf tmp
$(SUBLIBS): ; @true
# content of AVR_CRT_ASFLAGS is set by configure (see acinclude.m4 in top
# directory)
$(AVR_CRT_AT90): crt%.o: gcrt1.S
$(COMPILE) $(AVR_CRT_ASFLAGS) -mmcu=at90$* -c $< -o $@
$(AVR_CRT_MEGA): crtm%.o: gcrt1.S
$(COMPILE) $(AVR_CRT_ASFLAGS) -mmcu=atmega$* -c $< -o $@
$(AVR_CRT_TINY): crttn%.o: gcrt1.S
$(COMPILE) $(AVR_CRT_ASFLAGS) -mmcu=attiny$* -c $< -o $@
$(AVR_CRT_OTHER): crt%.o: gcrt1.S
$(COMPILE) $(AVR_CRT_ASFLAGS) -mmcu=$* -c $< -o $@
|