Simplify nix source code

This commit is contained in:
Loic Guegan 2019-05-04 11:52:18 +02:00
parent bc6b033b0b
commit f9d8e59ebb
9 changed files with 57 additions and 58 deletions

View file

@ -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