aboutsummaryrefslogtreecommitdiff
path: root/examples/linux_kernel_ip/Makefile
blob: 7a9530cd81f6c71fe7438302634a479be8458d5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
CC ?= gcc
LD = $(CC)
BIN := tun
SRCS := tun.c
CFLAGS := -std=c11
LDFLAGS := ~/src/honggfuzz/libhfuzz/libhfuzz.a

OBJS := $(SRCS:.c=.o)

all: $(BIN)

%.o: %.c
	$(CC) -c $(CFLAGS) -o $@ $<

$(BIN): $(OBJS)
	$(LD) -o $(BIN) $(OBJS) $(LDFLAGS)

.PHONY: clean
clean:
	$(RM) -r core $(OBJS) $(BIN) *~ */*~

.PHONY: indent
indent:
	clang-format-4.0 -style=WebKit -i --sort-includes $(SRCS)