diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-21 17:06:09 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-21 17:07:33 -0700 |
commit | bfaf29ee16c88de1e12a2ea6096095ba89ea5685 (patch) | |
tree | e6eb6f204f5309ef34e01d027f7ee3a3d28c35cf /crawl-ref/source/makefile | |
parent | ba1dd86d6c0deaa7c69e2d6b9322f7924c806ccf (diff) | |
download | crawl-ref-bfaf29ee16c88de1e12a2ea6096095ba89ea5685.tar.gz crawl-ref-bfaf29ee16c88de1e12a2ea6096095ba89ea5685.zip |
makefile: add option for ncurses install prefix
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r-- | crawl-ref/source/makefile | 26 |
1 files changed, 16 insertions, 10 deletions
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 |