aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.mk16
1 files changed, 12 insertions, 4 deletions
diff --git a/config.mk b/config.mk
index 364f8bc..d6daca6 100644
--- a/config.mk
+++ b/config.mk
@@ -1,11 +1,19 @@
+PREFIX ?= /usr/local
+
CXX ?= clang++
CC ?= clang
-LDLIBS = -lm -lstdc++
-CFLAGS += -MD -O0 -ggdb -Wall -std=c99 -I/usr/local/include
-CXXFLAGS += -MD -O0 -ggdb -Wall -std=c++11 -I/usr/local/include
PKG_CONFIG ?= pkg-config
+
+C_STD ?= c99
+CXX_STD ?= c++11
+OPT_LEVEL ?= 0
+WARN_LEVEL ?= all
+
+LDLIBS = -lm -lstdc++
+CFLAGS += -MD -O$(OPT_LEVEL) -ggdb -W$(WARN_LEVEL) -std=$(C_STD) -I$(PREFIX)/include
+CXXFLAGS += -MD -O$(OPT_LEVEL) -ggdb -W$(WARN_LEVEL) -std=$(CXX_STD) -I$(PREFIX)/include
+
DESTDIR ?=
-PREFIX ?= /usr/local
CHIPDB_SUBDIR ?= icebox
ifeq ($(MXE),1)