-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
57 lines (41 loc) · 1.57 KB
/
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
50
51
52
53
54
55
56
57
CPPFLAGS += -I include -I testu01/include
CPPFLAGS += -g -O3
CPPFLAGS += -std=c++11 -pthread
LDLIBS += -ltbb
PROBDIST_SRC = $(wildcard testu01/probdist/*.cpp)
TESTU01_SRC = $(filter-out testu01/testu01/scatter.cpp, $(wildcard testu01/testu01/*.cpp))
MYLIB_SRC = $(filter-out testu01/mylib/tcode.cpp, $(wildcard testu01/mylib/*.cpp) )
lib/probdist.a : $(patsubst %.cpp,%.o,$(PROBDIST_SRC))
mkdir -p lib
-rm -f $@
ar rcs $@ $^
ranlib $@
lib/mylib.a : $(patsubst %.cpp,%.o,$(MYLIB_SRC))
mkdir -p lib
-rm -f $@
ar rcs $@ $^
ranlib $@
lib/testu01.a : $(patsubst %.cpp,%.o,$(TESTU01_SRC))
mkdir -p lib
-rm -f $@
ar rcs $@ $^
ranlib $@
TESTU01_LIBS = lib/testu01.a lib/mylib.a lib/probdist.a
DRIVERS := $(patsubst drivers/driver_%.cpp,%,$(wildcard drivers/*.cpp))
WORKLOADS := $(patsubst workloads/workload_%.cpp,%,$(wildcard workloads/*.cpp))
bin/certify_% : drivers/driver_certify.cpp workloads/workload_%.cpp $(TESTU01_LIBS)
mkdir -p bin
g++ $(CPPFLAGS) -o $@ $(LDFLAGS) $< workloads/workload_$*.cpp $(TESTU01_LIBS) $(LDLIBS)
bin/stress_% : drivers/driver_stress.cpp workloads/workload_%.cpp $(TESTU01_LIBS)
mkdir -p bin
g++ $(CPPFLAGS) -o $@ $(LDFLAGS) $< workloads/workload_$*.cpp $(TESTU01_LIBS) $(LDLIBS)
bin/search_% : drivers/driver_search.cpp workloads/workload_%.cpp $(TESTU01_LIBS)
mkdir -p bin
g++ $(CPPFLAGS) -o $@ $(LDFLAGS) $< workloads/workload_$*.cpp $(TESTU01_LIBS) $(LDLIBS)
print_all_drivers:
echo $(DRIVERS)
print_all_workloads:
echo $(WORKLOADS)
print_all_driver_workloads :
echo $(ALL_DRIVER_WORLOADS)
all : bin/stress_std bin/search_std bin/certify_std