Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
58ebe7ac
Commit
58ebe7ac
authored
Jun 18, 2011
by
Pieter Noordhuis
Browse files
Merge DEBUG in REAL_CFLAGS
parent
fc810f77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
58ebe7ac
...
...
@@ -14,9 +14,9 @@ HIREDIS_MINOR=10
CC
:=
$(
shell
sh
-c
'type
$(CC)
>/dev/null 2>/dev/null && echo
$(CC)
|| echo gcc'
)
OPTIMIZATION
?=
-O3
WARNINGS
=
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
REAL_CFLAGS
=
$(OPTIMIZATION)
-fPIC
$(CFLAGS)
$(WARNINGS)
$(ARCH)
$(PROF)
REAL_LDFLAGS
=
$(LDFLAGS)
DEBUG
?=
-g
-ggdb
REAL_CFLAGS
=
$(OPTIMIZATION)
-fPIC
$(CFLAGS)
$(WARNINGS)
$(ARCH)
$(PROF)
$(DEBUG)
REAL_LDFLAGS
=
$(LDFLAGS)
DYLIBSUFFIX
=
so
STLIBSUFFIX
=
a
...
...
@@ -67,10 +67,10 @@ static: $(STLIBNAME)
# Binaries:
hiredis-example-libevent
:
example-libevent.c adapters/libevent.h $(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
$(DEBUG)
$(REAL_LDFLAGS)
-levent
example-libevent.c
$(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
$(REAL_LDFLAGS)
-levent
example-libevent.c
$(STLIBNAME)
hiredis-example-libev
:
example-libev.c adapters/libev.h $(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
$(DEBUG)
$(REAL_LDFLAGS)
-lev
example-libev.c
$(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
$(REAL_LDFLAGS)
-lev
example-libev.c
$(STLIBNAME)
ifndef
AE_DIR
hiredis-example-ae
:
...
...
@@ -78,11 +78,11 @@ hiredis-example-ae:
@
false
else
hiredis-example-ae
:
example-ae.c adapters/ae.h $(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
$(DEBUG)
-I
$(AE_DIR)
$(REAL_LDFLAGS)
$(AE_DIR)
/ae.o
$(AE_DIR)
/zmalloc.o example-ae.c
$(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
-I
$(AE_DIR)
$(REAL_LDFLAGS)
$(AE_DIR)
/ae.o
$(AE_DIR)
/zmalloc.o example-ae.c
$(STLIBNAME)
endif
hiredis-%
:
%.o $(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
$(DEBUG)
$(REAL_LDFLAGS)
$<
$(STLIBNAME)
$(CC)
-o
$@
$(REAL_CFLAGS)
$(REAL_LDFLAGS)
$<
$(STLIBNAME)
test
:
hiredis-test
./hiredis-test
...
...
@@ -100,7 +100,7 @@ check: hiredis-test
kill
`
cat
/tmp/hiredis-test-redis.pid
`
.c.o
:
$(CC)
-std
=
c99
-pedantic
-c
$(REAL_CFLAGS)
$(OBJARCH)
$(DEBUG)
$(COMPILE_TIME)
$<
$(CC)
-std
=
c99
-pedantic
-c
$(REAL_CFLAGS)
$(OBJARCH)
$(COMPILE_TIME)
$<
clean
:
rm
-rf
$(DYLIBNAME)
$(STLIBNAME)
$(BINS)
hiredis-example
*
*
.o
*
.gcda
*
.gcno
*
.gcov
...
...
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