From 850486363658c8bcaa75d33a0c94eddaf6beabcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 8 May 2010 12:57:44 +0200 Subject: [PATCH] dmake: updated compiler flags in release mode. only -Wall. --- tools/dmake.cpp | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/tools/dmake.cpp b/tools/dmake.cpp index bd6e69dd0..c81e53de8 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -145,11 +145,26 @@ int main(int argc, char **argv) std::ofstream fout("Makefile"); // Makefile settings.. - // TODO: add more compiler warnings. - // -Wsign-conversion : generates too many compiler warnings currently - // -Wlogical-op : doesn't work on older GCC - fout << "CXXFLAGS=-Wall -Wextra -Wshadow -pedantic -Wno-long-long -Wfloat-equal -Wcast-qual "; - fout << (release ? "-O2 -DNDEBUG" : "-g -D_GLIBCXX_DEBUG") << "\n"; + if (release) + { + fout << "CXXFLAGS=-O2 -DNDEBUG -Wall\n"; + } + else + { + // TODO: add more compiler warnings. + // -Wsign-conversion : generates too many compiler warnings currently + // -Wlogical-op : doesn't work on older GCC + + fout << "CXXFLAGS=" + << "-Wall " + << "-Wextra " + << "-Wshadow " + << "-pedantic " + << "-Wno-long-long " + << "-Wfloat-equal " + << "-Wcast-qual " + << "-g -D_GLIBCXX_DEBUG\n"; + } fout << "CXX=g++\n"; fout << "BIN=${DESTDIR}/usr/bin\n\n"; fout << "# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml\n";