From 89d815f81ec2d928feab2296bb29dc085b4d2d69 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 26 Apr 2019 11:13:36 +0200 Subject: Debug+Do Simulations --- ns3-simulations/simulator/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ns3-simulations/simulator/Makefile (limited to 'ns3-simulations/simulator/Makefile') diff --git a/ns3-simulations/simulator/Makefile b/ns3-simulations/simulator/Makefile new file mode 100644 index 0000000..a9cee83 --- /dev/null +++ b/ns3-simulations/simulator/Makefile @@ -0,0 +1,25 @@ + +EXEC=simulator + +##### NS3 g++ Arguments +NS3_ARGS= -D NS3_LOG_ENABLE -L ${NS3_PATH}/build/lib -I ${NS3_PATH}/build/ +NS3_ARGS+=$(addprefix -l, $(subst lib,,$(subst .so,,$(notdir $(wildcard ${NS3_PATH}/build/lib/*.so))))) +NS3_VERSION=$(shell cat ${NS3_PATH}/VERSION) + +##### Source Files +SRC=main.cc modules/platform.cc modules/energy.cc modules/callbacks.cc + + +all: $(EXEC) + +$(EXEC): $(SRC) + @echo -e "\e[32mDon't forget to define NS3_PATH env variable !\e[0m" + g++ -D NS3_VERSION=${NS3_VERSION} $(NS3_ARGS) $(SRC) -o $@ + @echo -e "\e[32mRun the following command before running $(EXEC):\e[0m" + @echo -e "\e[32mexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NS3_PATH}/build/lib\e[0m" + +clean: + - rm $(EXEC) + + +.PHONY: clean -- cgit v1.2.3