summaryrefslogtreecommitdiff
path: root/ns3-simulations/nix/simulator/Makefile
diff options
context:
space:
mode:
authorLoic Guegan <manzerberdes@gmx.com>2019-05-04 11:52:18 +0200
committerLoic Guegan <manzerberdes@gmx.com>2019-05-04 11:52:18 +0200
commitf9d8e59ebbd697948f718f295bafa492f2d0947c (patch)
tree48afa04c008a537476d3b70081385baa83cb952a /ns3-simulations/nix/simulator/Makefile
parentbc6b033b0b622234e9be24b45e25f70ef8f76829 (diff)
Simplify nix source code
Diffstat (limited to 'ns3-simulations/nix/simulator/Makefile')
-rw-r--r--ns3-simulations/nix/simulator/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/ns3-simulations/nix/simulator/Makefile b/ns3-simulations/nix/simulator/Makefile
new file mode 100644
index 0000000..ffe03a4
--- /dev/null
+++ b/ns3-simulations/nix/simulator/Makefile
@@ -0,0 +1,26 @@
+
+EXEC=simulator
+
+##### NS3 g++ Arguments
+NS3_ARGS= -D NS3_LOG_ENABLE -L ${NS3_PATH}/lib -I ${NS3_PATH}/include
+NS3_ARGS+=$(addprefix -l, $(subst lib,,$(subst .so,,$(notdir $(wildcard ${NS3_PATH}/lib/libns3*.so)))))
+NS3_VERSION="3.29"
+
+
+##### 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++ -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}:${NIX}/lib\e[0m"
+
+clean:
+ - rm $(EXEC)
+
+
+.PHONY: clean