FILES = $(wildcard ./*) SRCS = $(filter %.c,$(FILES)) BINS = $(SRCS:%.c=%.elf) CFLAGS = -Wall -Werror -pedantic -Wno-unused -D_GNU_SOURCE -std=gnu2y\ -O3 -g -Ttext=C475000 -static -nostartfiles -fno-stack-protector -march=native all: $(BINS) %.elf: %.c gcc-tree -o $@ $(CFLAGS) $< clean: rm ./*.elf