CFLAGS = -Os -pipe -std=c99 -D_POSIX_C_SOURCE=200809L LDFLAGS = SRCS = $(sort $(wildcard src/*.c)) DATA = $(sort $(wildcard src/*.bin)) OBJS = $(SRCS:.c=.o) $(DATA:.bin=.o) BINS = bin/satmkboot .PHONY: all clean all: $(BINS) clean: rm -f $(BINS) rm -f $(OBJS) bin/satmkboot: \ src/satmkboot.o \ src/securitycode.o \ src/symbols.o %.c: %.bin tools/bin2c $< > $@ %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ %: $(CC) $(LDFLAGS) $^ -o $@