tuxanci2-engine
Game engine for tuxanci2
Log | Files | Refs | README | LICENSE
commit 909057f87ecc9c564f8440baf8079e53a17adc0a
parent cb2ae2f271a9c19db844295fb9f34f59c1181c3a
Author: Connor Thomson <connor@gnufault.org>
Date: Sun, 25 Oct 2026 21:27:02 -0700
Only one build in the build dir at a time
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -2,7 +2,7 @@ SELF := $(abspath $(firstword $(MAKEFILE_LIST)))
ROOT := $(patsubst %/,%,$(dir $(SELF)))
PLATFORMS := $(shell ls "$(ROOT)/platforms")
OUT_DIR := $(ROOT)/build
-OBJ_ROOT := $(ROOT)/build
+OBJ_ROOT := $(OUT_DIR)
XXD ?= xxd
@@ -23,9 +23,11 @@ ifeq ($(TA_PLATFORM),)
.PHONY: help tab clean distclean win32-installer $(PLATFORMS)
help:
- echo 'Usage: make <platform>'
+ @echo 'Usage: make <platform>'
$(PLATFORMS):
+ rm -rf "$(OUT_DIR)"
+ mkdir -p "$(OUT_DIR)"
$(MAKE) TA_PLATFORM=$@
win32-installer:
@@ -58,7 +60,7 @@ endif
.DEFAULT_GOAL := build
-OBJ := $(OBJ_ROOT)/$(TA_PLATFORM)
+OBJ := $(OBJ_ROOT)
OPT ?= -O2
BITS := $(shell getconf LONG_BIT)
@@ -457,8 +459,6 @@ endif
ifeq ($(TA_STAGE),)
.PHONY: build
build: $(TAB_FILE) $(PLATFORM_FILES)
- mkdir -p "$(OUT_DIR)"
- cp -f $(PLATFORM_FILES) "$(TAB_FILE)" "$(OUT_DIR)/"
printf '\nbuild/ ($(TA_PLATFORM)):\n'
ls -1 "$(OUT_DIR)" | sed 's/^/ /'
endif