summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 18:13:20 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2011-04-21 18:13:30 +0200
commit75bc8595c72fba7bd77ac99249d49d3ade1ef7fd (patch)
treef4222f2ad5f6e8dbb956323060c59e90ae5409be /Makefile
parenteb63a565e922142c9250b664b118bb0f11bf3aeb (diff)
Only use C99 for compiling hiredis itself
The libevent example cannot be compiled when -std=c99 is passed. It is not necessary that the adapters nor the examples follow this standard, as long as the code for hiredis itself is compliant.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 8ba84e4..c7b90b1 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ BINS = hiredis-example hiredis-test
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
OPTIMIZATION?=-O3
ifeq ($(uname_S),SunOS)
- CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -D__EXTENSIONS__ -D_XPG6 $(ARCH) $(PROF)
+ CFLAGS?=$(OPTIMIZATION) -fPIC -Wall -W -D__EXTENSIONS__ -D_XPG6 $(ARCH) $(PROF)
CCLINK?=-ldl -lnsl -lsocket -lm -lpthread
LDFLAGS?=-L. -Wl,-R,.
DYLIBNAME?=libhiredis.so
@@ -17,7 +17,7 @@ ifeq ($(uname_S),SunOS)
STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
else
ifeq ($(uname_S),Darwin)
- CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
+ CFLAGS?=$(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
CCLINK?=-lm -pthread
LDFLAGS?=-L. -Wl,-rpath,.
OBJARCH?=-arch i386 -arch x86_64
@@ -26,7 +26,7 @@ ifeq ($(uname_S),Darwin)
STLIBNAME?=libhiredis.a
STLIB_MAKE_CMD?=libtool -static -o ${STLIBNAME} - ${OBJ}
else
- CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
+ CFLAGS?=$(OPTIMIZATION) -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings $(ARCH) $(PROF)
CCLINK?=-lm -pthread
LDFLAGS?=-L. -Wl,-rpath,.
DYLIBNAME?=libhiredis.so
@@ -86,7 +86,7 @@ test: hiredis-test
./hiredis-test
.c.o:
- $(CC) -c $(CFLAGS) $(OBJARCH) $(DEBUG) $(COMPILE_TIME) $<
+ $(CC) -std=c99 -pedantic -c $(CFLAGS) $(OBJARCH) $(DEBUG) $(COMPILE_TIME) $<
clean:
rm -rf ${DYLIBNAME} ${STLIBNAME} $(BINS) hiredis-example* *.o *.gcda *.gcno *.gcov