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
e4df5892
Commit
e4df5892
authored
Jun 08, 2012
by
Pieter Noordhuis
Browse files
Add more common variables
parent
2afcc9c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
e4df5892
...
...
@@ -28,7 +28,7 @@ dynamic: $(DYLIBNAME)
static
:
$(STLIBNAME)
.c.o
:
$(
CC)
$(FINAL_CFLAGS
)
-c
$<
$(
HIREDIS_CC
)
-c
$<
clean
:
rm
-rf
$(DYLIBNAME)
$(STLIBNAME)
*
.o
...
...
@@ -36,4 +36,4 @@ clean:
-include
./Makefile.dep
dep
:
$(CC)
-MM
*
.c
>
Makefile.dep
$(
HIREDIS_
CC)
-MM
*
.c
>
Makefile.dep
src/Makefile.common
View file @
e4df5892
...
...
@@ -17,15 +17,19 @@ WARN= -Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-unused-label
OPT
=
-O3
FINAL_CFLAGS
=
$(STD)
$(WARN)
$(OPT)
$(DEBUG)
-fPIC
$(CFLAGS)
$(HIREDIS_CFLAGS)
FINAL_LDFLAGS
=
$(DEBUG)
$(LDFLAGS)
$(HIREDIS_LDFLAGS)
FINAL_LIBS
=
$(HIREDIS_LIBS)
DEBUG
=
-g
-ggdb
HIREDIS_CC
=
$(CC)
$(FINAL_CFLAGS)
HIREDIS_LD
=
$(CC)
$(FINAL_LDFLAGS)
uname_S
:=
$(
shell
sh
-c
'uname -s 2>/dev/null || echo not'
)
# SunOS overrides
ifeq
($(uname_S),SunOS)
HIREDIS_CFLAGS
=
-D__EXTENSIONS__
-D_XPG6
HIREDIS_LDFLAGS
=
-ldl
-lnsl
-lsocket
DYLIB_MAKE_CMD
=
$(CC)
-G
-o
$(DYLIBNAME)
-h
$(DYLIB_MINOR_NAME)
$(LDFLAGS)
HIREDIS_LDFLAGS
=
HIREDIS_LIBS
=
-ldl
-lnsl
-lsocket
DYLIB_MAKE_CMD
=
$(CC)
-G
-o
$(DYLIBNAME)
-h
$(DYLIB_MINOR_NAME)
$(FINAL_LDFLAGS)
$(FINAL_LIBS)
INSTALL
=
cp
-r
endif
...
...
@@ -34,5 +38,5 @@ ifeq ($(uname_S),Darwin)
DYLIBSUFFIX
=
dylib
DYLIB_MINOR_NAME
=
$(LIBNAME)
.
$(HIREDIS_MAJOR)
.
$(HIREDIS_MINOR)
.
$(DYLIBSUFFIX)
DYLIB_MAJOR_NAME
=
$(LIBNAME)
.
$(HIREDIS_MAJOR)
.
$(DYLIBSUFFIX)
DYLIB_MAKE_CMD
=
$(CC)
-shared
-Wl
,-install_name,
$(DYLIB_MINOR_NAME)
-o
$(DYLIBNAME)
$(FINAL_LDFLAGS)
DYLIB_MAKE_CMD
=
$(CC)
-shared
-Wl
,-install_name,
$(DYLIB_MINOR_NAME)
-o
$(DYLIBNAME)
$(FINAL_LDFLAGS)
$(FINAL_LIBS)
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