Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
# granted, provided the above notices are retained, and a notice that
# the code was modified is included with the above copyright notice.
-CPPFLAGS = -O2 -g -I./include
-LDFLAGS = -pthread
+
+CPPFLAGS += -I./include
+CFLAGS += -O2 -g
+LDFLAGS += -pthread
all: librseq.so
librseq.so: src/rseq.c ${INCLUDES}
$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -shared -fpic src/rseq.c -o $@
-.PHONY: clean fetch
+.PHONY: clean
clean:
rm -f librseq.so
It requires Linux kernel headers from kernel >= 4.18 to build on x86, arm, ppc,
and mips. It requires Linux kernel headers from kernel >= 4.19 to build on
s390.
+
+# Building against local version of kernel headers
+
+cd /path/to/kernel/sources
+make headers_install
+cd /path/to/librseq
+CPPFLAGS=-I/path/to/kernel/sources/usr/include make