CROSS_COMPILE ?= arm-rockchip830-linux-uclibcgnueabihf-
# 本仓库工具链(WSL2 原生)未在 PATH 时自动加入; 与根 Makefile 同约定
ifneq ($(wildcard $(CURDIR)/../toolchain/bin),)
export PATH := $(CURDIR)/../toolchain/bin:$(PATH)
endif
ifeq ($(strip $(CROSS_COMPILE)),)
$(error CROSS_COMPILE 为空 — 本项目 make 只做 ARM 交叉编译, 不允许宿主机编译器)
endif
CC      := $(CROSS_COMPILE)gcc
CFLAGS  ?= -O2 -Wall -Wextra

all: hello

hello: hello.c
	$(CC) $(CFLAGS) -o $@ $<

clean:
	rm -f hello

.PHONY: all clean
