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')
...
@@ -17,8 +17,7 @@ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
OPTIMIZATION
?=
-O3
OPTIMIZATION
?=
-O3
ifeq
($(uname_S),SunOS)
ifeq
($(uname_S),SunOS)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
$(ARCH)
$(PROF)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
$(ARCH)
$(PROF)
CCLINK
?=
-ldl
-lnsl
-lsocket
LDFLAGS
?=
-ldl
-lnsl
-lsocket
LDFLAGS
?=
-L
.
DYLIBSUFFIX
=
so
DYLIBSUFFIX
=
so
STLIBSUFFIX
=
a
STLIBSUFFIX
=
a
DYLIB_MINOR_NAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
.
$(HIREDIS_MAJOR)
.
$(HIREDIS_MINOR)
DYLIB_MINOR_NAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
.
$(HIREDIS_MAJOR)
.
$(HIREDIS_MINOR)
...
@@ -31,8 +30,6 @@ ifeq ($(uname_S),SunOS)
...
@@ -31,8 +30,6 @@ ifeq ($(uname_S),SunOS)
else
else
ifeq
($(uname_S),Darwin)
ifeq
($(uname_S),Darwin)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CCLINK
?=
LDFLAGS
?=
-L
.
OBJARCH
?=
-arch
i386
-arch
x86_64
OBJARCH
?=
-arch
i386
-arch
x86_64
DYLIBSUFFIX
=
dylib
DYLIBSUFFIX
=
dylib
STLIBSUFFIX
=
a
STLIBSUFFIX
=
a
...
@@ -45,8 +42,6 @@ ifeq ($(uname_S),Darwin)
...
@@ -45,8 +42,6 @@ ifeq ($(uname_S),Darwin)
INSTALL
=
cp
-a
INSTALL
=
cp
-a
else
else
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CCLINK
?=
LDFLAGS
?=
-L
.
DYLIBSUFFIX
=
so
DYLIBSUFFIX
=
so
STLIBSUFFIX
=
a
STLIBSUFFIX
=
a
DYLIB_MINOR_NAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
.
$(HIREDIS_MAJOR)
.
$(HIREDIS_MINOR)
DYLIB_MINOR_NAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
.
$(HIREDIS_MAJOR)
.
$(HIREDIS_MINOR)
...
@@ -59,7 +54,6 @@ else
...
@@ -59,7 +54,6 @@ else
endif
endif
endif
endif
CCOPT
=
$(CFLAGS)
$(CCLINK)
DEBUG
?=
-g
-ggdb
DEBUG
?=
-g
-ggdb
PREFIX
?=
/usr/local
PREFIX
?=
/usr/local
...
@@ -89,10 +83,10 @@ static: $(STLIBNAME)
...
@@ -89,10 +83,10 @@ static: $(STLIBNAME)
# Binaries:
# Binaries:
hiredis-example-libevent
:
example-libevent.c adapters/libevent.h $(STLIBNAME)
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)
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
ifndef
AE_DIR
hiredis-example-ae
:
hiredis-example-ae
:
...
@@ -100,11 +94,11 @@ hiredis-example-ae:
...
@@ -100,11 +94,11 @@ hiredis-example-ae:
@
false
@
false
else
else
hiredis-example-ae
:
example-ae.c adapters/ae.h $(STLIBNAME)
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
endif
hiredis-%
:
%.o $(STLIBNAME)
hiredis-%
:
%.o $(STLIBNAME)
$(CC)
-o
$@
$(C
COPT
)
$(DEBUG)
$(LDFLAGS)
$<
$(STLIBNAME)
$(CC)
-o
$@
$(C
FLAGS
)
$(DEBUG)
$(LDFLAGS)
$<
$(STLIBNAME)
test
:
hiredis-test
test
:
hiredis-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