Skip to content

Commit 3e3b2e5

Browse files
fix: Makefile auto-detects Termux and sets GOOS=linux
Termux reports GOOS=android but Go has no android/arm64 toolchain. The Makefile now detects /data/data/com.termux and exports GOOS=linux so 'make build' works out of the box on Android/Termux. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9d623ba commit 3e3b2e5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ BUILTIN_SKILLS_DIR=$(CURDIR)/skills
3232
UNAME_S:=$(shell uname -s)
3333
UNAME_M:=$(shell uname -m)
3434

35+
# Termux detection: Termux reports GOOS=android but is effectively Linux
36+
IS_TERMUX:=$(shell test -d /data/data/com.termux && echo yes)
37+
3538
# Platform-specific settings
3639
ifeq ($(UNAME_S),Linux)
3740
PLATFORM=linux
@@ -60,6 +63,12 @@ else
6063
ARCH=$(UNAME_M)
6164
endif
6265

66+
# On Termux, force GOOS=linux (Go has no android/arm64 toolchain)
67+
ifeq ($(IS_TERMUX),yes)
68+
export GOOS=linux
69+
PLATFORM=linux
70+
endif
71+
6372
BINARY_PATH=$(BUILD_DIR)/$(BINARY_NAME)-$(PLATFORM)-$(ARCH)
6473

6574
# Default target

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ make build
189189

190190
This compiles V1Claw into a single file. It takes 2-5 minutes on a phone. When it finishes, you'll see a file at `build/v1claw-linux-arm64`.
191191

192+
> 💡 The Makefile auto-detects Termux and handles everything for you. No extra flags needed.
193+
192194
#### Step 6: Run first-time setup
193195

194196
```bash

0 commit comments

Comments
 (0)