forked from VerticalResearchGroup/microbench
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmake.rules
More file actions
42 lines (28 loc) · 795 Bytes
/
make.rules
File metadata and controls
42 lines (28 loc) · 795 Bytes
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
include ../make.config
CC_X86?=gcc
CC_ARM?=arm-linux-gnueabi-gcc
CC_RISCV?=~/opt/riscv/bin/riscv64-unknown-elf-gcc
OPT?=-O3
#-fno-tree-vectorize
CFLAGS+=${OPT} -I../
default: benchX86
all: benchX86 benchARM benchRISCV
X86: benchX86
ARM: benchARM
RISCV: benchRISCV
ifneq ("$(wildcard rand_arr_args.txt)","")
args := $(shell cat rand_arr_args.txt)
randArr.h: rand_arr_args.txt
${PY} ../rand_c_arr.py $(args)
pre_req: randArr.h
else
pre_req:
endif
benchX86: bench.c pre_req
${CC_X86} ${CFLAGS} -DMAGIC bench.c --static --std=c99 -lm -o bench.X86
benchARM: bench.c pre_req
${CC_ARM} ${CFLAGS} bench.c --static --std=c99 -lm -o bench.ARM
benchRISCV: bench.c pre_req
${CC_RISCV} ${CFLAGS} bench.c --static --std=c99 -lm -o bench.RISCV
clean:
rm -f bench.X86 bench.ARM bench.RISCV