diff options
author | iurii plugatarov <[email protected]> | 2024-08-16 10:43:03 +0200 |
---|---|---|
committer | iurii plugatarov <[email protected]> | 2024-08-16 10:43:03 +0200 |
commit | 586369b63cdede5fa09f5f9ed73abde6c8264425 (patch) | |
tree | 41e47e4dedfa9abebd3eacca4f035c38dcce62d6 /Makefile | |
download | funhalla-586369b63cdede5fa09f5f9ed73abde6c8264425.tar.gz |
start
Diffstat (limited to '')
-rw-r--r-- | Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5f97b46 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +# Define the compiler and flags +ODIN = odin +SRC_DIR = src +OUT_DIR_DEBUG = out/debug +OUT_DIR_RELEASE = out/release +PROGRAM_NAME = funhalla + +# Define the build targets +all: debug release + +debug: $(OUT_DIR_DEBUG)/$(PROGRAM_NAME) + +release: $(OUT_DIR_RELEASE)/$(PROGRAM_NAME) + +# Rule for building the debug version +$(OUT_DIR_DEBUG)/$(PROGRAM_NAME): $(SRC_DIR)/*.odin + @mkdir -p $(OUT_DIR_DEBUG) + $(ODIN) build $(SRC_DIR) -out:$(OUT_DIR_DEBUG)/$(PROGRAM_NAME) --debug + +# Rule for building the release version +$(OUT_DIR_RELEASE)/$(PROGRAM_NAME): $(SRC_DIR)/*.odin + @mkdir -p $(OUT_DIR_RELEASE) + $(ODIN) build $(SRC_DIR) -out:$(OUT_DIR_RELEASE)/$(PROGRAM_NAME) + +# Clean up build artifacts +clean: + rm -rf $(OUT_DIR_DEBUG) $(OUT_DIR_RELEASE) + +.PHONY: all debug release clean |