diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-04 20:34:25 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-04 20:34:25 +0000 |
commit | 7dd0ecfb698f0eee0a615f5d79635d72ff390ba1 (patch) | |
tree | 7f1fadece2b46e303e19bacefd92a7b18807af0c /crawl-ref/source | |
parent | 2028bc1e0de04991eed99445defc7cf09782572f (diff) | |
download | crawl-ref-7dd0ecfb698f0eee0a615f5d79635d72ff390ba1.tar.gz crawl-ref-7dd0ecfb698f0eee0a615f5d79635d72ff390ba1.zip |
Sync makefile.x11 with makefile.unix as much as possible.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4868 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/makefile.x11 | 95 |
1 files changed, 54 insertions, 41 deletions
diff --git a/crawl-ref/source/makefile.x11 b/crawl-ref/source/makefile.x11 index 17f739b9e0..34557cc11d 100644 --- a/crawl-ref/source/makefile.x11 +++ b/crawl-ref/source/makefile.x11 @@ -16,12 +16,18 @@ CXX = g++ DELETE = rm -f COPY = cp OS_TYPE = UNIX -EXTRA_INCLUDES = -DUSE_X11 -DUSE_TILE -DCLUA_BINDINGS +EXTRA_INCLUDES = -DUSE_X11 -DUSE_TILE -# Change this to y if you want to use Unicode glyphs in the map, and you have -# libncursesw available. +# Change this to y (case-sensitive!) if you want to use Unicode glyphs +# in the map, and you have libncursesw available. UNICODE_GLYPHS = n +# If you're using UNICODE_GLYPHS=y, and have a preferred Unicode +# (UTF-8) locale you want Crawl to use, you can set it here. The +# default is en_US.UTF-8. If you'd prefer that Crawl use the locale +# as set in your environment LC_* variables, use UNICODE_LOCALE = . +UNICODE_LOCALE = + # If you have lex and yacc, set DOYACC to y (lowercase y). DOYACC := y @@ -46,33 +52,9 @@ INSTALLDIR := /usr/games/crawl LEX := flex YACC := bison -y -ifeq ($(UNICODE_GLYPHS),y) -# Include path for (n)curses with Unicode support. -INCLUDES = -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 -EXTRA_FLAGS += -DUNICODE_GLYPHS - -# The standard ncurses library also supports Unicode on Mac OS/Darwin. -ifeq ($(shell uname),Darwin) -LIBCURS = ncurses -endif - -else -# Include path for curses or ncurses (non-Unicode). -INCLUDES = -I/usr/include/ncurses -LIBCURS = ncurses -endif - -ifeq ($(LUASRC),) LUASRC := util/lua/src -endif - LUALIB = lua LUALIBA = l$(LUALIB).a -EXTRA_DEPENDS += $(LUASRC)$(LUALIBA) DBH_FILE := /usr/include/db.h NDBM_FILE := /usr/include/ndbm.h @@ -80,14 +62,14 @@ NDBM_FILE := /usr/include/ndbm.h HAVE_DBH := $(shell [ -f $(DBH_FILE) ] && echo y) HAVE_NDBM := $(shell [ -f $(NDBM_FILE) -a "`uname`" = "Darwin" ] && echo y) -ifeq ($(HAVE_DBH),y) +ifeq ($(strip $(HAVE_DBH)),y) ifneq ($(shell grep dbm_open $(DBH_FILE)),) SELDBM := -DDB_DBH LIBDBM := -ldb endif endif -ifeq ($(HAVE_NDBM),y) +ifeq ($(strip $(HAVE_NDBM)),y) SELDBM ?= -DDB_NDBM ifeq ($(SELDBM),-DDB_NDBM) LIBDBM := -ldbm @@ -99,7 +81,7 @@ SQLLIB := sqlite3 SQLLIBA := lib$(SQLLIB).a FSQLLIBA := $(SQLSRC)/$(SQLLIBA) -ifeq ($(LIBDBM),) +ifeq ($(strip $(LIBDBM)),) LIBDBM := -L$(SQLSRC) -lsqlite3 EXTRA_INCLUDES += -I$(SQLSRC) EXTRA_DEPENDS += $(FSQLLIBA) @@ -107,20 +89,51 @@ endif LIB = -l$(LIBCURS) -L$(LUASRC) -l$(LUALIB) $(LIBDBM) -L/usr/X11R6/lib -lX11 -lpng - INCLUDES := $(INCLUDES) -Iutil -I. -I$(LUASRC) $(EXTRA_INCLUDES) -CFWARN := -Wall -Wwrite-strings \ - -Wshadow -pedantic +CFWARN := -Wall -Wwrite-strings -Wshadow -pedantic -CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) +CFOTHERS := -fsigned-char -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS -ifneq ($(SAVEDIR),) -CFOTHERS += '-DSAVE_DIR_PATH="$(SAVEDIR)"' +ifneq ($(HURRY),y) +CFWARN += -Wuninitialized +CFOTHERS += -O2 endif -ifneq ($(DATADIR),) -CFOTHERS += '-DDATA_DIR_PATH="$(DATADIR)"' +ifneq ($(strip $(SAVEDIR)),) +CFOTHERS += '-DSAVE_DIR_PATH="$(strip $(SAVEDIR))"' +endif + +ifneq ($(strip $(DATADIR)),) +CFOTHERS += '-DDATA_DIR_PATH="$(strip $(DATADIR))"' +endif + +ifeq ($(strip $(UNICODE_GLYPHS)),y) +# Include path for (n)curses with Unicode support. +INCLUDES += -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 +CFOTHERS += -DUNICODE_GLYPHS + +ifneq ($(strip $(UNICODE_LOCALE)),) +ifneq ($(strip $(UNICODE_LOCALE)),.) +CFOTHERS += -DUNICODE_LOCALE=\"$(strip $(UNICODE_LOCALE))\" +else +CFOTHERS += -DUNICODE_LOCALE=\"\" +endif +endif + +# The standard ncurses library also supports Unicode on Mac OS/Darwin. +ifeq ($(shell uname),Darwin) +LIBCURS = ncurses +endif + +else +# Include path for curses or ncurses (non-Unicode). +INCLUDES += -I/usr/include/ncurses +LIBCURS = ncurses endif CFOTHERS += $(SELDBM) @@ -153,15 +166,15 @@ EXTRA_DEPENDS += $(TILEHEADERS) $(DESTTILEFILES) OBJECTS := $(UTIL)levcomp.tab.o $(UTIL)levcomp.lex.o $(OBJECTS) -ifeq ($(LEX),) +ifeq ($(strip $(LEX)),) DOYACC := endif -ifeq ($(YACC),) +ifeq ($(strip $(YACC)),) DOYACC := endif -GAME_DEPENDS := $(EXTRA_DEPENDS) $(OBJECTS) +GAME_DEPENDS := $(LUASRC)$(LUALIBA) $(EXTRA_DEPENDS) $(OBJECTS) SRC_PKG_BASE := stone_soup SRC_VERSION := $(shell egrep 'VER_NUM *".*"' version.h | \ egrep -o '[0-9]\.[0-9](\.[0-9])?') |