aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-05-08 13:38:43 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-05-08 13:38:43 +0200
commit8b7b9c9e0a3f0a2f2c5ff4d516a640002b5f1891 (patch)
treea3015db67227edc97b9ed8876e809832ef43d7ed /Makefile
parent66ba2be4eda2b0d8a5642390c3df4a11d95e3a71 (diff)
Add scenarios tool
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index b754389..3ed792d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,19 @@
EXEC := simulator
LIBS := ./libs/simgrid/build/lib
INCLUDES := ./libs/simgrid/build/include ./libs/simgrid/include libs/rapidjson/include
-CC := g++ -lsimgrid $(addprefix -L , $(LIBS)) $(addprefix -I , $(INCLUDES))
+SCENARIOS := src/scenarios.cc
+CC := g++ $(addprefix -L , $(LIBS)) $(addprefix -I , $(INCLUDES))
+all: $(EXEC) $(basename $(notdir $(SCENARIOS)))
-$(EXEC): $(wildcard src/*)
+$(EXEC): $(filter-out $(SCENARIOS), $(wildcard src/*))
+ $(CC) -lsimgrid $^ -o $@
+
+$(basename $(notdir $(SCENARIOS))): $(SCENARIOS)
$(CC) $^ -o $@
run: $(EXEC)
export LD_LIBRARY_PATH=$(addprefix :, $(LIBS)) && ./$(EXEC) 10 --cfg=network/bandwidth-factor:1.05 --cfg=network/model:CM02 -–cfg=network/crosstraffic:0
clean:
- -rm $(EXEC) \ No newline at end of file
+ -rm $(EXEC) $(basename $(notdir $(SCENARIOS))) \ No newline at end of file