1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
CFLAGS = -D_POSIX_C_SOURCE=200809L -std=c99 -Os -Wall SRCS = $(sort $(wildcard *.c)) OBJS = $(SRCS:.c=.o) all: latency clean: rm -f latency rm -f $(OBJS) latency: $(OBJS) $(CC) $(CFLAGS) $^ -o $@ %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ .PHONY: all clean