4 #######################################################################
5 # Default compilation parameters. Normally don't edit these #
6 #######################################################################
10 DEFINES
:= -DHAVE_CONFIG_H
12 INCLUDES
:= -I.
-I
$(srcdir) -I
$(srcdir)/engines
20 # Load the make rules generated by configure
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
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 #######################################################################
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"
71 LDFLAGS
="$(SAVED_LDFLAGS)" CXX
="$(SAVED_CXX)" CXXFLAGS
="$(SAVED_CXXFLAGS)" CPPFLAGS
="$(SAVED_CPPFLAGS)" \
72 $(srcdir)/configure
$(SAVED_CONFIGFLAGS
)
74 $(error You need to run
$(srcdir)/configure before you can run make. Check
$(srcdir)/configure
--help for a list of parameters
)
77 include $(srcdir)/ports.mk