2019-03-09 01:12:03 +00:00
|
|
|
DOCKER_TAG ?= multiarch-test-${USER}
|
|
|
|
|
|
|
|
.PHONY: default
|
|
|
|
default: test
|
|
|
|
|
|
|
|
.PHONY:test
|
|
|
|
test:
|
|
|
|
@echo ok
|
|
|
|
|
|
|
|
.PHONY: build
|
2019-03-10 22:37:45 +00:00
|
|
|
build: build/qemu-x86_64-static
|
2019-03-09 01:12:03 +00:00
|
|
|
docker build . -t ${DOCKER_TAG}
|
|
|
|
|
|
|
|
build/qemu-arm-static:
|
2019-03-10 22:37:45 +00:00
|
|
|
./get_qemu2.sh arm
|
2019-03-09 01:12:03 +00:00
|
|
|
|
|
|
|
build/qemu-x86_64-static:
|
2019-03-10 22:37:45 +00:00
|
|
|
./get_qemu2.sh x86_64
|
2019-03-09 01:12:03 +00:00
|
|
|
|
|
|
|
build/qemu-aarch64-static:
|
2019-03-10 22:37:45 +00:00
|
|
|
./get_qemu2.sh aarch64
|
2019-03-09 01:12:03 +00:00
|
|
|
|
|
|
|
.PHONY: cross-build-arm
|
2019-03-10 22:37:45 +00:00
|
|
|
cross-build-arm: build/qemu-arm-static
|
2019-03-09 01:12:03 +00:00
|
|
|
docker build --build-arg REPO=arm32v6 --build-arg ARCH=arm . -t ${DOCKER_TAG}-arm32v6
|
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run: build
|
|
|
|
docker run ${DOCKER_TAG}
|
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
cross-run-arm: cross-build-arm
|
|
|
|
docker run --rm ${DOCKER_TAG}-arm32v6
|