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