Files
docker-builder/openwrt/Makefile
Martin Kennedy e9efab3688 openwrt: Use the docker_src variable in the makefile
Note that this breaks building directly from under the openwrt/ dir,
as we need to pass through the main Makefile to pick up configuration.
2021-03-16 19:27:30 +00:00

70 lines
1.6 KiB
Makefile

define INC_NEWOPENWRT =
1
endef
$(info Defined INC_NEWOPENWRT)
# Would override other configs.
# # docker_src = /devel/docker
include ${docker_src}/docker_vars.sh
export
unexport INC_DOCKER
ifndef INC_DOCKER
include ${docker_src}/Makefile
endif
.PHONY: input
input:
rm -rf input; mkdir -p input; chmod 777 input;
.PHONY: prep-output
prep-output:
rm -rf output; mkdir output; chmod 777 output;
diffconfig:
touch $@;
input/.config: diffconfig input
cp $< $@
files/:
-rm -r $@; mkdir -p $@;
input/files/: files/
cp -r $< $@
BASE_REQS := prep-output input/.config input.sh output.sh input/files/
output: ${docker_src}/built/openwrt-builder-master.sentinel $(BASE_REQS)
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
--rm -it openwrt-builder-master make V=ssc -j ${build_threads}
output-%: ${docker_src}/built/openwrt-builder-%.sentinel $(BASE_REQS)
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
--rm -it openwrt-builder-$* make V=ssc -j ${build_threads}
debug-%: ${docker_src}/built/openwrt-builder-%.sentinel $(BASE_REQS)
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
-it openwrt-builder-$* /bin/bash
.PHONY: menuconfig
menuconfig-%: ${docker_src}/built/openwrt-builder-%.sentinel $(BASE_REQS)
docker run \
-v $$PWD/output:/output \
-v $$PWD/input:/input \
-v $$PWD/input.sh:/input.sh \
-v $$PWD/output.sh:/output.sh \
--rm -it openwrt-builder-$* make menuconfig