diff options
author | Ivan Zorin <[email protected]> | 2023-07-31 03:06:57 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-31 10:06:57 +1000 |
commit | e0f373a88a4e9badea76e518551769e7a8d23b97 (patch) | |
tree | eb38ccd5547ace47ed5b0d28a9cdb98359c2cca0 /Makefile | |
parent | 05d0ef66efea296ada9219d677e0d27f2f48a9e1 (diff) | |
download | IronOS-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-- | Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -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
|