Commit 92e63243 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Factor out optimization from CFLAGS

parent d9759edb
......@@ -62,7 +62,7 @@ check: hiredis-test
kill `cat /tmp/hiredis-test-redis.pid`
.c.o:
$(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
$(CC) -std=c99 -pedantic -c $(OPTIMIZATION) $(REAL_CFLAGS) $<
clean:
rm -rf $(DYLIBNAME) $(STLIBNAME) $(BINS) hiredis-example* *.o *.gcda *.gcno *.gcov test/*.o
......
......@@ -8,7 +8,7 @@ CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
OPTIMIZATION?=-O3
WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-unused-label
DEBUG?= -g -ggdb
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG)
REAL_CFLAGS=-fPIC $(CFLAGS) $(WARNINGS) $(DEBUG)
REAL_LDFLAGS=$(LDFLAGS)
DYLIBSUFFIX=so
......
......@@ -8,7 +8,7 @@ test-%: test-%.o
$(CC) -o $@ $(REAL_LDFLAGS) $< ../$(STLIBNAME)
.c.o:
$(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) -O0 $<
$(CC) -std=c99 -pedantic -c -O0 $(REAL_CFLAGS) $<
clean:
rm -f *.o $(TESTS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment