diff --git a/Makefile b/Makefile index 58c29a5..b754389 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ EXEC := simulator -SG_LIBS := ./libs/simgrid/build/lib -SG_INC := -I ./libs/simgrid/build/include -I ./libs/simgrid/include -I libs/rapidjson/include -CC := g++ -lsimgrid $(SG_INC) -L $(SG_LIBS) +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)) -$(EXEC): src/simulator.cc src/inputs.cc +$(EXEC): $(wildcard src/*) $(CC) $^ -o $@ run: $(EXEC) - export LD_LIBRARY_PATH=$(SG_LIBS) && ./$(EXEC) 10 --cfg=network/bandwidth-factor:1.05 --cfg=network/model:CM02 -–cfg=network/crosstraffic:0 + 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