[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240608034247.181843-2-david.e.box@linux.intel.com>
Date: Fri, 7 Jun 2024 20:42:46 -0700
From: "David E. Box" <david.e.box@...ux.intel.com>
To: linux-doc@...r.kernel.org,
david.e.box@...ux.intel.com,
ilpo.jarvinen@...ux.intel.com,
hdegoede@...hat.com,
linux-kernel@...r.kernel.org,
platform-driver-x86@...r.kernel.org
Subject: [PATCH V4 2/3] tools/arch/x86/intel_sdsi: Rework Makefile
In preparation for more source files, rework the Makefile to handle
prerequisites more generically, making it easier to isolate future changes.
Also update PHONY targets.
Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
---
V4 - No change.
V3 - No change.
V2 - New Patch.
tools/arch/x86/intel_sdsi/Makefile | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/tools/arch/x86/intel_sdsi/Makefile b/tools/arch/x86/intel_sdsi/Makefile
index 5de2288cda79..47b6fd98372c 100644
--- a/tools/arch/x86/intel_sdsi/Makefile
+++ b/tools/arch/x86/intel_sdsi/Makefile
@@ -1,21 +1,25 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for Intel Software Defined Silicon provisioning tool
-
-intel_sdsi: intel_sdsi.c
-
-CFLAGS = -Wextra
-
+include ../../../scripts/Makefile.include
BINDIR ?= /usr/sbin
-override CFLAGS += -O2 -Wall
+SRCS = intel_sdsi.c
-%: %.c
- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
+OBJS = $(SRCS:.c=.o)
+
+override CFLAGS += -O2 -Wall -Wextra
+
+intel_sdsi: $(OBJS)
+ $(CC) $(CFLAGS) $(OBJS) -o $@
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
-.PHONY : clean
clean :
- @rm -f intel_sdsi
+ @rm -f intel_sdsi $(OBJS)
install : intel_sdsi
install -d $(DESTDIR)$(BINDIR)
install -m 755 -p intel_sdsi $(DESTDIR)$(BINDIR)/intel_sdsi
+
+.PHONY : clean install
--
2.34.1
Powered by blists - more mailing lists