blob: bbfed0fd82d126fb1dd0910fcba1ee6205c4b738 [file] [log] [blame]
Patrick Williams03907ee2022-05-01 06:28:52 -05001From 25f54c3359a0fa34890030662e9b02e0a9745f4f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 13 Apr 2022 20:57:38 -0700
4Subject: [PATCH] utils: Use name of the first prerequisite in rule
5
6Use $< instead of $^ because the latter will specify both pre-requisite
7inputattach.c serio-ids.h files on same compiler cmdline and clang does
8not like that and errors out like below
9
10clang-14: error: cannot specify -o when generating multiple output files
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 utils/Makefile | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/utils/Makefile b/utils/Makefile
19index 1fc51ab..a7434a9 100644
20--- a/utils/Makefile
21+++ b/utils/Makefile
22@@ -46,10 +46,10 @@ endif
23 evdev-joystick: evdev-joystick.c
24
25 inputattach: inputattach.c serio-ids.h
26- $(CC) $(CFLAGS) $(CPPFLAGS) -funsigned-char $^ $(LDFLAGS) $(SYSTEMDFLAGS) -lm -o $@
27+ $(CC) $(CFLAGS) $(CPPFLAGS) -funsigned-char $< $(LDFLAGS) $(SYSTEMDFLAGS) -lm -o $@
28
29 ffcfstress: ffcfstress.c bitmaskros.h
30- $(CC) $(CFLAGS) $(CPPFLAGS) -funsigned-char $^ $(LDFLAGS) -lm -o $@
31+ $(CC) $(CFLAGS) $(CPPFLAGS) -funsigned-char $< $(LDFLAGS) -lm -o $@
32
33 ffmvforce.o: ffmvforce.c
34 $(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -o $@ `$(PKG_CONFIG) --cflags sdl2`
35--
362.35.2
37