diff --git a/pkg/libsocketcan/Kconfig b/pkg/libsocketcan/Kconfig new file mode 100644 index 0000000000..a5751cda0a --- /dev/null +++ b/pkg/libsocketcan/Kconfig @@ -0,0 +1,10 @@ +# Copyright (c) ML!PA Consulting GmbH +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config PACKAGE_LIBSOCKETCAN + bool "libsocketcan2 32bit for native Linux builds" + depends on BOARD_NATIVE diff --git a/pkg/libsocketcan/Makefile b/pkg/libsocketcan/Makefile new file mode 100644 index 0000000000..ba84a8dc31 --- /dev/null +++ b/pkg/libsocketcan/Makefile @@ -0,0 +1,9 @@ +PKG_NAME=libsocketcan +PKG_URL=https://git.pengutronix.de/git/tools/libsocketcan +PKG_VERSION=077def398ad303043d73339112968e5112d8d7c8 +PKG_LICENSE=LGPL-2.1 + +include $(RIOTBASE)/pkg/pkg.mk + +all: + $(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(CURDIR)/Makefile.$(PKG_NAME) diff --git a/pkg/libsocketcan/Makefile.include b/pkg/libsocketcan/Makefile.include new file mode 100644 index 0000000000..f5d6546fb8 --- /dev/null +++ b/pkg/libsocketcan/Makefile.include @@ -0,0 +1 @@ +NATIVEINCLUDES += -I"$(PKGDIRBASE)/libsocketcan/include" diff --git a/pkg/libsocketcan/Makefile.libsocketcan b/pkg/libsocketcan/Makefile.libsocketcan new file mode 100644 index 0000000000..82282c8b42 --- /dev/null +++ b/pkg/libsocketcan/Makefile.libsocketcan @@ -0,0 +1,9 @@ +MODULE=libsocketcan + +CFLAGS += -Wno-strict-prototypes +CFLAGS += -Wno-pointer-arith +CFLAGS += -Wno-old-style-definition + +SRC += libsocketcan.c + +include $(RIOTBASE)/Makefile.base diff --git a/pkg/libsocketcan/doc.txt b/pkg/libsocketcan/doc.txt new file mode 100644 index 0000000000..d465450114 --- /dev/null +++ b/pkg/libsocketcan/doc.txt @@ -0,0 +1,16 @@ +/** + * @defgroup pkg_libsocketcan Socketcan library + * @ingroup pkg + * @ingroup sys_serialization + * @brief Provides libsocketcan for native 32bit linux builds when not available otherwise + * + * # Introduction + * + * "This library allows you to control some basic functions in SocketCAN from userspace." + * + * # License + * + * Licensed under LGPL 2.1. + * + * @see https://git.pengutronix.de/cgit/tools/libsocketcan + */