diff --git a/odin/.gitignore b/odin/.gitignore new file mode 100644 index 0000000..c8cde77 --- /dev/null +++ b/odin/.gitignore @@ -0,0 +1,11 @@ +# ignore executable +bin/ +navigator + +# ignore generated documents +*.pdf + +# ignore archives +*.tar +*.tar.* +*.zip diff --git a/odin/Makefile b/odin/Makefile new file mode 100644 index 0000000..6650c71 --- /dev/null +++ b/odin/Makefile @@ -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) diff --git a/odin/src/main.odin b/odin/src/main.odin new file mode 100644 index 0000000..2b2c461 --- /dev/null +++ b/odin/src/main.odin @@ -0,0 +1,16 @@ +package test_project + +import "core:os" +import "core:fmt" + +main :: proc() +{ + if 1 >= len( os.args ) do return; + switch os.args[ 1 ] + { + case `push`: + fmt.println( "push stuff around" ); + case `pop`: + fmt.println( "pop the balloos" ); + } +}