C_SOURCES:=$(wildcard src/*.c) C_TARGETS:=$(patsubst src/%.c,bin/%,$(C_SOURCES)) TARGETS:=$(C_TARGETS) $(S_TARGETS) CFLAGS:=-s -Os -pedantic -Wall -Wextra all: bin $(TARGETS) bin/%: src/%.c $(CC) $(CFLAGS) -o $@ $< clean: rm bin/*