forked from gsauthof/riscv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
67 lines (41 loc) · 1.42 KB
/
makefile
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
ASFLAGS = -march=rv64gcv
AS = riscv64-unknown-elf-as
CC = riscv64-unknown-elf-gcc
LD = riscv64-unknown-elf-ld
CFLAGSW_GCC = -Wall -Wextra -Wno-missing-field-initializers \
-Wno-parentheses -Wno-missing-braces \
-Wmissing-prototypes -Wfloat-equal \
-Wwrite-strings -Wpointer-arith -Wcast-align \
-Wnull-dereference \
-Werror=multichar -Werror=sizeof-pointer-memaccess -Werror=return-type \
-fstrict-aliasing
CFLAGS = $(CFLAGSW_GCC) $(CFLAGS0) $(CFLAGS1)
.PHONY: all
all: bcd2a bcd2asc a2bcd memchr memrchr memcmp strlen strlen_small
bcd2a: bcd2ascii.o start_bcd2a.o
$(LD) $(LDFLAGS) $^ -o $@
TEMP += bcd2a bcd2ascii.o start_bcd2a.o
bcd2asc: bcd2ascii.o main_bcd2a.o
$(CC) $(LDFLAGS) $^ -o $@
TEMP += bcd2asc main_bcd2a.o
a2bcd: ascii2bcd.o main_a2bcd.o
$(CC) $(LDFLAGS) $^ -o $@
TEMP += a2bcd ascii2bcd.o main_a2bcd.o
memchr: main_memchr.o memchr.o mempchr.o
$(CC) $(LDFLAGS) $^ -o $@
TEMP += memchr main_memchr.o memchr.o mempchr.o
memrchr: main_memrchr.o memrchr.o
$(CC) $(LDFLAGS) $^ -o $@
TEMP += memrchr main_memrchr.o memrchr.o
memcmp: main_memcmp.o memcmp.o
$(CC) $(LDFLAGS) $^ -o $@
TEMP += memcmp main_memcmp.o memcmp.o
strlen: main_strlen.o rawmemchr.o strlen.o
$(CC) $(LDFLAGS) $^ -o $@
TEMP += strlen main_strlen.o rawmemchr.o strlen.o
strlen_small: main_strlen.o rawmemchr.o strlen_small.o
$(CC) $(LDFLAGS) $^ -o $@
TEMP += strlen_small strlen_small.o
.PHONY: clean
clean:
rm -f $(TEMP)