init: Dockerfile and Makefile

This commit is contained in:
Tim Schubert 2020-06-01 21:06:11 +02:00
commit 07d5199d60
No known key found for this signature in database
GPG key ID: 99658A3EB5CD7C13
4 changed files with 111 additions and 0 deletions

23
Makefile Normal file
View file

@ -0,0 +1,23 @@
.PHONY: configure build docker-build-image all build configure clean test
DOCKER_RUN=docker run -it --mount type=bind,source="$(PWD)"/bake,target=/usr/bake ns-3-leo
all: docker-build docker-run
docker-build-image: docker/Dockerfile
cd docker && docker build -t ns-3-leo .
bake:
git clone https://gitlab.com/nsnam/bake.git
configure: docker-build-image bake
$(DOCKER_RUN) /bin/bash -c './bake.py configure -e ns-3-leo && ./bake.py check && ./bake.py download'
build: docker-build-image bake
$(DOCKER_RUN) ./bake.py build -vvv
clean: docker-build-image
$(DOCKER_RUN) ./bake.py clean
test: docker-build-image
$(DOCKER_RUN) /bin/bash -c 'cd source/ns-3-leo/ && ./test.py'