summaryrefslogtreecommitdiff
path: root/Simulator/makefile
blob: 52386dab5ed082cab6492f53bee8c4c0c39ef30b (plain)
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
CXX=g++-6
CC=gcc-6

CFLAGS = -std=c++14 -Iinclude -lpthread -ldl

SOURCE=\
sqlite3.o\
src/Simulator.cpp\
src/database/Database.cpp \
src/simulation/workloads/Workload.cpp\
src/simulation/workloads/WorkloadPool.cpp\
src/modeling/machine/CPU.cpp\
src/modeling/machine/GPU.cpp\
src/modeling/machine/Machine.cpp\
src/modeling/Entity.cpp\
src/modeling/Rack.cpp

all: sqlite simulator

clean:
	rm -rf simulator external/

simulator:
	$(CXX) -o simulator -Iexternal $(SOURCE) $(CFLAGS)

sqlite:
	cd ../external/sqlite ; \
	git rev-parse --git-dir >/dev/null || exit 1 ; \
	git log -1 --format=format:%ci%n | sed -e 's/ [-+].*$//;s/ /T/;s/^/D /' > manifest ; \
	echo $(git log -1 --format=format:%H) > manifest.uuid
	mkdir external
	cd external ; \
	./../../external/sqlite/configure --disable-tcl ; \
	make sqlite3.o
	mv external/sqlite3.o sqlite3.o
	rm -rf external/

.PHONY: all, clean