(odin) added testproject for odin

This commit is contained in:
root committed 2026-10-19 14:21:09 +02:00
1 parent 4b969dfc42
commit 403d5d687e
3 files changed
+63

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
SHELL := /usr/bin/env bash
PREFIX :=
OD := $(PREFIX)odin
SRC_DIR := src
BIN_DIR := bin
MK_DIR := $(BIN_DIR)
NAME := $(shell basename "$(shell pwd)")
BINARY := $(BIN_DIR)/$(NAME)
SRC := $(shell find $(SRC) -type f -name "*.odin")
FLAGS := -target:linux_amd64
.PHONY: all build clean rebuild run test
all: $(MK_DIR) $(BINARY)
build: all
clean:
rm -rf $(MK_DIR)
rebuild: clean all
run: $(BINARY)
@$(BINARY)
$(BINARY): $(SRC)
$(OD) build $(FLAGS) -out:$(BINARY) $(SRC_DIR)
$(MK_DIR):
mkdir -p $(MK_DIR)