From bfaf29ee16c88de1e12a2ea6096095ba89ea5685 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Wed, 21 Oct 2009 17:06:09 -0700 Subject: makefile: add option for ncurses install prefix Signed-off-by: Steven Noonan --- crawl-ref/source/makefile | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/makefile') diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index b44c4791a0..8f64268607 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -397,10 +397,18 @@ CFOTHERS_L += -DDATA_DIR_PATH=\"$(strip $(prefix))/$(strip $(DATADIR))\" endif ifndef NO_NCURSES + +NC_LIB = ncurses +NC_PREFIX = /usr +NC_INCLUDE = $(NC_PREFIX)/include/ncurses + # Usually, it can be autodetected for you: -ifneq ($(shell ls /usr/include/ncursesw 2> /dev/null),) +ifndef NO_UNICODE +ifneq ($(shell ls $(NC_PREFIX)/include/ncursesw 2> /dev/null),) +NC_INCLUDE = $(NC_PREFIX)/include/ncursesw USE_UNICODE = YesPlease endif +endif # If you have USE_UNICODE set, and have a preferred Unicode # (UTF-8) locale you want Crawl to use, you can set it here. The @@ -408,13 +416,14 @@ endif # as set in your environment LC_* variables, use UNICODE_LOCALE = . UNICODE_LOCALE = +INCLUDES_L += -I$(NC_INCLUDE) + ifdef USE_UNICODE # Include path for (n)curses with Unicode support. -INCLUDES_L += -I/usr/include/ncursesw # Your ncurses library may include Unicode support, and you may not have a # separate libncursesw; in that case, change this line accordingly. -LIBCURS = ncursesw +NC_LIB = ncursesw CFOTHERS_L += -DUNICODE_GLYPHS ifneq ($(strip $(UNICODE_LOCALE)),) @@ -427,16 +436,13 @@ endif # The standard ncurses library also supports Unicode on Mac OS/Darwin. ifdef LIBNCURSES_IS_UNICODE -LIBCURS = ncurses +NC_LIB = ncurses endif -LIB += -l$(LIBCURS) - -else -# Include path for curses or ncurses (non-Unicode). -INCLUDES_L += -I/usr/include/ncurses -LIB += -lncurses endif + +LIB += -L$(NC_PREFIX)/lib -l$(NC_LIB) + endif ifdef BUILD_PCRE -- cgit v1.2.3-54-g00ecf