@@ -5,6 +5,14 @@
mainmenu "Swupdate Configuration"
+config HAVE_LINUX
+ bool
+ option env="HAVE_LINUX"
+
+config HAVE_FREEBSD
+ bool
+ option env="HAVE_FREEBSD"
+
config HAVE_DOT_CONFIG
bool
default y
@@ -75,6 +83,7 @@ config CURL_SSL
config SYSTEMD
bool "enable systemd support"
+ depends on HAVE_LINUX
default n
help
Enable support for systemd's start-up completion
@@ -160,7 +169,7 @@ config MTD
Enable MTD support.
comment "MTD support needs libmtd"
- depends on !HAVE_LIBMTD
+ depends on !HAVE_LIBMTD && HAVE_LINUX
config LUA
bool "lua"
@@ -16,6 +16,17 @@ NAME =
# o print "Entering directory ...";
MAKEFLAGS += -r --no-print-directory
+OSNAME := $(shell uname -s)
+ifeq ($(OSNAME),Linux)
+export HAVE_LINUX = y
+else
+export HAVE_LINUX = n
+endif
+ifeq ($(OSNAME),FreeBSD)
+export HAVE_FREEBSD = y
+else
+export HAVE_FREEBSD = n
+endif
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands
@@ -15,7 +15,11 @@ export HAVE_LIBCURL = y
endif
ifeq ($(HAVE_LIBMTD),)
+ifeq ($(HAVE_LINUX),y)
export HAVE_LIBMTD = y
+else
+export HAVE_LIBMTD = n
+endif
endif
ifeq ($(HAVE_LIBUBI),)
Introduce the HAVE_LINUX property to mark Linux-only features such as, e.g., systemd and mtd support. Alike, introduce the HAVE_FREEBSD property to mark FreeBSD-supported features. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- Kconfig | 11 ++++++++++- Makefile | 11 +++++++++++ Makefile.deps | 4 ++++ 3 files changed, 25 insertions(+), 1 deletion(-)