-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (33 loc) · 1.06 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
# makefile
IDIR = include
PIDIR = ../simcon/include
CC = g++
DEBUG = -g
PROFILE =
CFLAGS = -Wall -c $(DEBUG) -I$(IDIR) -I$(PIDIR) $(PROFILE)
SDIR = src
ODIR = bin
PODIR = ../simcon/bin
LIBS = -lm
_DEPS = event.h simulation.h vm.h common.h lcgrand.h simsdata.h staticmap.h
_PDEPS = simdata.h utils.h algo.h stateIterator.h state.h config.h policy.h khanna.h mdp.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) $(patsubst %,$(PIDIR)/%,$(_PDEPS))
_OBJ = event.o vm.o simulation.o common.o lcgrand.o simsdata.o staticmap.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
_POBJ = simdata.o utils.o algo.o stateIterator.o state.o policy.o khanna.o mdp.o
POBJ = $(patsubst %,$(PODIR)/%,$(_POBJ))
$(ODIR)/%.o: $(SDIR)/%.cpp $(DEPS)
$(CC) $(CFLAGS) -o $@ $<
all: dir $(ODIR)/sim
dir:
mkdir -p $(ODIR)
$(ODIR)/sim: $(OBJ) $(POBJ)
$(CC) $(LIBS) -I$(IDIR) -I$(PIDIR) -o $@ $^ $(SDIR)/main.cpp $(PROFILE)
clean:
rm -rf $(ODIR) *~ $(INCDIR)/*~
distclean: clean
rm -f results/*.txt
rm -f results/*.pdf
plot:
cd results && gnuplot service_time_plot.p response_time_plot.p phase_plot.p
.PHONY: clean