CFLAGS = -Os -pipe -std=c99 -D_XOPEN_SOURCE=500 LDFLAGS = -lm SRCS = $(sort $(wildcard *.c)) OBJS = $(SRCS:.c=.o) BINS = bench .PHONY: all clean all: $(BINS) clean: rm -f $(BINS) rm -f $(OBJS) bench: $(OBJS) $(CC) $(LDFLAGS) $^ -o $@ %.o: %.c $(CC) $(CFLAGS) -c $< -o $@