blob: bd6d3c543e0a22305a802a9b37c7f5c06b67696b (
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
|
ifndef ($(CC))
CC ?= gcc
endif
override CPPFLAGS += -D__KERNEL__ -I../include
override ASFLAGS += $(CPPFLAGS) -D__ASSEMBLY__ -traditional
ifeq ($(TESTING),)
ifeq ($(FOREIGN),"yes")
override CFLAGS += -Os -Wall -fno-builtin
else
override CFLAGS += -Os -Wall -mno-fp-regs -fno-builtin
endif
else
override CFLAGS += -Os -g3 -Wall
endif
ifeq ($(TESTING),)
libaboot.a: vsprintf.o memcpy.o memset.o string.o _setjmp.o \
_longjmp.o isolib.o __divqu.o __remqu.o __divlu.o \
__remlu.o
ar cru $@ $?
else
libaboot.a: isolib.o
ar cru $@ $?
endif
clean:
rm -f libaboot.a *.o
__divqu.o: divide.S
$(CC) -DDIV -c -o $@ divide.S
__remqu.o: divide.S
$(CC) -DREM -c -o $@ divide.S
__divlu.o: divide.S
$(CC) -DDIV -DINTSIZE -c -o $@ divide.S
__remlu.o: divide.S
$(CC) -DREM -DINTSIZE -c -o $@ divide.S
|