aboutsummaryrefslogtreecommitdiff
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
parent8873d14c69ba8f22db794838845c01a044aabaa4 (diff)
downloadgftos-a265979640a6b2bf20592c96ae1910b7dc93809a.tar.gz
Added easy distribution through make
-rw-r--r--.gitignore1
-rw-r--r--Makefile12
-rw-r--r--tests/bochsrc (renamed from .bochsrc)0
3 files changed, 12 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 3fa9e7b..5eb4bc3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ out/*.iso
out/isodir/boot/*.bin
bochs/*.txt
.cache
+*.tgz
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.
diff --git a/.bochsrc b/tests/bochsrc
index f0ebff1..f0ebff1 100644
--- a/.bochsrc
+++ b/tests/bochsrc