--- a/src/build_tools/autorevision/Makefile.am
+++ b/src/build_tools/autorevision/Makefile.am
@@ -1,3 +1,10 @@
+CC       = cc
+CXX      = g++
+LD       = g++
+CFLAGS   = -O2 -pipe
+CXXFLAGS = -O2 -pipe
+LDFLAGS  = -s
+
 noinst_PROGRAMS = auto_revision
 auto_revision_SOURCES = autorevision.cpp
 
--- a/src/build_tools/autorevision/Makefile.in
+++ b/src/build_tools/autorevision/Makefile.in
@@ -237,19 +237,19 @@ CB_SQUIRREL_CFLAGS = @CB_SQUIRREL_CFLAGS
 CB_SQUIRREL_LIBS = @CB_SQUIRREL_LIBS@
 CB_TINYXML_CFLAGS = @CB_TINYXML_CFLAGS@
 CB_TINYXML_LIBS = @CB_TINYXML_LIBS@
-CC = @CC@
+CC = cc
 CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
+CFLAGS := -O2 -pipe
 CODEBLOCKS_PLATFORM = @CODEBLOCKS_PLATFORM@
 CODEBLOCKS_VERSION_INFO = @CODEBLOCKS_VERSION_INFO@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
+CPP = cpp
+CPPFLAGS := -DNDEBUG
 CSCOPE = @CSCOPE@
 CTAGS = @CTAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
+CXX = g++
+CXXCPP = g++
 CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
+CXXFLAGS = -O2 -pipe
 CYGPATH_W = @CYGPATH_W@
 DATE = @DATE@
 DEFS = @DEFS@
@@ -287,8 +287,8 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
+LD = g++
+LDFLAGS = -s
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
