-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
executable file
·36 lines (23 loc) · 917 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
OBJECTS = sha-256.o ScatterCache.o SACache.o CacheHierarchy.o SplitCache.o RMapper.o GenericCache.o CacheMemory.o RSHA256.o RAES_NI.o RSASS_AES_NI.o RCAT.o RP_LRU.o RP_PLRU.o RP_BIP.o RP_QLRU.o RP_RANDOM.o
DEBUG_FLAG = -DNDEBUG
ifeq ($(DEBUG), 1)
DEBUG_FLAG =
endif
FLAGS = -Wall -O3 -g -Wno-unused-variable -std=c++17 $(DEBUG_FLAG)
all: objects
objects: $(OBJECTS)
ScatterCache.o: ScatterCache.cpp sha-256.o NoisyCache.h ScatterCache.h Cache.h
g++ $(FLAGS) -c $(basename $@).cpp
sha-256.o: sha-256.c sha-256.h
gcc -Wall -O3 -std=gnu11 -c $(basename $@).c
RAES_NI.o: RAES_NI.cpp
g++ $(FLAGS) -msse2 -march=native -maes -c $<
RSASS_AES_NI.o: RSASS_AES_NI.cpp
g++ $(FLAGS) -msse2 -march=native -maes -c $<
%.o: %.cpp %.h RPolicy.h NoisyCache.h Cache.h
g++ $(FLAGS) -c $(basename $@).cpp
%: %.cpp $(OBJECTS)
g++ $(OBJECTS) $(FLAGS) -o [email protected] [email protected] -lpthread
.PHONY: clean
clean:
rm -f sim *.o *.x