diff --git a/Makefile b/Makefile index 9d3bea3..cc64a58 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 CC=gcc -CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow +CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow \ + -Iinclude/ynl-c/ ifeq ("$(DEBUG)","1") CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan endif diff --git a/generated/Makefile b/generated/Makefile index 472851a..55fd311 100644 --- a/generated/Makefile +++ b/generated/Makefile @@ -2,7 +2,7 @@ CC=gcc CFLAGS=-std=gnu11 -O2 -W -Wall -Wextra -Wno-unused-parameter -Wshadow \ - -I../ -idirafter $(UAPI_PATH) + -I../include/ynl-c -idirafter $(UAPI_PATH) ifeq ("$(DEBUG)","1") CFLAGS += -g -fsanitize=address -fsanitize=leak -static-libasan endif diff --git a/ynl-priv.h b/include/ynl-c/ynl-priv.h similarity index 100% rename from ynl-priv.h rename to include/ynl-c/ynl-priv.h diff --git a/ynl.h b/include/ynl-c/ynl.h similarity index 100% rename from ynl.h rename to include/ynl-c/ynl.h diff --git a/update-from-kernel.sh b/update-from-kernel.sh index 72a872a..a8fa1e0 100755 --- a/update-from-kernel.sh +++ b/update-from-kernel.sh @@ -22,12 +22,13 @@ for hdr in $(cat Makefile.deps | sed -n 's/.*,\([^,]*\.h\))/\1/p'); do done mkdir -p lib -cp -v ${KSRC}/tools/net/ynl/lib/*.{c,h} ./ +cp -v ${KSRC}/tools/net/ynl/lib/*.c ./ mkdir -p generated cp -v ${KSRC}/tools/net/ynl/generated/*.{c,h} ./generated/ mkdir -p include/ynl-c +cp -v ${KSRC}/tools/net/ynl/lib/*.h ./include/ynl-c/ for hdr in $(ls generated/ | grep -user.h); do mv -v generated/$hdr ./include/ynl-c/${hdr/-user/} (