From 12d7488f8b722d10cde84dc51286dfc2f3cddcc1 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 28 Dec 2022 11:34:36 +0100 Subject: [PATCH] Put linked libraries in LDLIBS This fixes building when compilers use -Wl,--as-needed, ensuring that the libraries get specified after the source files while still using the default implicit rule for building .c files. Ths supersedes the proposed PR #11 on GitHub. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 88bbce0..890220f 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ CPPFLAGS += -I$(XWIIMOTE)/lib LDFLAGS ?= LDFLAGS += -L$(XWIIMOTE)/.libs -LDFLAGS += -ludev -LDFLAGS += -lxwiimote +LDLIBS += -ludev +LDLIBS += -lxwiimote wiimote-pad: wiimote-pad.c -- 2.32.0.93.g670b81a890