paper-lowrate-iot/ns3-simulations/simulator/Makefile

26 lines
718 B
Makefile
Raw Normal View History

2019-04-12 13:52:06 +02:00
2019-04-12 16:05:29 +02:00
EXEC=simulator
##### NS3 g++ Arguments
2019-04-12 13:52:06 +02:00
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)))))
2019-04-25 15:51:05 +02:00
NS3_VERSION=$(shell cat ${NS3_PATH}/VERSION)
2019-04-12 13:52:06 +02:00
2019-04-12 16:05:29 +02:00
##### Source Files
2019-04-12 13:52:06 +02:00
SRC=main.cc modules/platform.cc modules/energy.cc modules/callbacks.cc
2019-04-12 16:05:29 +02:00
all: $(EXEC)
2019-04-12 13:52:06 +02:00
2019-04-12 16:05:29 +02:00
$(EXEC): $(SRC)
@echo -e "\e[32mDon't forget to define NS3_PATH env variable !\e[0m"
2019-04-25 15:51:05 +02:00
g++ -D NS3_VERSION=${NS3_VERSION} $(NS3_ARGS) $(SRC) -o $@
2019-04-12 16:05:29 +02:00
@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"
2019-04-12 13:52:06 +02:00
clean:
- rm $(EXEC)
2019-04-12 16:05:29 +02:00
.PHONY: clean