1 CC ?= gcc 2 LD = $(CC) 3 BIN := tun 4 SRCS := tun.c 5 CFLAGS := -std=c11 6 LDFLAGS := ~/src/honggfuzz/libhfuzz/libhfuzz.a 7 8 OBJS := $(SRCS:.c=.o) 9 10 all: $(BIN) 11 12 %.o: %.c 13 $(CC) -c $(CFLAGS) -o $@ $< 14 15 $(BIN): $(OBJS) 16 $(LD) -o $(BIN) $(OBJS) $(LDFLAGS) 17 18 .PHONY: clean 19 clean: 20 $(RM) -r core $(OBJS) $(BIN) *~ */*~ 21 22 .PHONY: indent 23 indent: 24 clang-format-4.0 -style=WebKit -i --sort-includes $(SRCS) 25