diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-09-29 19:41:49 -0500 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-09-29 19:41:49 -0500 |
commit | f3b1dada2312ceb855cf1eabd5d73325cc9c6ed0 (patch) | |
tree | 0e1e81d264ef10e2a30838c9ec03b32fb09d1cb6 /crawl-ref | |
parent | f8e148464674520fd7093896ebf5d16df8dac1aa (diff) | |
parent | 4be2bf2502f892afebbb0ea51d621556c0e88019 (diff) | |
download | crawl-ref-f3b1dada2312ceb855cf1eabd5d73325cc9c6ed0.tar.gz crawl-ref-f3b1dada2312ceb855cf1eabd5d73325cc9c6ed0.zip |
Merge branch 'master' of ssh://crawl-ref.git.sourceforge.net/gitroot/crawl-ref/crawl-ref
Diffstat (limited to 'crawl-ref')
-rwxr-xr-x | crawl-ref/dolinks.sh | 2 | ||||
-rwxr-xr-x | crawl-ref/domake.sh | 11 | ||||
-rw-r--r-- | crawl-ref/source/makefile | 27 | ||||
-rw-r--r-- | crawl-ref/source/makefile.unix | 10 | ||||
-rw-r--r-- | crawl-ref/source/makefile_tiles.mgw | 2 | ||||
-rw-r--r-- | crawl-ref/source/makefile_tiles.unix | 24 | ||||
-rw-r--r-- | crawl-ref/source/util/lua/src/Makefile | 2 | ||||
-rw-r--r-- | crawl-ref/source/util/sqlite/Makefile | 2 |
8 files changed, 40 insertions, 40 deletions
diff --git a/crawl-ref/dolinks.sh b/crawl-ref/dolinks.sh index e4a023d76c..072555e7bc 100755 --- a/crawl-ref/dolinks.sh +++ b/crawl-ref/dolinks.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash mkdir -p NORMAL mkdir -p WIZARD diff --git a/crawl-ref/domake.sh b/crawl-ref/domake.sh index 4ae1a8d6fe..f129f6a14e 100755 --- a/crawl-ref/domake.sh +++ b/crawl-ref/domake.sh @@ -1,9 +1,14 @@ -#!/bin/sh +#!/usr/bin/env bash #jmf: automate making normal & wizard binaries, until they merge #jmf: N.B.: requires symlink directories; run ./dolinks.sh to make -pushd NORMAL/source ; make ; popd -pushd WIZARD/source ; make wizard ; popd +MAKE=make +if [ "$(uname -s)" == "FreeBSD" ]; then + MAKE=gmake +fi + +pushd NORMAL/source ; $MAKE ; popd +pushd WIZARD/source ; $MAKE wizard ; popd if [ -f NORMAL/source/crawl ]; then ln -sf NORMAL/source/crawl ncrawl diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index 8b40a64ea3..0f0ba0fd5e 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -16,48 +16,43 @@ MAKEFILE ?= makefile.unix #MAKEFILE ?= makefile.mgw_unix #MAKEFILE ?= makefile_tiles.mgw_unix -# number of concurrent jobs -- good value is (#_of_CPUs * 2) + 1 -# cuts build time a lot on multi-cpu machines -# Note: do not use enable this for builds of the tiles version. -#OTHER=-j2 - all: - $(MAKE) $(OTHER) -f $(MAKEFILE) + +$(MAKE) -f $(MAKEFILE) profile: - $(MAKE) $(OTHER) -f $(MAKEFILE) EXTRA_FLAGS='-pg' + +$(MAKE) -f $(MAKEFILE) EXTRA_FLAGS='-pg' noopt: - $(MAKE) $(OTHER) -f $(MAKEFILE) + +$(MAKE) -f $(MAKEFILE) install: - $(MAKE) $(OTHER) -f $(MAKEFILE) install + +$(MAKE) -f $(MAKEFILE) install clean: - $(MAKE) $(OTHER) -f $(MAKEFILE) clean + +$(MAKE) -f $(MAKEFILE) clean distclean: - $(MAKE) $(OTHER) -f $(MAKEFILE) distclean + +$(MAKE) -f $(MAKEFILE) distclean depend: - $(MAKE) $(OTHER) -f $(MAKEFILE) depend + +$(MAKE) -f $(MAKEFILE) depend # WIZARD mode currently includes asserts, bounds checking, item checking and # monster checking. wizard: - $(MAKE) $(OTHER) -f $(MAKEFILE) debug EXTRA_FLAGS='-g -DWIZARD -DDEBUG -DDEBUG_ITEM_SCAN -DDEBUG_MONS_SCAN' + +$(MAKE) -f $(MAKEFILE) debug EXTRA_FLAGS='-g -DWIZARD -DDEBUG -DDEBUG_ITEM_SCAN -DDEBUG_MONS_SCAN' # DEBUG mode includes WIZARD mode as well as copious debugging input debug: - $(MAKE) $(OTHER) -f $(MAKEFILE) DEBUG_CRAWL=y debug EXTRA_FLAGS='-g -DFULLDEBUG -DWIZARD' + +$(MAKE) -f $(MAKEFILE) DEBUG_CRAWL=y debug EXTRA_FLAGS='-g -DFULLDEBUG -DWIZARD' # [dshaligram] The individual makefile need not necessarily support # package-source; only makefile.unix does at the moment. package-source: - $(MAKE) -f $(MAKEFILE) package-source + +$(MAKE) -f $(MAKEFILE) package-source prebuildyacc: - $(MAKE) -f $(MAKEFILE) prebuildyacc + +$(MAKE) -f $(MAKEFILE) prebuildyacc # DO NOT DELETE THIS LINE -- $(MAKE) depend depends on it. diff --git a/crawl-ref/source/makefile.unix b/crawl-ref/source/makefile.unix index 9892a8a94a..67f994ee0e 100644 --- a/crawl-ref/source/makefile.unix +++ b/crawl-ref/source/makefile.unix @@ -12,7 +12,7 @@ include makefile.obj OBJECTS += libunix.o crash-u.o -CXX = g++ +CXX ?= g++ DELETE = rm -f COPY = cp OS_TYPE = UNIX @@ -243,10 +243,10 @@ clean: $(DELETE) *.ixx clean-lua: - cd $(LUASRC) && $(MAKE) clean + +$(MAKE) -C $(LUASRC) clean clean-sql: - cd $(SQLSRC) && $(MAKE) clean + +$(MAKE) -C $(SQLSRC) clean distclean: clean clean-lua clean-sql $(DELETE) bones.* @@ -283,14 +283,14 @@ $(UTIL)%.o: $(UTIL)%.cc $(LUASRC)$(LUALIBA): echo Building Lua... - cd $(LUASRC) && $(MAKE) crawl_unix + +$(MAKE) -C $(LUASRC) crawl_unix ############################################################################# # Build SQLite $(FSQLLIBA): echo Building SQLite - cd $(SQLSRC) && $(MAKE) + +$(MAKE) -C $(SQLSRC) ############################################################################# # Build unrandart data diff --git a/crawl-ref/source/makefile_tiles.mgw b/crawl-ref/source/makefile_tiles.mgw index 93fe6eaeb0..8110433f4d 100644 --- a/crawl-ref/source/makefile_tiles.mgw +++ b/crawl-ref/source/makefile_tiles.mgw @@ -11,7 +11,7 @@ endif # need .exe so make will find the right file APPNAME = $(OPATH)\crawl.exe -CXX = g++ +CXX ?= g++ DELETE = del COPY = copy OS_TYPE = WIN32TILES diff --git a/crawl-ref/source/makefile_tiles.unix b/crawl-ref/source/makefile_tiles.unix index b7faaef21b..7d199d0f21 100644 --- a/crawl-ref/source/makefile_tiles.unix +++ b/crawl-ref/source/makefile_tiles.unix @@ -14,7 +14,7 @@ OBJECTS += libgui.o tilepick.o tile2.o tilereg.o tilesdl.o tilefont.o tiletex.o SDL_CFLAGS := $(shell sdl-config --cflags) -CXX = g++ +CXX ?= g++ DELETE = rm -f COPY = cp OS_TYPE = UNIX @@ -29,7 +29,6 @@ UNICODE_GLYPHS = n # OSX vs. Linux differences: ifeq ($(strip $(OSX)),y) PNG_INCLUDE := -I/sw/include -PNG_LIB := -L/sw/lib FREETYPE_INCLUDE := -I/sw/include/freetype2 # Note: gcc on OS X will *always* include the dynamic library @@ -50,11 +49,12 @@ EXTRA_LIBS := $(FRAMEWORK_LIST:%=-Wl,-framework,%) $(LIB_LIST) -lz EXTRA_INCLUDES += -I/sw/include else -PNG_INCLUDE := -PNG_LIB := -FREETYPE_INCLUDE := -I/usr/include/freetype2 +PNG_INCLUDE := $(shell pkg-config libpng --cflags) +PNG_LDFLAGS := $(shell pkg-config libpng --libs) +FREETYPE_INCLUDE := $(shell pkg-config freetype2 --cflags) +FREETYPE_LDFLAGS := $(shell pkg-config freetype2 --libs) SDL_LDFLAGS := $(shell sdl-config --libs) -lSDLmain -EXTRA_LIBS := -lpng $(SDL_LDFLAGS) -lGL -lGLU -lSDL_image -lfreetype +EXTRA_LIBS := $(PNG_LDFLAGS) $(SDL_LDFLAGS) $(FREETYPE_LDFLAGS) -lGL -lGLU -lSDL_image endif # If you have lex and yacc, set DOYACC to y (lowercase y). @@ -225,7 +225,7 @@ endif ORIGTILEFILES = $(TILEFILES:%=$(RLTILES)/%) makerltiles: - cd $(RLTILES) && make -f makefile.unix all + +$(MAKE) -C rltiles -f makefile.unix all $(TILEDEFSRCS): makerltiles @@ -237,7 +237,7 @@ dat/tiles/%.png: $(RLTILES)/%.png $(COPY) $< $@ clean-rltiles: - cd $(RLTILES) && make -f makefile.unix distclean && cd .. + +$(MAKE) -C $(RLTILES) -f makefile.unix distclean && cd .. ########################################################################## @@ -285,10 +285,10 @@ clean: $(DELETE) *.ixx clean-lua: - cd $(LUASRC) && $(MAKE) clean + +$(MAKE) -C $(LUASRC) clean clean-sql: - cd $(SQLSRC) && $(MAKE) clean + +$(MAKE) -C $(SQLSRC) clean distclean: clean clean-lua clean-sql clean-rltiles $(DELETE) bones.* @@ -329,14 +329,14 @@ $(UTIL)%.o: $(UTIL)%.cc $(TILEDEFHDRS) $(LUASRC)$(LUALIBA): echo Building Lua... - cd $(LUASRC) && $(MAKE) crawl_unix + +$(MAKE) -C $(LUASRC) crawl_unix ############################################################################# # Build SQLite $(FSQLLIBA): echo Building SQLite - cd $(SQLSRC) && $(MAKE) + +$(MAKE) -C $(SQLSRC) ############################################################################# # Build unrandart data diff --git a/crawl-ref/source/util/lua/src/Makefile b/crawl-ref/source/util/lua/src/Makefile index 2cb4823405..fb1b610d4f 100644 --- a/crawl-ref/source/util/lua/src/Makefile +++ b/crawl-ref/source/util/lua/src/Makefile @@ -9,7 +9,7 @@ # Your platform. See PLATS for possible values. PLAT= none -CC= gcc +CC ?= gcc CFLAGS= -O2 -Wall $(MYCFLAGS) AR= ar rcu RANLIB= ranlib diff --git a/crawl-ref/source/util/sqlite/Makefile b/crawl-ref/source/util/sqlite/Makefile index 2bc3970561..520bd75714 100644 --- a/crawl-ref/source/util/sqlite/Makefile +++ b/crawl-ref/source/util/sqlite/Makefile @@ -4,7 +4,7 @@ LIBSQL = libsqlite3.a AR = ar rcu -CC = gcc +CC ?= gcc RANLIB = ranlib RM_F = rm -f |