Change CRs to LFs for better debug. Opcode 0x54 ask stub.
[scummvm-innocent.git] / Makefile
blob5771e692dc617358b2e0865c2d7bd8c267917ff2
1 # $URL$
2 # $Id$
4 #######################################################################
5 # Default compilation parameters. Normally don't edit these #
6 #######################################################################
8 srcdir ?= .
10 DEFINES := -DHAVE_CONFIG_H
11 LDFLAGS :=
12 INCLUDES := -I. -I$(srcdir) -I$(srcdir)/engines
13 LIBS :=
14 OBJS :=
15 DEPDIR := .deps
17 MODULES :=
18 MODULE_DIRS :=
20 # Load the make rules generated by configure
21 -include config.mk
23 CXXFLAGS:= -Wall $(CXXFLAGS)
24 # Turn off some annoying and not-so-useful warnings
25 CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
26 # Enable even more warnings...
27 CXXFLAGS+= -Wpointer-arith -Wcast-qual -Wcast-align
28 CXXFLAGS+= -Wshadow -Wimplicit -Wnon-virtual-dtor -Wwrite-strings
30 # Currently we disable this gcc flag, since it will also warn in cases,
31 # where using GCC_PRINTF (means: __attribute__((format(printf, x, y))))
32 # is not possible, thus it would fail compiliation with -Werror without
33 # being helpful.
34 #CXXFLAGS+= -Wmissing-format-attribute
36 # Disable RTTI and exceptions, and enabled checking of pointers returned by "new"
37 CXXFLAGS+= -fno-rtti -fno-exceptions -fcheck-new
39 # There is a nice extra warning that flags variables that are potentially
40 # used before being initialized. Very handy to catch a certain kind of
41 # bugs. Unfortunately, it only works when optimizations are turned on,
42 # which is why we normally don't use it.
43 #CXXFLAGS+= -O -Wuninitialized
45 #######################################################################
46 # Default commands - put the necessary replacements in config.mk #
47 #######################################################################
49 CAT ?= cat
50 CP ?= cp
51 ECHO ?= printf
52 INSTALL ?= install
53 MKDIR ?= mkdir -p
54 RM ?= rm -f
55 RM_REC ?= $(RM) -r
56 ZIP ?= zip -q
58 #######################################################################
59 # Misc stuff - you should never have to edit this #
60 #######################################################################
62 EXECUTABLE := scummvm$(EXEEXT)
64 include $(srcdir)/Makefile.common
66 # check if configure has been run or has been changed since last run
67 config.h config.mk: $(srcdir)/configure
68 ifeq "$(findstring config.mk,$(MAKEFILE_LIST))" "config.mk"
69 @echo "Running $(srcdir)/configure with the last specified parameters"
70 @sleep 2
71 LDFLAGS="$(SAVED_LDFLAGS)" CXX="$(SAVED_CXX)" CXXFLAGS="$(SAVED_CXXFLAGS)" CPPFLAGS="$(SAVED_CPPFLAGS)" \
72 $(srcdir)/configure $(SAVED_CONFIGFLAGS)
73 else
74 $(error You need to run $(srcdir)/configure before you can run make. Check $(srcdir)/configure --help for a list of parameters)
75 endif
77 include $(srcdir)/ports.mk