summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 23 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 19021376..1ded0c8a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
+build_dir := build
+
.PHONY: all
all:
@echo "Make what specifically?"
@echo "The most common target is 'iso'"
-.PHONY: iso
-iso:
+.PHONY: prepare
+prepare:
@echo "Starting VyOS ISO image build"
@scripts/check-build-env
@@ -13,6 +15,23 @@ iso:
@scripts/live-build-config
cp -r data/includes.chroot/* build/config/includes.chroot/
- @echo "The rest is not yet implemented ;)"
+.PHONY: iso
+.ONESHELL:
+iso: prepare
+ @echo "It's not like I'm building this specially for you or anything!"
+ cd $(build_dir)
+ lb build 2>&1 | tee build.log
+ @echo "VyOS ISO build successful"
+
+.PHONY: clean
+.ONESHELL:
+clean:
+ cd $(build_dir)
+ lb clean
+
+ rm -f config/binary config/bootstrap config/chroot config/common config/source
+ rm -f build.log
- @echo "ISO build successful"
+.PHONY: purge
+purge:
+ rm -rf build/*