2006-02-11 13:27:07 +00:00
|
|
|
# $Id$
|
2001-11-06 22:59:59 +00:00
|
|
|
|
2002-10-23 00:20:11 +00:00
|
|
|
#######################################################################
|
|
|
|
# Default compilation parameters. Normally don't edit these #
|
|
|
|
#######################################################################
|
|
|
|
|
2004-01-30 21:54:28 +00:00
|
|
|
srcdir ?= .
|
|
|
|
|
2003-09-28 10:44:31 +00:00
|
|
|
DEFINES := -DHAVE_CONFIG_H
|
|
|
|
LDFLAGS :=
|
2006-02-11 22:45:04 +00:00
|
|
|
INCLUDES := -I. -I$(srcdir) -I$(srcdir)/engines
|
2007-12-16 21:41:10 +00:00
|
|
|
LIBS :=
|
|
|
|
OBJS :=
|
|
|
|
DEPDIR := .deps
|
2002-08-21 17:35:46 +00:00
|
|
|
|
2003-09-28 10:44:31 +00:00
|
|
|
MODULES :=
|
2003-09-17 21:53:13 +00:00
|
|
|
MODULE_DIRS :=
|
|
|
|
|
2003-08-10 06:56:53 +00:00
|
|
|
# Load the make rules generated by configure
|
2007-11-06 17:23:33 +00:00
|
|
|
-include config.mk
|
2003-07-16 20:36:38 +00:00
|
|
|
|
2003-12-24 16:17:13 +00:00
|
|
|
CXXFLAGS:= -Wall $(CXXFLAGS)
|
2008-01-13 17:59:53 +00:00
|
|
|
# Turn off some annoying and not-so-useful warnings
|
2008-01-27 19:47:41 +00:00
|
|
|
CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
|
2008-01-13 17:59:53 +00:00
|
|
|
# Enable even more warnings...
|
2003-09-21 18:39:38 +00:00
|
|
|
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
|
2008-01-13 17:59:53 +00:00
|
|
|
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings
|
2006-04-15 00:12:14 +00:00
|
|
|
|
|
|
|
# Disable RTTI and exceptions, and enabled checking of pointers returned by "new"
|
|
|
|
CXXFLAGS+= -fno-rtti -fno-exceptions -fcheck-new
|
2003-04-26 11:44:13 +00:00
|
|
|
|
2006-08-04 20:24:49 +00:00
|
|
|
# There is a nice extra warning that flags variables that are potentially
|
|
|
|
# used before being initialized. Very handy to catch a certain kind of
|
|
|
|
# bugs. Unfortunately, it only works when optimizations are turned on,
|
|
|
|
# which is why we normally don't use it.
|
|
|
|
#CXXFLAGS+= -O -Wuninitialized
|
|
|
|
|
2008-01-13 17:05:43 +00:00
|
|
|
#######################################################################
|
|
|
|
# Default commands - put the necessary replacements in config.mk #
|
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
CAT ?= cat
|
|
|
|
CP ?= cp
|
|
|
|
ECHO ?= printf
|
|
|
|
INSTALL ?= install
|
|
|
|
MKDIR ?= mkdir -p
|
|
|
|
RM ?= rm -f
|
|
|
|
RM_REC ?= $(RM) -r
|
|
|
|
ZIP ?= zip -q
|
|
|
|
|
2003-04-26 11:44:13 +00:00
|
|
|
#######################################################################
|
2004-02-01 01:32:43 +00:00
|
|
|
# Misc stuff - you should never have to edit this #
|
2003-04-26 11:44:13 +00:00
|
|
|
#######################################################################
|
2001-10-09 14:30:12 +00:00
|
|
|
|
2004-02-01 01:32:43 +00:00
|
|
|
EXECUTABLE := scummvm$(EXEEXT)
|
|
|
|
|
2004-01-30 21:54:28 +00:00
|
|
|
include $(srcdir)/Makefile.common
|
2002-04-27 11:06:27 +00:00
|
|
|
|
2003-08-10 07:47:47 +00:00
|
|
|
# check if configure has been run or has been changed since last run
|
2008-01-13 17:05:43 +00:00
|
|
|
config.h config.mk: $(srcdir)/configure
|
|
|
|
ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
|
2007-11-06 17:23:33 +00:00
|
|
|
@echo "Running $(srcdir)/configure with the last specified parameters"
|
|
|
|
@sleep 2s
|
2007-11-14 19:23:20 +00:00
|
|
|
LDFLAGS="$(SAVED_LDFLAGS)" CXX="$(SAVED_CXX)" CXXFLAGS="$(SAVED_CXXFLAGS)" CPPFLAGS="$(SAVED_CPPFLAGS)" \
|
2007-11-06 17:23:33 +00:00
|
|
|
$(srcdir)/configure $(SAVED_CONFIGFLAGS)
|
|
|
|
else
|
|
|
|
$(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
|
|
|
|
endif
|
2003-08-10 07:34:58 +00:00
|
|
|
|
2007-11-26 15:59:22 +00:00
|
|
|
include $(srcdir)/ports.mk
|