Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame^] | 1 | From 25f54c3359a0fa34890030662e9b02e0a9745f4f Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 13 Apr 2022 20:57:38 -0700 |
| 4 | Subject: [PATCH] utils: Use name of the first prerequisite in rule |
| 5 | |
| 6 | Use $< instead of $^ because the latter will specify both pre-requisite |
| 7 | inputattach.c serio-ids.h files on same compiler cmdline and clang does |
| 8 | not like that and errors out like below |
| 9 | |
| 10 | clang-14: error: cannot specify -o when generating multiple output files |
| 11 | |
| 12 | Upstream-Status: Pending |
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 14 | --- |
| 15 | utils/Makefile | 4 ++-- |
| 16 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 17 | |
| 18 | diff --git a/utils/Makefile b/utils/Makefile |
| 19 | index 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 | -- |
| 36 | 2.35.2 |
| 37 | |