aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 88e0e9d..763a2e8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,13 @@
-CFLAGS = -I. -L. -std=c99 -pedantic -Wall -Werror -O3 -g
-CC = gcc
+CFLAGS = -I. -L. -std=c99 -pedantic
+CC?=gcc
LIBNAME = libctemplates.a
BIN_POSTFIX = .exe
+ifeq ($(DEBUG),true)
+ CFLAGS += -g -O0 -Wall -Werror
+else
+ CFLAGS += -03
+endif
TEST_1_NAME = t/test_1$(BIN_POSTFIX)