-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
28 lines (20 loc) · 865 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
# --------------------------------------------------------------------
CC = gcc
CFLAGS = -Wall -Wextra -O3 -funroll-loops -fno-stack-protector -mfpu=neon -marm
CFLAGS += -D NUM_SHARES=$(NUM_SHARES) -D NUM_BLOCKS=$(NUM_BLOCKS)
# NUM_SHARES selects the masking order
# NUM_BLOCKS selects the number of blocks that are processed in parallel
# Possible combinations: 1x4, 2x4, 1x8
NUM_SHARES ?= 4
NUM_BLOCKS ?= 2
# --------------------------------------------------------------------
SOURCES = aes_shared_$(NUM_BLOCKS)x$(NUM_SHARES)s.s common.c cpucycles.c
TARGETS = analysis benchmark
analysis: CFLAGS += -Wa,--defsym,ANALYSIS=1
# --------------------------------------------------------------------
.PHONY: all clean
all: $(TARGETS)
$(TARGETS): %:%.c $(SOURCES)
$(CC) $(CFLAGS) $^ -o $@
clean:
rm -rf $(TARGETS)