Package builder

This commit is contained in:
2026-03-01 16:33:00 +11:00
parent 38473f0e01
commit 40e0aec0d4

View File

@@ -4,6 +4,7 @@ LDFLAGS = -lgroundvm
BUILD_DIR = build
SRC_DIR = src
LIBS_DIR = libs
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
@@ -28,6 +29,14 @@ install: $(TARGET)
install -d $(LIBDIR)
cp -r libs/* $(LIBDIR)/solstice
$(BUILD_DIR)/solstice.tar.gz: $(TARGET) $(LIBS_DIR)
mkdir -p $(BUILD_DIR)/pkg/bin $(BUILD_DIR)/pkg/lib/
cp $(TARGET) $(BUILD_DIR)/pkg/bin/solstice
cp -r $(LIBS_DIR) $(BUILD_DIR)/pkg/lib/solstice
tar -czvf $(BUILD_DIR)/solstice.tar.gz $(BUILD_DIR)/pkg
package: $(BUILD_DIR)/solstice.tar.gz
$(BUILD_DIR):
mkdir -p $(BUILD_DIR) $(BUILD_DIR)/codegen $(BUILD_DIR)/lexer $(BUILD_DIR)/parser