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
4feec1f2
Commit
4feec1f2
authored
Apr 21, 2011
by
Pieter Noordhuis
Browse files
Remove rpath from linker flags; link artifacts statically
parent
8f27c968
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
4feec1f2
...
@@ -10,7 +10,7 @@ OPTIMIZATION?=-O3
...
@@ -10,7 +10,7 @@ OPTIMIZATION?=-O3
ifeq
($(uname_S),SunOS)
ifeq
($(uname_S),SunOS)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-D__EXTENSIONS__
-D_XPG6
$(ARCH)
$(PROF)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-D__EXTENSIONS__
-D_XPG6
$(ARCH)
$(PROF)
CCLINK
?=
-ldl
-lnsl
-lsocket
-lm
-lpthread
CCLINK
?=
-ldl
-lnsl
-lsocket
-lm
-lpthread
LDFLAGS
?=
-L
.
-Wl
,-R,.
LDFLAGS
?=
-L
.
DYLIBNAME
?=
libhiredis.so
DYLIBNAME
?=
libhiredis.so
DYLIB_MAKE_CMD
?=
$(CC)
-G
-o
${DYLIBNAME}
${OBJ}
DYLIB_MAKE_CMD
?=
$(CC)
-G
-o
${DYLIBNAME}
${OBJ}
STLIBNAME
?=
libhiredis.a
STLIBNAME
?=
libhiredis.a
...
@@ -19,7 +19,7 @@ else
...
@@ -19,7 +19,7 @@ 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
?=
-lm
-pthread
CCLINK
?=
-lm
-pthread
LDFLAGS
?=
-L
.
-Wl
,-rpath,.
LDFLAGS
?=
-L
.
OBJARCH
?=
-arch
i386
-arch
x86_64
OBJARCH
?=
-arch
i386
-arch
x86_64
DYLIBNAME
?=
libhiredis.dylib
DYLIBNAME
?=
libhiredis.dylib
DYLIB_MAKE_CMD
?=
libtool
-dynamic
-o
${DYLIBNAME}
-lm
${DEBUG}
-
${OBJ}
DYLIB_MAKE_CMD
?=
libtool
-dynamic
-o
${DYLIBNAME}
-lm
${DEBUG}
-
${OBJ}
...
@@ -28,7 +28,7 @@ ifeq ($(uname_S),Darwin)
...
@@ -28,7 +28,7 @@ ifeq ($(uname_S),Darwin)
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
?=
-lm
-pthread
CCLINK
?=
-lm
-pthread
LDFLAGS
?=
-L
.
-Wl
,-rpath,.
LDFLAGS
?=
-L
.
DYLIBNAME
?=
libhiredis.so
DYLIBNAME
?=
libhiredis.so
DYLIB_MAKE_CMD
?=
gcc
-shared
-Wl
,-soname,
${DYLIBNAME}
-o
${DYLIBNAME}
${OBJ}
DYLIB_MAKE_CMD
?=
gcc
-shared
-Wl
,-soname,
${DYLIBNAME}
-o
${DYLIBNAME}
${OBJ}
STLIBNAME
?=
libhiredis.a
STLIBNAME
?=
libhiredis.a
...
@@ -64,23 +64,23 @@ dynamic: ${DYLIBNAME}
...
@@ -64,23 +64,23 @@ dynamic: ${DYLIBNAME}
static
:
${STLIBNAME}
static
:
${STLIBNAME}
# Binaries:
# Binaries:
hiredis-example-libevent
:
example-libevent.c adapters/libevent.h $
{DY
LIBNAME
}
hiredis-example-libevent
:
example-libevent.c adapters/libevent.h $
(ST
LIBNAME
)
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
$(LDFLAGS)
-lhiredis
-levent
example-libevent.c
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
$(LDFLAGS)
$(STLIBNAME)
example-libevent.c
-levent
hiredis-example-libev
:
example-libev.c adapters/libev.h $
{DY
LIBNAME
}
hiredis-example-libev
:
example-libev.c adapters/libev.h $
(ST
LIBNAME
)
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
$(LDFLAGS)
-lhiredis
-lev
example-libev.c
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
$(LDFLAGS)
$(STLIBNAME)
example-libev.c
-lev
ifndef
AE_DIR
ifndef
AE_DIR
hiredis-example-ae
:
hiredis-example-ae
:
@
echo
"Please specify AE_DIR (e.g. <redis repository>/src)"
@
echo
"Please specify AE_DIR (e.g. <redis repository>/src)"
@
false
@
false
else
else
hiredis-example-ae
:
example-ae.c adapters/ae.h $
{DY
LIBNAME
}
hiredis-example-ae
:
example-ae.c adapters/ae.h $
(ST
LIBNAME
)
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
-I
$(AE_DIR)
$(LDFLAGS)
-lhiredis
example-ae.c
$(AE_DIR)
/ae.o
$(AE_DIR)
/zmalloc.o
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
-I
$(AE_DIR)
$(LDFLAGS)
$(STLIBNAME)
example-ae.c
$(AE_DIR)
/ae.o
$(AE_DIR)
/zmalloc.o
endif
endif
hiredis-%
:
%.o $
{DY
LIBNAME
}
hiredis-%
:
%.o $
(ST
LIBNAME
)
$(CC)
-o
$@
$(CCOPT)
$(DEBUG)
$(LDFLAGS)
-lhiredis
$<
$(CC)
-o
$@
$(CCOPT)
$(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