Support building with docker.

Signed-off-by: Anthony Romano <anthony.romano@coreos.com>
This commit is contained in:
Anthony Romano
2017-07-16 21:08:46 -07:00
committed by NIIBE Yutaka
parent 67acb670d1
commit d12483c3c9
5 changed files with 35 additions and 1 deletions

20
docker/Makefile Normal file
View File

@@ -0,0 +1,20 @@
ifndef GNUK_CONFIG
$(warning configuration flags not set in GNUK_CONFIG)
endif
all: ../chopstx docker-build-release
docker run --user=`id -u` --env GNUK_CONFIG --rm -v `pwd`/..:/gnuk/ -t gnuk:latest
gdb: docker-build-debug
docker run --net host --rm -i -v `pwd`/..:/gnuk/ -t gnuk:latest-debug arm-none-eabi-gdb /gnuk/src/build/gnuk.elf
../chopstx:
git submodule update --init
docker-build-release:
docker build -t gnuk:latest -f `pwd`/Dockerfile.release ..
docker-build-debug: docker-build-release
docker build -t gnuk:latest-debug -f `pwd`/Dockerfile.debug ..
.PHONY: all gdb debug docker-build docker-build-releaes docker-build-debug