summaryrefslogtreecommitdiff
path: root/ns3-simulator/Makefile
diff options
context:
space:
mode:
authorLoic Guegan <manzerberdes@gmx.com>2019-04-12 16:05:29 +0200
committerLoic Guegan <manzerberdes@gmx.com>2019-04-12 16:05:29 +0200
commit32ccf612d0ee2b167204f9b6191258ae890ccd7f (patch)
tree1cebbb50f3126f0bacaabb05cd5251beb3b1c156 /ns3-simulator/Makefile
parentcb10ad2490706fc87f19ef556f36aee679887ad6 (diff)
Add ECOFEN
Diffstat (limited to 'ns3-simulator/Makefile')
-rw-r--r--ns3-simulator/Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/ns3-simulator/Makefile b/ns3-simulator/Makefile
index c2e1d35..d7bf341 100644
--- a/ns3-simulator/Makefile
+++ b/ns3-simulator/Makefile
@@ -1,20 +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)))))
+##### Source Files
SRC=main.cc modules/platform.cc modules/energy.cc modules/callbacks.cc
-EXEC=simulator
-all: $(EXEC)
-$(EXEC): $(SRC)
- g++ $(NS3_ARGS) $(SRC) -o $@
+all: $(EXEC)
-run:
- @LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${NS3_PATH}/build/lib ./wifi-test
-export:
- @echo export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NS3_PATH}/build/lib
+$(EXEC): $(SRC)
+ @echo -e "\e[32mDon't forget to define NS3_PATH env variable !\e[0m"
+ g++ $(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