From f575836deb3221cde127cb06390dc192d5099455 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gon=C3=A7alo=20Negrier=20Duarte?=
 <gonegrier.duarte@gmail.com>
Date: Sun, 9 Mar 2025 20:57:53 +0000
Subject: [PATCH] zenpower3: use KV_FULL to detect kernel version. * fix CFLAGS
 for clang
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
---
 Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d108729..37a58ba 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,12 @@
 VERSION         := 0.2.0
-TARGET          := $(shell uname -r)
+TARGET          := ${KV_FULL}
 DKMS_ROOT_PATH  := /usr/src/zenpower-$(VERSION)
 
-KBUILD_CFLAGS   += -Wimplicit-fallthrough=3
+ifeq ($(CC),clang)
+    CXXFLAGS += -Wimplicit-fallthrough
+else ifeq ($(CC),gcc)
+    CXXFLAGS += -Wimplicit-fallthrough=3
+endif
 
 KERNEL_MODULES	:= /lib/modules/$(TARGET)
 
-- 
2.48.1

