Recent versions of GNU binutils became more pesky about argument order.
CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline $(DEBUG) -std=gnu99 -DVERSION=$(VERSION) -DYEAR=$(YEAR)
ifeq ($(CONFIG_WIDE_CURSES),1)
-LDFLAGS=-lncursesw
+LDLIBS=-lncursesw
CFLAGS+=-DCONFIG_WIDE_CURSES=1
else
-LDFLAGS=-lncurses
+LDLIBS=-lncurses
endif
ifeq ($(CONFIG_X11),1)
-LDFLAGS+=-lX11
+LDLIBS+=-lX11
CFLAGS+=-DCONFIG_X11=1
endif