summaryrefslogtreecommitdiff
path: root/simulations/Makefile
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-11-11 15:47:19 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-11-11 15:47:19 +0100
commitc2affb00ff404613f45b51cd97b50773982fde5f (patch)
tree9a1263afec087c958b32d2ad48e691fc69db0df6 /simulations/Makefile
parentb2ad7e6897077899ce70ecc8a4d994b3adc010ae (diff)
Minor changes
Diffstat (limited to 'simulations/Makefile')
-rw-r--r--simulations/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/simulations/Makefile b/simulations/Makefile
new file mode 100644
index 0000000..3ed792d
--- /dev/null
+++ b/simulations/Makefile
@@ -0,0 +1,19 @@
+EXEC := simulator
+LIBS := ./libs/simgrid/build/lib
+INCLUDES := ./libs/simgrid/build/include ./libs/simgrid/include libs/rapidjson/include
+SCENARIOS := src/scenarios.cc
+CC := g++ $(addprefix -L , $(LIBS)) $(addprefix -I , $(INCLUDES))
+
+all: $(EXEC) $(basename $(notdir $(SCENARIOS)))
+
+$(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) $(basename $(notdir $(SCENARIOS))) \ No newline at end of file