summaryrefslogtreecommitdiff
blob: e9eda9c2dced8b28b912ce7cc0c22da8dbbfcf57 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff --git a/Makefile b/Makefile
index 6992fbf..cefc77a 100644
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,7 @@ endif
 PREFIX ?= /usr
 LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)
 INCLUDEDIR ?= $(PREFIX)/include
-UAPIDIR ?= $(PREFIX)/include
+UAPIDIR ?= $(PREFIX)/include/bpf/uapi
 
 all: $(STATIC_LIBS) $(SHARED_LIBS) $(PC_FILE)
 
@@ -85,6 +85,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)
 $(OBJDIR)/libbpf.pc:
 	sed -e "s|@PREFIX@|$(PREFIX)|" \
 		-e "s|@LIBDIR@|$(LIBDIR)|" \
+		-e "s|@UAPIDIR@|$(UAPIDIR)|" \
 		-e "s|@VERSION@|$(LIBBPF_VERSION)|" \
 		< libbpf.pc.template > $@
 
diff --git a/libbpf.pc.template b/libbpf.pc.template
index ac17fce..6d385d9 100644
--- a/libbpf.pc.template
+++ b/libbpf.pc.template
@@ -3,10 +3,11 @@
 prefix=@PREFIX@
 libdir=@LIBDIR@
 includedir=${prefix}/include
+uapidir=@UAPIDIR@
 
 Name: libbpf
 Description: BPF library
 Version: @VERSION@
 Libs: -L${libdir} -lbpf
 Requires.private: libelf
-Cflags: -I${includedir}
+Cflags: -I${includedir} -I${uapidir}