-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (38 loc) · 999 Bytes
/
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
#cc = gcc
#prom = main
#deph = benchmark.h
#obj = main.o list_search_sort.o matrix.o conv.o
#source = main.c list_search_sort.c matrix.c conv.c
CC = gcc -static
ACC = aarch64-linux-gnu-gcc -static
RCC = riscv64-linux-gnu-gcc -static
OUTFLAG = -o
CORE_FILES = list_search_sort conv main matrix
ORIG_SRCS = $(addsuffix .c, $(CORE_FILES))
OBJS = $(addsuffix .o,$(CORE_FILES))
OUTFILE_X86 = iotbench-x86-$(SID)
OUTFILE_RISCV = iotbench-RISCV-$(SID)
OUTFILE_ARM = iotbench-ARM-$(SID)
HEADERS = benchmark.h
.PHONY: riscv
riscv:
$(RCC) $(OUTFLAG) $(OUTFILE_RISCV) $(ORIG_SRCS)
#%.o:%.c $(HEADERS)
# $(RCC) -c $< $(OUTFLAG) $@
.PHONY: arm
arm:
$(ACC) $(OUTFLAG) $(OUTFILE_ARM) $(ORIG_SRCS)
#%.o:%.c $(HEADERS)
# $(ACC) -c $< $(OUTFLAG) $@
.PHONY: x86
x86:
$(CC) $(OUTFLAG) $(OUTFILE_X86) $(ORIG_SRCS)
#$(prom):$(obj)
# $(cc) -o $(prom) $(obj)
#%.o:%.c $(deps)
# gcc -c $< -o $@
.PHONY: clean
clean:
rm -f $(OUTFILE_ARM) $(OUTFILE_RISCV) $(OUTFILE_X86)
#clean:
# rm -rf $(obj) $(prom)