-+ # Overwrite instead of appending LDFLAGS, because `ncurses-config --libs` also returns -ltinfo, which it can't find
-+ LDFLAGS ?= $$(ncurses5-config --libs)
- else ifeq ($(shell sh -c 'which ncursesw5-config>/dev/null 2>/dev/null && echo y'), y)
- CFLAGS += -Wall -g $$(ncursesw5-config --cflags)
- LDFLAGS += $$(ncursesw5-config --libs)
+-else ifeq ($(shell sh -c 'which ncursesw5-config>/dev/null 2>/dev/null && echo y'), y)
+- CFLAGS += -Wall -g $$(ncursesw5-config --cflags)
+- LDFLAGS += $$(ncursesw5-config --libs)
+-else
+ CFLAGS += -Wall -g $$(pkg-config --cflags ncurses)
+ LDFLAGS += $$(pkg-config --libs ncurses)
+-endif
+
+ tty-clock : ${SRC}
+