aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2024-02-22 23:16:13 -0600
committerNic Gaffney <gaffney_nic@protonmail.com>2024-02-22 23:16:13 -0600
commita265979640a6b2bf20592c96ae1910b7dc93809a (patch)
tree57b1e6f0500985a151056ab9cb2b079ce2ee2e87 /Makefile
parent8873d14c69ba8f22db794838845c01a044aabaa4 (diff)
downloadgftos-a265979640a6b2bf20592c96ae1910b7dc93809a.tar.gz
Added easy distribution through make
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a7285e3..7ea4e27 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,10 @@ BUILD = build
BOCHS = bochs
TESTS = tests
TEST = $(TESTS)/debug.rc
+BOCHSRC = $(TESTS)/bochsrc
TARGET = i686-elf
ISO = gftos
+DIST = $(ISO).tgz
# Define source files
ASM := $(sort $(shell find $(SRC) -name '*.s'))
@@ -64,7 +66,7 @@ run: all
# Generate logfiles using bochs
test: all
@mkdir -p $(BOCHS)
- @bochs -f .bochsrc -q -rc $(TEST) > /dev/null 2>&1
+ @bochs -f $(BOCHSRC) -q -rc $(TEST) > /dev/null 2>&1
@echo "BOCHS \t$(TEST)"
.PHONY: clean
@@ -81,11 +83,19 @@ clean:
@echo "RM \t$(OUT_DIR)/isodir/boot/$(ISO).bin"
@rm -rf $(BUILD)
@echo "RM \t$(BUILD)"
+ @rm -rf $(DIST)
+ @echo "RM \t$(DIST)"
.PHONY: compdb
# Generate JSON compilation database
compdb: $(BUILD)/compile_commands.json
+.PHONY: dist
+# Pack the source into a tar file
+dist: clean
+ @tar zcvf $(DIST) * >/dev/null
+ @echo "TAR \t$(DIST)"
+
# https://stackoverflow.com/a/35730928
.PHONY: help
# Show this help.