Commit b0f7f760 authored by Joanne Hugé's avatar Joanne Hugé

Add include flags to clang command

parent fe7c3452
......@@ -21,22 +21,26 @@ else
CFLAGS = -Og -g -Wall -Wextra
endif
IFLAGS = -I $(SRCDIR)
CFLAGS += -MD -MP
CFLAGS += -I $(SRCDIR)
CFLAGS += -std=gnu99
LLIBS = -pthread
ifneq ($(WITH_XDP),)
CFLAGS += -D WITH_XDP -I${HOME}/libbpf/include
CFLAGS += -D WITH_XDP
IFLAGS += -I ${HOME}/libbpf/include
LDIRS += -L${HOME}/libbpf/src
LLIBS += -lelf -l:libbpf.a
endif
CFLAGS += $(IFLAGS)
vpath %.c $(SRCDIR)
xdp_kern.o: xdp_kern.c
clang -S -target bpf -D __BPF_TRACING__ -Wall -O2 -emit-llvm -c -g -o xdp_kern.ll $^
clang $(IFLAGS) -S -target bpf -D __BPF_TRACING__ -Wall -O2 -emit-llvm -c -g -o xdp_kern.ll $^
llc -march=bpf -filetype=obj -o $@ xdp_kern.ll
ifneq ($(WITH_XDP),)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment