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
2ccb6e58
Commit
2ccb6e58
authored
Jun 18, 2011
by
Pieter Noordhuis
Browse files
Merge CCLINK with LDFLAGS
parent
367ac44a
Changes
1
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
2ccb6e58
...
...
@@ -17,8 +17,7 @@ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
OPTIMIZATION
?=
-O3
ifeq
($(uname_S),SunOS)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
$(ARCH)
$(PROF)
CCLINK
?=
-ldl
-lnsl
-lsocket
LDFLAGS
?=
-L
.
LDFLAGS
?=
-ldl
-lnsl
-lsocket
DYLIBSUFFIX
=
so
STLIBSUFFIX
=
a
DYLIB_MINOR_NAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
.
$(HIREDIS_MAJOR)
.
$(HIREDIS_MINOR)
...
...
@@ -31,8 +30,6 @@ ifeq ($(uname_S),SunOS)
else
ifeq
($(uname_S),Darwin)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CCLINK
?=
LDFLAGS
?=
-L
.
OBJARCH
?=
-arch
i386
-arch
x86_64
DYLIBSUFFIX
=
dylib
STLIBSUFFIX
=
a
...
...
@@ -45,8 +42,6 @@ ifeq ($(uname_S),Darwin)
INSTALL
=
cp
-a
else
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CCLINK
?=
LDFLAGS
?=
-L
.
DYLIBSUFFIX
=
so
STLIBSUFFIX
=
a
DYLIB_MINOR_NAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
.
$(HIREDIS_MAJOR)
.
$(HIREDIS_MINOR)
...
...
@@ -59,7 +54,6 @@ else
endif
endif
CCOPT
=
$(CFLAGS)
$(CCLINK)
DEBUG
?=
-g
-ggdb
PREFIX
?=
/usr/local
...
...
@@ -89,10 +83,10 @@ static: $(STLIBNAME)
# Binaries:
hiredis-example-libevent
:
example-libevent.c adapters/libevent.h $(STLIBNAME)
$(CC)
-o
$@
$(C
COPT
)
$(DEBUG)
$(LDFLAGS)
-levent
example-libevent.c
$(STLIBNAME)
$(CC)
-o
$@
$(C
FLAGS
)
$(DEBUG)
$(LDFLAGS)
-levent
example-libevent.c
$(STLIBNAME)
hiredis-example-libev
:
example-libev.c adapters/libev.h $(STLIBNAME)
$(CC)
-o
$@
$(C
COPT
)
$(DEBUG)
$(LDFLAGS)
-lev
example-libev.c
$(STLIBNAME)
$(CC)
-o
$@
$(C
FLAGS
)
$(DEBUG)
$(LDFLAGS)
-lev
example-libev.c
$(STLIBNAME)
ifndef
AE_DIR
hiredis-example-ae
:
...
...
@@ -100,11 +94,11 @@ hiredis-example-ae:
@
false
else
hiredis-example-ae
:
example-ae.c adapters/ae.h $(STLIBNAME)
$(CC)
-o
$@
$(C
COPT
)
$(DEBUG)
-I
$(AE_DIR)
$(LDFLAGS)
$(AE_DIR)
/ae.o
$(AE_DIR)
/zmalloc.o example-ae.c
$(STLIBNAME)
$(CC)
-o
$@
$(C
FLAGS
)
$(DEBUG)
-I
$(AE_DIR)
$(LDFLAGS)
$(AE_DIR)
/ae.o
$(AE_DIR)
/zmalloc.o example-ae.c
$(STLIBNAME)
endif
hiredis-%
:
%.o $(STLIBNAME)
$(CC)
-o
$@
$(C
COPT
)
$(DEBUG)
$(LDFLAGS)
$<
$(STLIBNAME)
$(CC)
-o
$@
$(C
FLAGS
)
$(DEBUG)
$(LDFLAGS)
$<
$(STLIBNAME)
test
:
hiredis-test
./hiredis-test
...
...
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