- Changed default compiler flags to include -O2
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bae87e3..2a25057 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,9 +4,9 @@
enable_testing()
if(CMAKE_COMPILER_IS_GNUCC)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -Wdeclaration-after-statement")
- set(CMAKE_C_FLAGS_DEBUG "-g -O0")
- set(CMAKE_C_FLAGS_COVERAGE "-g -O0 -fprofile-arcs -ftest-coverage -lgcov")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -Wextra -W -Wdeclaration-after-statement")
+ set(CMAKE_C_FLAGS_DEBUG "-g3 -O0")
+ set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 -fprofile-arcs -ftest-coverage -lgcov")
endif(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_BUILD_TYPE STREQUAL "Coverage")
diff --git a/library/Makefile b/library/Makefile
index cd25c51..7983f7b 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -5,7 +5,7 @@
# environment
#
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
-OFLAGS = -O
+OFLAGS = -O2
ifdef DEBUG
CFLAGS += -g3
diff --git a/programs/Makefile b/programs/Makefile
index adc66ce..9b0d1f5 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -4,7 +4,7 @@
# To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
-OFLAGS = -O
+OFLAGS = -O2
LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS)
ifdef DEBUG
diff --git a/tests/Makefile b/tests/Makefile
index 2ebb9f5..4c97aa5 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -6,7 +6,7 @@
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement \
-Wno-unused-function -Wno-unused-value
-OFLAGS = -O
+OFLAGS = -O2
LDFLAGS += -L../library -lpolarssl $(SYS_LDFLAGS)
ifdef DEBUG