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
721e390d
Commit
721e390d
authored
Apr 22, 2011
by
Pieter Noordhuis
Browse files
Separate basename and suffix for library filename
parent
5c205359
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
721e390d
...
...
@@ -2,8 +2,9 @@
# Copyright (C) 2010 Salvatore Sanfilippo <antirez at gmail dot com>
# This file is released under the BSD license, see the COPYING file
OBJ
=
net.o hiredis.o sds.o async.o
BINS
=
hiredis-example hiredis-test
OBJ
=
net.o hiredis.o sds.o async.o
BINS
=
hiredis-example hiredis-test
LIBNAME
=
libhiredis
uname_S
:=
$(
shell
sh
-c
'uname -s 2>/dev/null || echo not'
)
OPTIMIZATION
?=
-O3
...
...
@@ -11,28 +12,34 @@ ifeq ($(uname_S),SunOS)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-D__EXTENSIONS__
-D_XPG6
$(ARCH)
$(PROF)
CCLINK
?=
-ldl
-lnsl
-lsocket
-lm
-lpthread
LDFLAGS
?=
-L
.
DYLIBNAME
?=
libhiredis.so
DYLIB_MAKE_CMD
?=
$(CC)
-G
-o
${DYLIBNAME}
${OBJ}
STLIBNAME
?=
libhiredis.a
STLIB_MAKE_CMD
?=
ar rcs
${STLIBNAME}
${OBJ}
DYLIBSUFFIX
=
so
STLIBSUFFIX
=
a
DYLIBNAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
DYLIB_MAKE_CMD
?=
$(CC)
-G
-o
$(DYLIBNAME)
$(OBJ)
STLIBNAME
?=
$(LIBNAME)
.
$(STLIBSUFFIX)
STLIB_MAKE_CMD
?=
ar rcs
$(STLIBNAME)
$(OBJ)
else
ifeq
($(uname_S),Darwin)
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CCLINK
?=
-lm
-pthread
LDFLAGS
?=
-L
.
OBJARCH
?=
-arch
i386
-arch
x86_64
DYLIBNAME
?=
libhiredis.dylib
DYLIB_MAKE_CMD
?=
libtool
-dynamic
-o
${DYLIBNAME}
-lm
${DEBUG}
-
${OBJ}
STLIBNAME
?=
libhiredis.a
STLIB_MAKE_CMD
?=
libtool
-static
-o
${STLIBNAME}
-
${OBJ}
DYLIBSUFFIX
=
dylib
STLIBSUFFIX
=
a
DYLIBNAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
DYLIB_MAKE_CMD
?=
libtool
-dynamic
-o
$(DYLIBNAME)
-lm
$(DEBUG)
-
$(OBJ)
STLIBNAME
?=
$(LIBNAME)
.
$(STLIBSUFFIX)
STLIB_MAKE_CMD
?=
libtool
-static
-o
$(STLIBNAME)
-
$(OBJ)
else
CFLAGS
?=
$(OPTIMIZATION)
-fPIC
-Wall
-W
-Wstrict-prototypes
-Wwrite-strings
$(ARCH)
$(PROF)
CCLINK
?=
-lm
-pthread
LDFLAGS
?=
-L
.
DYLIBNAME
?=
libhiredis.so
DYLIB_MAKE_CMD
?=
gcc
-shared
-Wl
,-soname,
${DYLIBNAME}
-o
${DYLIBNAME}
${OBJ}
STLIBNAME
?=
libhiredis.a
STLIB_MAKE_CMD
?=
ar rcs
${STLIBNAME}
${OBJ}
DYLIBSUFFIX
=
so
STLIBSUFFIX
=
a
DYLIBNAME
?=
$(LIBNAME)
.
$(DYLIBSUFFIX)
DYLIB_MAKE_CMD
?=
gcc
-shared
-Wl
,-soname,
$(DYLIBNAME)
-o
$(DYLIBNAME)
$(OBJ)
STLIBNAME
?=
$(LIBNAME)
.
$(STLIBSUFFIX)
STLIB_MAKE_CMD
?=
ar rcs
$(STLIBNAME)
$(OBJ)
endif
endif
...
...
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