diff options
Diffstat (limited to 'Make.config')
-rw-r--r-- | Make.config | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/Make.config b/Make.config index a7e2c8b..66bf692 100644 --- a/Make.config +++ b/Make.config @@ -10,11 +10,17 @@ PREFIX = /usr/local DEBUG = 1 +#USE_CLANG = 1 # ----------------------- # don't touch below ;) -CC = g++ +ifdef USE_CLANG + CC = clang++ +else + CC = g++ +endif + doCompile = $(CC) -c $(CFLAGS) $(DEFINES) doLink = $(CC) $(LFLAGS) doLib = ar -rs @@ -28,14 +34,20 @@ ifdef DEBUG CXXFLAGS += -ggdb -O0 endif -CXXFLAGS += -fPIC -Wreturn-type -Wall -Wno-parentheses -Wformat -pedantic \ - -Wno-long-long -Wunused-variable -Wunused-label -Wno-unused-result \ - -Wunused-value -Wunused-but-set-variable -Wunused-function -Wno-variadic-macros \ - -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +CXXFLAGS += -fPIC -Wreturn-type -Wall -Wno-parentheses -Wformat -pedantic \ + -Wno-long-long -Wunused-variable -Wunused-label -Wno-unused-result \ + -Wunused-value -Wunused-function -Wno-variadic-macros \ + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +CXXFLAGS += -std=c++11 -D__STDC_FORMAT_MACROS -CXXFLAGS += -std=c++11 -D__STDC_FORMAT_MACROS +ifdef USE_CLANG + CXXFLAGS += -x c++ -Wunused-const-variable +else + CXXFLAGS += -Wunused-but-set-variable +endif -CFLAGS += $(CXXFLAGS) +DEFINES += -D__STL_CONFIG_H +CFLAGS += $(CXXFLAGS) %.o: %.c $(doCompile) -o $@ $< |