aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorIvan Zorin <[email protected]>2023-07-31 03:06:57 +0300
committerGitHub <[email protected]>2023-07-31 10:06:57 +1000
commite0f373a88a4e9badea76e518551769e7a8d23b97 (patch)
treeeb38ccd5547ace47ed5b0d28a9cdb98359c2cca0 /Makefile
parent05d0ef66efea296ada9219d677e0d27f2f48a9e1 (diff)
downloadIronOS-e0f373a88a4e9badea76e518551769e7a8d23b97.tar.gz
IronOS-e0f373a88a4e9badea76e518551769e7a8d23b97.zip
Decomission of scripts/ci (#1760)
* Decomission of scripts/ci * Code review * Update .gitignore according to changes for code review
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 21 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3f9f7498..3c664950 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,14 @@ ifndef MKDOCS
MKDOCS:=mkdocs
endif
+# build output related directories
+ifdef OUT
+OUT_DIR=$(OUT)
+else
+OUT_DIR=$(CURDIR)/BUILDS
+endif
+OUT_HEX=$(CURDIR)/source/Hexfile
+
### global static variables
@@ -105,7 +113,7 @@ docker-shell: docker-check $(DOCKER_DEPS)
# former build.sh
docker-build: docker-check $(DOCKER_DEPS)
- $(DOCKER_CMD) /bin/bash /build/ci/buildAll.sh
+ $(DOCKER_CMD) make build-all
# delete container
docker-clean: docker-check
@@ -157,6 +165,17 @@ tests: test-md test-sh test-py test-ccpp
@echo "All tests & checks have been completed successfully."
@echo ""
+# former scripts/ci/buildAll.sh - all in one to build all firmware & place the produced binaries into one output directory
+build-all:
+ @mkdir -p $(OUT_DIR)
+ @chmod 0777 $(OUT_DIR)
+ cd source && bash ./build.sh
+ @echo "All Firmware built"
+ @cp -r $(OUT_HEX)/*.bin $(OUT_DIR)
+ @cp -r $(OUT_HEX)/*.hex $(OUT_DIR)
+ @cp -r $(OUT_HEX)/*.dfu $(OUT_DIR)
+ @echo "Resulting output directory: $(OUT_DIR)"
+
# pass-through target for Makefile inside source/ dir
%:
$(MAKE) -C source/ $@
@@ -166,6 +185,7 @@ clean-build:
$(MAKE) -C source/ clean-all
rm -Rf site
rm -Rf scripts/ci/artefacts
+ rm -Rf $(OUT_DIR)
# global clean-up target
clean-full: clean-build docker-clean