summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-10-10 04:09:33 -0700
committerSteven Noonan <steven@uplinklabs.net>2009-10-10 22:18:47 -0700
commita0582692a2630f42b8e64d6baaab001a793fcf3c (patch)
treea3c3e07a9290487083d41f51b010645bafd3407a /crawl-ref/source/makefile
parent930477f201bf327048aee3abb1831b27892bb711 (diff)
downloadcrawl-ref-a0582692a2630f42b8e64d6baaab001a793fcf3c.tar.gz
crawl-ref-a0582692a2630f42b8e64d6baaab001a793fcf3c.zip
Makefiles: unifying makefile.unix and makefile_tiles.unix, and cleaning up
Lots of major build changes here: - No longer have multiple makefiles for Linux, Mac, MinGW, etc. - To build a USE_TILE build, simply do 'make <target> TILES=y'. - Makefiles now use a much prettier output while building. To see verbose messages, add 'V=1' to the command-line for 'make'. - Lots of weird dependency bugs corrected in the Makefiles. - makefile.unix now works for Mac OS X builds too (both tiles and ASCII builds). - Added GCC precompiled header support to makefile.unix. In my tests, it doesn't add much of a speedup, if any, but it's at least convenient to have it implemented. To use it, add 'PCH=y' to your 'make' command line. - Added fastdep support, and enabled by default on machines with fastdep installed. This allows for the Makefile to be sensitive to changed header files (recompiling those source files that are affected by the changes). If fastdep isn't installed, you can still use the the old (and much slower) GCC built-in dependency generator, but it's not enabled by default. Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/makefile')
-rw-r--r--crawl-ref/source/makefile615
1 files changed, 578 insertions, 37 deletions
diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile
index 03861c74db..39e5af50db 100644
--- a/crawl-ref/source/makefile
+++ b/crawl-ref/source/makefile
@@ -1,55 +1,596 @@
-#Makefile chooser. Choose one:
+#
+# Dungeon Crawl Stone Soup
+# GNU Makefile
+#
+# largely written by Steven Noonan <steven@uplinklabs.net>
+# (if something breaks, blame him.)
+#
-MAKEFILE ?= makefile.unix
-#MAKEFILE ?= makefile.dos
-#MAKEFILE ?= makefile.osx
-#MAKEFILE ?= makefile.mgw
-#MAKEFILE ?= makefile_tiles.mgw
-#MAKEFILE ?= makefile_tiles.unix
+GAME = crawl
-#These are for cross-compiling purposes on crawl.develz.org, here for convenience:
+CC = gcc
+CXX = g++
+DELETE = rm -f
+COPY = cp
-#MAKEFILE ?= makefile.mgw_unix
-#MAKEFILE ?= makefile_tiles.mgw_unix
+#
+# Platform Detection
+#
+# Use the variable OSNAME if you need to add something that's
+# platform-specific.
+# The valid OSNAME values are currently:
+# 'WIN32': alias for MinGW and Cygwin
+# 'MacOS': alias for Darwin (Mac OS X)
+# and non-translated values from other platforms (values from
+# 'uname -s' call). So Linux is simply 'Linux', etc.
+#
+UNAME_S := $(shell uname -s | cut -d'_' -f1)
+OSNAME =
+ifeq ($(UNAME_S),MINGW32)
+OSNAME = WIN32
+endif
+ifeq ($(UNAME_S),CYGWIN)
+OSNAME = WIN32
+endif
+ifeq ($(UNAME_S),Darwin)
+OSNAME = MacOS
+endif
+ifeq ($(OSNAME),)
+OSNAME = $(UNAME_S)
+endif
-all:
- +$(MAKE) -f $(MAKEFILE)
+ifeq ($(OSNAME),WIN32)
+GAME = crawl.exe
+endif
-profile:
- +$(MAKE) -f $(MAKEFILE) EXTRA_FLAGS='-pg'
+TILES = n
-noopt:
- +$(MAKE) -f $(MAKEFILE)
+#
+# Set up object file dependencies for $(GAME) target.
+#
+include makefile.obj
-install:
- +$(MAKE) -f $(MAKEFILE) install
+# Works for Mac OS X and Linux.
+OBJECTS += crash-u.o
+
+ifneq ($(TILES),n)
+OBJECTS += libgui.o tile2.o tilereg.o tilepick.o tilesdl.o tilefont.o tiletex.o tilemcache.o tilebuf.o
+else
+ifneq ($(UNAME_S),MINGW32)
+OBJECTS += libunix.o
+else
+OBJECTS += libw32c.o
+endif
+endif
+
+# To get stack trace symbols.
+# Note that MinGW doesn't support -rdynamic.
+ifeq ($(OSNAME),WIN32)
+LDFLAGS :=
+else
+LDFLAGS := -rdynamic
+endif
+
+# 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
+
+# Permissions to set on the game executable.
+MCHMOD := 2755
+
+# Permissions to set on the save directory.
+MCHMOD_SAVEDIR := 775
+
+# The user:group to install the game as.
+INSTALL_UGRP := games:games
+
+INSTALLDIR := /usr/games/crawl
+
+# If you're installing Crawl for multiple users, you *must* set this to a
+# valid path before building Crawl. This is not necessary if you are building
+# Crawl for a single user.
+
+# SAVEDIR := /usr/games/crawl/saves/
+# DATADIR := /usr/games/crawl/data/
+
+PCH := n
+
+# libpcre
+PCRESRC := util/pcre/
+PCRELIB := pcre
+PCRELIBA := lib$(PCRELIB).a
+FPCRELIBA := $(PCRESRC)$(PCRELIBA)
+
+# LUA
+LUASRC := util/lua/src/
+LUALIB := lua
+LUALIBA := lib$(LUALIB).a
+FLUALIBA := $(LUASRC)$(LUALIBA)
+
+# SQLite
+SQLSRC := util/sqlite/
+SQLLIB := sqlite3
+SQLLIBA := lib$(SQLLIB).a
+FSQLLIBA := $(SQLSRC)$(SQLLIBA)
+
+LIBDBM := $(FSQLLIBA)
+EXTRA_INCLUDES += -I$(SQLSRC)
+EXTRA_DEPENDS += $(FSQLLIBA)
+
+LIB := -L$(LUASRC) -l$(LUALIB) $(LIBDBM)
+
+INCLUDES += -Iutil -I. -I$(LUASRC) $(EXTRA_INCLUDES)
+
+
+ifneq ($(TILES),n)
+RLTILES = rltiles
+
+ifneq ($(shell which pkg-config 2> /dev/null),)
+
+# If pkg-config is available, it's the surest way to find where
+# the contributing libraries are located.
+#
+PNG_INCLUDE := $(shell pkg-config libpng --cflags-only-I)
+PNG_CFLAGS := $(shell pkg-config libpng --cflags-only-other)
+PNG_LDFLAGS := $(shell pkg-config libpng --libs)
+
+FREETYPE_INCLUDE := $(shell pkg-config freetype2 --cflags-only-I)
+FREETYPE_CFLAGS := $(shell pkg-config freetype2 --cflags-only-other)
+FREETYPE_LDFLAGS := $(shell pkg-config freetype2 --libs)
+
+SDL_INCLUDE := $(shell pkg-config sdl --cflags-only-I)
+SDL_CFLAGS := $(shell pkg-config sdl --cflags-only-other)
+SDL_LDFLAGS := $(shell pkg-config sdl --libs)
+
+else # pkg-config
+
+# Ugh, pkg-config isn't available. We're probably on MinGW, Cygwin,
+# or some other stupid platform. We've got to assume that the
+# libraries are either in the standard paths or are in /opt/<lib>/.
+#
+PNG_INCLUDE := -I/opt/libpng/include
+PNG_CFLAGS :=
+PNG_LDFLAGS := -L/opt/libpng/lib -lpng
+
+FREETYPE_INCLUDE := -I/opt/freetype/include
+FREETYPE_CFLAGS :=
+FREETYPE_LDFLAGS := -L/opt/freetype/lib -lfreetype
+
+ifneq ($(which sdl-config 2> /dev/null),)
+
+# sdl-config is our second best bet...
+#
+SDL_INCLUDE := $(shell sdl-config --cflags | tr ' ' '\n' | grep ^[-]I | tr '\n' ' ')
+SDL_CFLAGS := $(shell sdl-config --cflags | tr ' ' '\n' | grep -v ^[-]I | tr '\n' ' ')
+SDL_LDFLAGS := $(shell sdl-config --libs)
+
+else # sdl-config
+
+# Fine, we have to make some REALLY ugly assumptions...
+#
+SDL_INCLUDE := -I/opt/sdl/include/SDL
+SDL_CFLAGS :=
+SDL_LDFLAGS := -L/opt/sdl/lib -lSDL -lSDLmain
+
+endif # sdl-config
+endif # pkg-config
+
+LIB += $(PNG_LDFLAGS) $(FREETYPE_LDFLAGS) $(SDL_LDFLAGS) -lSDL_image
+ifeq ($(OSNAME),MacOS)
+LIB += -framework OpenGL -framework AppKit
+else
+LIB += -lGL -lGLU
+endif
+
+EXTRA_FLAGS += -DUSE_TILE $(PNG_CFLAGS) $(FREETYPE_CFLAGS) $(SDL_CFLAGS)
+INCLUDES += -I$(RLTILES) $(PNG_INCLUDE) $(FREETYPE_INCLUDE) $(SDL_INCLUDE)
+endif # TILES
+
+
+CFWARN := -Wall -Wno-parentheses -Wwrite-strings -Wshadow -pedantic
+CFOTHERS = -fno-strict-aliasing -fsigned-char $(EXTRA_FLAGS) -DCLUA_BINDINGS -pipe $(SDL_CFLAGS)
+
+#
+# Figure out the build settings for this type of build
+#
+
+# Crawl defaults
+# Optimized, no debugging.
+FULLDEBUG=n
+WIZARD=n
+DEBUG=n
+OPTIMIZE=y
+
+# Debug
+# No optimization, full debugging.
+ifeq ($(MAKECMDGOALS),debug)
+FULLDEBUG=y
+WIZARD=y
+DEBUG=y
+OPTIMIZE=n
+endif
+
+# Wizard
+# Optimized, with wizard mode.
+ifeq ($(MAKECMDGOALS),wizard)
+FULLDEBUG=n
+WIZARD=y
+DEBUG=y
+OPTIMIZE=y
+endif
+
+# Profile
+# Optimized, with full debugging.
+ifeq ($(MAKECMDGOALS),profile)
+FULLDEBUG=y
+WIZARD=y
+DEBUG=y
+OPTIMIZE=y
+endif
+
+ifeq ($(FULLDEBUG),y)
+EXTRA_FLAGS += -DFULLDEBUG
+endif
+ifeq ($(DEBUG),y)
+EXTRA_FLAGS += -ggdb
+endif
+ifeq ($(WIZARD),y)
+EXTRA_FLAGS += -DWIZARD
+endif
+ifeq ($(OPTIMIZE),y)
+CFOPTIMIZE := -O2
+else
+CFOPTIMIZE := -O0
+endif
+ifneq ($(PCH),n)
+CFWARN += -Winvalid-pch
+endif
+
+# Cygwin has a panic attack if we do this...
+ifneq ($(UNAME_S),CYGWIN)
+CFWARN += -Wuninitialized
+else
+CFWARN += -Wno-uninitialized
+endif
+
+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
+
+ifeq ($(OSNAME),WIN32)
+ifneq ($(TILES),n)
+CFOTHERS += -DWIN32TILES
+else
+CFOTHERS += -DWIN32CONSOLE
+endif
+endif
+
+ifeq ($(OSNAME),WIN32)
+INCLUDES += -Iutil/pcre
+LIB += $(FPCRELIBA)
+else
+LIB += -l$(LIBCURS)
+endif
+
+CFLAGS := $(CFOPTIMIZE) $(CFWARN) $(INCLUDES) $(CFOTHERS)
+YCFLAGS := $(CFOPTIMIZE) $(CFOTHERS) $(INCLUDES)
+
+UTIL = util/
+
+OBJECTS := $(UTIL)levcomp.tab.o $(UTIL)levcomp.lex.o $(OBJECTS)
+
+LEX := $(shell which flex 2> /dev/null)
+YACC := $(shell which bison 2> /dev/null)
+
+ifeq ($(strip $(LEX)),)
+DOYACC := n
+endif
+ifeq ($(strip $(YACC)),)
+DOYACC := n
+endif
+
+ifneq ($(findstring $(MAKEFLAGS),s),s)
+ifndef V
+ QUIET_CC = @echo ' ' CC $@;
+ QUIET_CXX = @echo ' ' CXX $@;
+ QUIET_PCH = @echo ' ' PCH $@;
+ QUIET_LINK = @echo ' ' LINK $@;
+ QUIET_COPY = @echo ' ' COPY $@;
+ QUIET_DEPEND = @echo ' ' DEPEND $@;
+ export V
+endif
+endif
+
+ifneq ($(TILES),n)
+TILEDEFS = dngn main player gui unrand
+TILEDEFPRES = $(TILEDEFS:%=$(RLTILES)/tiledef-%)
+TILEDEFTXTS = $(TILEDEFPRES:%=%.txt)
+TILEDEFOBJS = $(TILEDEFPRES:%=%.o)
+TILEDEFSRCS = $(TILEDEFPRES:%=%.cc)
+TILEDEFHDRS = $(TILEDEFPRES:%=%.h)
+
+TILEFILES = \
+ main.png \
+ player.png \
+ dngn.png \
+ gui.png
+ORIGTILEFILES = $(TILEFILES:%=$(RLTILES)/%)
+DESTTILEFILES = $(TILEFILES:%=dat/tiles/%)
+
+EXTRA_DEPENDS += $(DESTTILEFILES)
+OBJECTS += $(TILEDEFOBJS)
+endif
+
+GAME_DEPENDS := $(LUASRC)$(LUALIBA) $(EXTRA_DEPENDS) $(OBJECTS)
+SRC_PKG_BASE := stone_soup
+SRC_VERSION := $(shell egrep 'VER_NUM *".*"' version.h | cut -d'"' -f2)
+PKG_SRC_DIR := $(SRC_PKG_BASE)-$(SRC_VERSION)-src
+SRC_PKG_TAR := $(PKG_SRC_DIR).tbz2
+SRC_PKG_ZIP := $(PKG_SRC_DIR).zip
+
+ifeq ($(UNAME_S),MINGW32)
+GAME_DEPENDS += $(FPCRELIBA)
+endif
+
+PKG_TIDY_LIST := $(UTIL)*.o $(LEVCOMP) *.o \
+ $(UTIL)*.tab.cc $(UTIL)*.tab.h $(UTIL)*.lex.cc *.ixx
+PKG_EXCLUDES := $(PWD)/misc/src-pkg-excludes.lst
+
+##########################################################################
+
+all: $(GAME)
+
+test: $(GAME)
+ $(PWD)/$(GAME) -test
+
+##########################################################################
+# Dependencies
+
+DEPENDENCY_MKF := makefile.dep
+
+ifeq ($(shell which fastdep 2> /dev/null),)
+depend: $(OBJECTS:.o=.cc)
+ rm -f $(DEPENDENCY_MKF).tmp
+ @for i in $^; do \
+ echo ' ' DEP $$i; \
+ $(CXX) -MM $(CFLAGS) $$i >>$(DEPENDENCY_MKF).tmp 2>/dev/null; \
+ done
+ mv -f $(DEPENDENCY_MKF).tmp $(DEPENDENCY_MKF)
+else
+depend: $(DEPENDENCY_MKF)
+
+%.dep: $(OBJECTS:.o=.cc)
+ $(QUIET_DEPEND)fastdep $(INCLUDES) *.h $(OBJECTS:.o=.cc) > $@
+endif
+
+-include $(DEPENDENCY_MKF)
+
+##########################################################################
+# The level compiler
+#
+
+ifeq ($(strip $(DOYACC)),y)
+
+prebuildyacc: $(UTIL)levcomp.tab.cc $(UTIL)levcomp.tab.h $(UTIL)levcomp.lex.cc
+ $(QUIET_COPY)$(COPY) $^ prebuilt/
+
+$(UTIL)levcomp.tab.cc: $(UTIL)levcomp.ypp
+ +@$(MAKE) -C $(UTIL) levcomp.tab.cc
+
+$(UTIL)levcomp.lex.cc: $(UTIL)levcomp.lpp
+ +@$(MAKE) -C $(UTIL) levcomp.lex.cc
+
+else
+
+# Pull the level-compiler stuff up from prebuilt/
+
+$(UTIL)levcomp.tab.cc: prebuilt/levcomp.tab.cc
+ $(QUIET_COPY)$(COPY) prebuilt/*.h $(UTIL)
+ $(QUIET_COPY)$(COPY) $< $@
+
+$(UTIL)levcomp.lex.cc: prebuilt/levcomp.lex.cc
+ $(QUIET_COPY)$(COPY) $< $@
+
+endif
+
+##########################################################################
+
+
+##########################################################################
+# The actual build targets
+#
+
+install: $(GAME)
+ifeq ($(DATADIR),)
+ $(error DATADIR not set! Set DATADIR and run make clean install again)
+endif
+ [ -d $(INSTALLDIR) ] || mkdir -p $(INSTALLDIR)
+ $(COPY) $(GAME) $(INSTALLDIR)
+ chown $(INSTALL_UGRP) $(INSTALLDIR)/$(GAME)
+ chmod $(MCHMOD) $(INSTALLDIR)/$(GAME)
+ mkdir -p $(DATADIR)/dat
+ mkdir -p $(DATADIR)/dat/lua
+ mkdir -p $(DATADIR)/dat/clua
+ mkdir -p $(DATADIR)/dat/descript
+ mkdir -p $(DATADIR)/dat/database
+ $(COPY) dat/*.des $(DATADIR)/dat
+ $(COPY) dat/lua/*.lua $(DATADIR)/dat/lua
+ $(COPY) dat/clua/*.lua $(DATADIR)/dat/clua
+ $(COPY) dat/descript/*.txt $(DATADIR)/dat/descript
+ $(COPY) dat/database/*.txt $(DATADIR)/dat/database
+ mkdir -p $(DATADIR)/settings
+ $(COPY) ../settings/* $(DATADIR)/settings/
+ mkdir -p $(DATADIR)/docs
+ $(COPY) ../docs/*.txt $(DATADIR)/docs
+ chown -R $(INSTALL_UGRP) $(DATADIR)
+ifneq ($(SAVEDIR),)
+ mkdir -p $(SAVEDIR)
+ chown $(INSTALL_UGRP) $(SAVEDIR)
+ chmod $(MCHMOD_SAVEDIR) $(SAVEDIR)
+endif
clean:
- +$(MAKE) -f $(MAKEFILE) clean
+ +$(MAKE) -C $(UTIL) clean
+ $(DELETE) *.o
+ $(DELETE) *.ixx
+
+clean-lua:
+ +$(MAKE) -C $(LUASRC) clean
+
+clean-sql:
+ +$(MAKE) -C $(SQLSRC) clean
+
+distclean: clean clean-lua clean-sql clean-rltiles
+ $(DELETE) bones.*
+ $(DELETE) morgue.txt
+ $(DELETE) scores
+ $(DELETE) $(GAME)
+ $(DELETE) *.sav
+ $(DELETE) core
+ $(DELETE) *.0*
+ $(DELETE) *.lab
+ $(DELETE) $(DEPENDENCY_MKF)
+
+$(GAME): $(GAME_DEPENDS)
+ $(QUIET_LINK)$(CXX) $(LDFLAGS) $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
+
+.PHONY : debug profile wizard
+
+debug: $(GAME)
+profile: $(GAME)
+wizard: $(GAME)
+
+# [ds] Note we don't use the standard CFLAGS here; that's intentional, most
+# flex/bison combos I've tried don't produce code that passes the warnings
+# test.
+
+$(UTIL)%.o: $(UTIL)%.cc
+ $(QUIET_CXX)$(CXX) $(YCFLAGS) -o $@ -c $<
+
+ifneq ($(PCH),n)
+%.h.gch: %.h
+ $(QUIET_PCH)$(CXX) $(CFLAGS) -c $< -o $@
+
+CC_DEP := AppHdr.h.gch
+endif
+
+$(OBJECTS:%.o=%.cc): $(CC_DEP) $(TILEDEFHDRS)
+
+%.o: %.m
+ $(QUIET_CXX)$(CC) $(CFLAGS) -c $< -o $@
+
+%.o: %.cc
+ $(QUIET_CXX)$(CXX) $(CFLAGS) -c $< -o $@
+
+#############################################################################
+# Build PCRE
+
+$(FPCRELIBA):
+ +@$(MAKE) -C $(PCRESRC)
+
+#############################################################################
+# Build Lua
+
+$(FLUALIBA):
+ +@$(MAKE) -C $(LUASRC) crawl_unix
+
+#############################################################################
+# Build SQLite
+
+$(FSQLLIBA):
+ +@$(MAKE) -C $(SQLSRC)
+
+#############################################################################
+# Build unrandart data
+art-data.h: art-data.txt util/art-data.pl art-func.h
+ util/art-data.pl
+
+#############################################################################
+# RLTiles
+#
+
+.PHONY: rltile-build
+rltile-build:
+ $(MAKE) -C $(RLTILES) -f makefile.unix all
+
+$(TILEDEFSRCS): rltile-build
+$(TILEDEFHDRS): rltile-build
+$(ORIGTILEFILES): rltile-build
+
+dat/tiles/%.png: $(RLTILES)/%.png
+ $(QUIET_COPY)$(COPY) $< $@
-distclean:
- +$(MAKE) -f $(MAKEFILE) distclean
+clean-rltiles:
+ +$(MAKE) -C $(RLTILES) -f makefile.unix distclean
-depend:
- +$(MAKE) -f $(MAKEFILE) depend
+#############################################################################
+# Packaging a source tarball for release
+#
-# WIZARD mode currently includes asserts, bounds checking, item checking and
-# monster checking.
-wizard:
- +$(MAKE) -f $(MAKEFILE) debug EXTRA_FLAGS='-g -DWIZARD -DDEBUG -DDEBUG_ITEM_SCAN -DDEBUG_MONS_SCAN'
+# To package, you *must* have lex and yacc to generate the intermediates.
+ifeq ($(DOYACC),y)
+package-source: distclean prebuildyacc pkgtidy depend removeold vlink \
+ pkgtarbz2 pkgzip
-# DEBUG mode includes WIZARD mode as well as copious debugging input
-debug:
- +$(MAKE) -f $(MAKEFILE) DEBUG_CRAWL=y debug EXTRA_FLAGS='-g -DFULLDEBUG -DWIZARD'
+pkgtidy:
+ $(DELETE) $(PKG_TIDY_LIST)
-# [dshaligram] The individual makefile need not necessarily support
-# package-source; only makefile.unix does at the moment.
-package-source:
- +$(MAKE) -f $(MAKEFILE) package-source
+removeold:
+ if [ -f ../../$(SRC_PKG_TAR) ]; then $(DELETE) ../../$(SRC_PKG_TAR); fi
+ if [ -f ../../$(SRC_PKG_ZIP) ]; then $(DELETE) ../../$(SRC_PKG_ZIP); fi
-prebuildyacc:
- +$(MAKE) -f $(MAKEFILE) prebuildyacc
+# [ds] Existing directory names could produce a bad package!
+vlink:
+ cd .. && WHERE=$$PWD && cd .. && \
+ ( [ -e $(PKG_SRC_DIR) ] || ln -sf $$WHERE $(PKG_SRC_DIR) )
-# DO NOT DELETE THIS LINE -- $(MAKE) depend depends on it.
+pkgtarbz2:
+ cd ../.. && tar -ch --bzip2 -f $(SRC_PKG_TAR) \
+ -X $(PKG_EXCLUDES) $(PKG_SRC_DIR)
+pkgzip:
+ cd ../.. && zip -rq $(SRC_PKG_ZIP) $(PKG_SRC_DIR) \
+ -x@$(PKG_EXCLUDES)
+endif