From: Giuseppe Bilotta Date: Wed, 28 Dec 2022 10:34:36 +0000 (+0100) Subject: Put linked libraries in LDLIBS X-Git-Url: http://git.oblomov.eu/wiimote-pad/commitdiff_plain 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. --- 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