-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
40 lines (30 loc) · 935 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
MAKE = make
CXX = g++
CXXFLAGS = --std=c++11 -O2 -g -I. -fPIC
TARGETS = \
test/cache-test \
test/test-eviction-tar-ran \
OBJECTS = \
cache/cache.o \
cache/replace.o \
attack/search.o \
attack/create.o \
attack/traverse.o \
util/statistics.o \
util/query.o \
util/random.o \
util/report.o \
util/cache_config_parser.o \
util/traverse_config_parser.o \
HEADERS = $(wildcard cache/*.hpp) $(wildcard attack/*.hpp) $(wildcard util/*.hpp)
all: $(TARGETS) libcache_model.a
datagen/librandomgen.a:
$(MAKE) -C datagen $(filename $@)
$(OBJECTS): %.o:%.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) -c $< -o $@
$(TARGETS): test/% : test/%.cpp $(OBJECTS) test/common.hpp datagen/librandomgen.a
$(CXX) $(CXXFLAGS) $^ -o $@
libcache_model.a: cache/replace.o cache/cache.o util/query.o util/random.o util/report.o util/cache_config_parser.o util/traverse_config_parser.o
ar rvs $@ $^
clean:
-rm $(TARGETS) $(OBJECTS) libcache_model.*