Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
92e63243
Commit
92e63243
authored
Jan 04, 2012
by
Pieter Noordhuis
Browse files
Factor out optimization from CFLAGS
parent
d9759edb
Changes
3
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
92e63243
...
@@ -62,7 +62,7 @@ check: hiredis-test
...
@@ -62,7 +62,7 @@ check: hiredis-test
kill
`
cat
/tmp/hiredis-test-redis.pid
`
kill
`
cat
/tmp/hiredis-test-redis.pid
`
.c.o
:
.c.o
:
$(CC)
-std
=
c99
-pedantic
-c
$(REAL_CFLAGS)
$<
$(CC)
-std
=
c99
-pedantic
-c
$(OPTIMIZATION)
$(REAL_CFLAGS)
$<
clean
:
clean
:
rm
-rf
$(DYLIBNAME)
$(STLIBNAME)
$(BINS)
hiredis-example
*
*
.o
*
.gcda
*
.gcno
*
.gcov
test
/
*
.o
rm
-rf
$(DYLIBNAME)
$(STLIBNAME)
$(BINS)
hiredis-example
*
*
.o
*
.gcda
*
.gcno
*
.gcov
test
/
*
.o
...
...
Makefile.common
View file @
92e63243
...
@@ -8,7 +8,7 @@ CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
...
@@ -8,7 +8,7 @@ CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
OPTIMIZATION
?=
-O3
OPTIMIZATION
?=
-O3
WARNINGS
=
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
-Wno-unused-label
WARNINGS
=
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
-Wno-unused-label
DEBUG
?=
-g
-ggdb
DEBUG
?=
-g
-ggdb
REAL_CFLAGS
=
$(OPTIMIZATION)
-fPIC
$(CFLAGS)
$(WARNINGS)
$(DEBUG)
REAL_CFLAGS
=
-fPIC
$(CFLAGS)
$(WARNINGS)
$(DEBUG)
REAL_LDFLAGS
=
$(LDFLAGS)
REAL_LDFLAGS
=
$(LDFLAGS)
DYLIBSUFFIX
=
so
DYLIBSUFFIX
=
so
...
...
test/Makefile
View file @
92e63243
...
@@ -8,7 +8,7 @@ test-%: test-%.o
...
@@ -8,7 +8,7 @@ test-%: test-%.o
$(CC)
-o
$@
$(REAL_LDFLAGS)
$<
../
$(STLIBNAME)
$(CC)
-o
$@
$(REAL_LDFLAGS)
$<
../
$(STLIBNAME)
.c.o
:
.c.o
:
$(CC)
-std
=
c99
-pedantic
-c
$(REAL_CFLAGS)
-O0
$<
$(CC)
-std
=
c99
-pedantic
-c
-O0
$(REAL_CFLAGS)
$<
clean
:
clean
:
rm
-f
*
.o
$(TESTS)
rm
-f
*
.o
$(TESTS)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment