diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2012-04-13 17:43:06 -0700 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2012-04-13 17:52:33 -0700 |
commit | caba58512127599d49153c1dc100dac7574cda46 (patch) | |
tree | a9da5279d2ca3d338935ec4c07560c811d1d906f /src | |
parent | c04278ba3b3cccf1df4d9fc7346c190fc8d0b14a (diff) | |
download | redis-caba58512127599d49153c1dc100dac7574cda46.tar.gz |
First set defaults, then do composition
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/Makefile b/src/Makefile index 9deeda4cc..379599a68 100644 --- a/src/Makefile +++ b/src/Makefile @@ -17,25 +17,11 @@ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') OPTIMIZATION?=-O2 DEPENDENCY_TARGETS=hiredis linenoise lua +# Default settings STD= -std=c99 -pedantic WARN= -Wall OPT= $(OPTIMIZATION) -ifeq ($(uname_S),SunOS) - FINAL_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -D__EXTENSIONS__ -D_XPG6 - FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) - FINAL_LIBS= $(LIBS) -ldl -lnsl -lsocket -lm -lpthread - DEBUG= -g -ggdb -else - FINAL_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) - FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) - FINAL_LIBS= $(LIBS) -lm -pthread - DEBUG= -g -rdynamic -ggdb -endif - -# Include paths to dependencies -FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src - # Default allocator ifeq ($(uname_S),Linux) MALLOC=jemalloc @@ -56,6 +42,21 @@ ifeq ($(USE_JEMALLOC),yes) MALLOC=jemalloc endif +ifeq ($(uname_S),SunOS) + FINAL_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -D__EXTENSIONS__ -D_XPG6 + FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) + FINAL_LIBS= $(LIBS) -ldl -lnsl -lsocket -lm -lpthread + DEBUG= -g -ggdb +else + FINAL_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) + FINAL_LIBS= $(LIBS) -lm -pthread + DEBUG= -g -rdynamic -ggdb +endif + +# Include paths to dependencies +FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src + ifeq ($(MALLOC),tcmalloc) FINAL_CFLAGS+= -DUSE_TCMALLOC FINAL_LIBS+= -ltcmalloc |