Skip to content

Commit 613c539

Browse files
committed
Make Makefile ncurses flags handling in Makefile more flexible
Allow ncurses LDFLAGS to be provided externally, e.g. by package build system, which may use different system pecific values such as `-lncurses -ltinfo` on FreeBSD.
1 parent e184c14 commit 613c539

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ CFLAGS += -W -Wall -pedantic -ansi -std=c99 -DVERSION=\"$(VERSION)\"
77
# The Ncurses library with wide character support is available as "lncurses"
88
# under macOS.
99
ifeq ($(shell uname -s),Darwin)
10-
LDFLAGS += -lncurses
10+
NCURSES_LDFLAGS ?= -lncurses
1111
else
12-
LDFLAGS += -lncursesw
12+
NCURSES_LDFLAGS ?= -lncursesw
1313
endif
14+
LDFLAGS += $(NCURSES_LDFLAGS)
1415

1516
PREFIX ?= /usr/local
1617

0 commit comments

Comments
 (0)