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
redis
Commits
567d575d
Commit
567d575d
authored
Jun 08, 2011
by
antirez
Browse files
Color make backported to 2.4
parent
a7982fed
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Makefile
View file @
567d575d
...
...
@@ -6,6 +6,18 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh')
uname_S
:=
$(
shell
sh
-c
'uname -s 2>/dev/null || echo not'
)
OPTIMIZATION
?=
-O2
CCCOLOR
=
"
\0
33[34m"
LINKCOLOR
=
"
\0
33[34;1m"
SRCCOLOR
=
"
\0
33[33m"
BINCOLOR
=
"
\0
33[37;1m"
MAKECOLOR
=
"
\0
33[32;1m"
ENDCOLOR
=
"
\0
33[0m"
ifndef
V
QUIET_CC
=
@echo
' '
$(CCCOLOR)
CC
$(ENDCOLOR)
$(SRCCOLOR)$@$(ENDCOLOR)
;
QUIET_LINK
=
@echo
' '
$(LINKCOLOR)
LINK
$(ENDCOLOR)
$(BINCOLOR)$@$(ENDCOLOR)
;
endif
ifeq
($(uname_S),Linux)
ifneq
($(FORCE_LIBC_MALLOC),yes)
USE_JEMALLOC
=
yes
...
...
@@ -132,44 +144,48 @@ zmalloc.o: zmalloc.c config.h zmalloc.h
.PHONY
:
dependencies
dependencies
:
cd
../deps/hiredis
&&
$(MAKE)
static
ARCH
=
"
$(ARCH)
"
cd
../deps/linenoise
&&
$(MAKE)
ARCH
=
"
$(ARCH)
"
@
echo
$(MAKECOLOR)
MAKE
$(ENDCOLOR)
$(BINCOLOR)
hiredis
$(ENDCOLOR)
@
cd
../deps/hiredis
&&
$(MAKE)
static
ARCH
=
"
$(ARCH)
"
@
echo
$(MAKECOLOR)
MAKE
$(ENDCOLOR)
$(BINCOLOR)
linenoise
$(ENDCOLOR)
@
cd
../deps/linenoise
&&
$(MAKE)
ARCH
=
"
$(ARCH)
"
../deps/jemalloc/lib/libjemalloc.a
:
cd
../deps/jemalloc
&&
./configure
$(JEMALLOC_CFLAGS)
--with-jemalloc-prefix
=
je_
--enable-cc-silence
&&
$(MAKE)
lib/libjemalloc.a
@
echo
$(MAKECOLOR)
MAKE
$(ENDCOLOR)
$(BINCOLOR)
jemalloc
$(ENDCOLOR)
@
cd
../deps/jemalloc
&&
./configure
$(JEMALLOC_CFLAGS)
--with-jemalloc-prefix
=
je_
--enable-cc-silence
&&
$(MAKE)
lib/libjemalloc.a
redis-benchmark.o
:
$(CC)
-c
$(CFLAGS)
-I
../deps/hiredis
$(DEBUG)
$(COMPILE_TIME)
$<
$(QUIET_CC)
$(CC)
-c
$(CFLAGS)
-I
../deps/hiredis
$(DEBUG)
$(COMPILE_TIME)
$<
redis-benchmark
:
dependencies $(BENCHOBJ)
cd
../deps/hiredis
&&
$(MAKE)
static
$(CC)
-o
$(BENCHPRGNAME)
$(CCOPT)
$(DEBUG)
$(BENCHOBJ)
../deps/hiredis/libhiredis.a
$(CCLINK)
$(ALLOC_LINK)
@
echo
$(MAKECOLOR)
MAKE
$(ENDCOLOR)
$(BINCOLOR)
hiredis
$(ENDCOLOR)
@
cd
../deps/hiredis
&&
$(MAKE)
static
ARCH
=
"
$(ARCH)
"
$(QUIET_LINK)$(CC)
-o
$(BENCHPRGNAME)
$(CCOPT)
$(DEBUG)
$(BENCHOBJ)
../deps/hiredis/libhiredis.a
$(CCLINK)
$(ALLOC_LINK)
redis-cli.o
:
$(CC)
-c
$(CFLAGS)
-I
../deps/hiredis
-I
../deps/linenoise
$(DEBUG)
$(COMPILE_TIME)
$<
$(QUIET_CC)
$(CC)
-c
$(CFLAGS)
-I
../deps/hiredis
-I
../deps/linenoise
$(DEBUG)
$(COMPILE_TIME)
$<
redis-cli
:
dependencies $(CLIOBJ)
$(CC)
-o
$(CLIPRGNAME)
$(CCOPT)
$(DEBUG)
$(CLIOBJ)
../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o
$(CCLINK)
$(ALLOC_LINK)
$(QUIET_LINK)
$(CC)
-o
$(CLIPRGNAME)
$(CCOPT)
$(DEBUG)
$(CLIOBJ)
../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o
$(CCLINK)
$(ALLOC_LINK)
redis-check-dump.o
:
$(CC)
-c
$(CFLAGS)
$(DEBUG)
$(COMPILE_TIME)
$<
$(QUIET_CC)
$(CC)
-c
$(CFLAGS)
$(DEBUG)
$(COMPILE_TIME)
$<
redis-check-dump
:
$(CHECKDUMPOBJ)
$(CC)
-o
$(CHECKDUMPPRGNAME)
$(CCOPT)
$(DEBUG)
$(CHECKDUMPOBJ)
$(CCLINK)
$(QUIET_LINK)
$(CC)
-o
$(CHECKDUMPPRGNAME)
$(CCOPT)
$(DEBUG)
$(CHECKDUMPOBJ)
$(CCLINK)
redis-check-aof.o
:
$(CC)
-c
$(CFLAGS)
$(DEBUG)
$(COMPILE_TIME)
$<
$(QUIET_CC)
$(CC)
-c
$(CFLAGS)
$(DEBUG)
$(COMPILE_TIME)
$<
redis-check-aof
:
$(CHECKAOFOBJ)
$(CC)
-o
$(CHECKAOFPRGNAME)
$(CCOPT)
$(DEBUG)
$(CHECKAOFOBJ)
$(CCLINK)
$(QUIET_LINK)
$(CC)
-o
$(CHECKAOFPRGNAME)
$(CCOPT)
$(DEBUG)
$(CHECKAOFOBJ)
$(CCLINK)
redis-server
:
$(OBJ)
$(CC)
-o
$(PRGNAME)
$(CCOPT)
$(DEBUG)
$(OBJ)
$(CCLINK)
$(ALLOC_LINK)
$(QUIET_LINK)
$(CC)
-o
$(PRGNAME)
$(CCOPT)
$(DEBUG)
$(OBJ)
$(CCLINK)
$(ALLOC_LINK)
# Because the jemalloc.h header is generated as a part of the jemalloc build
# process, building it should complete before building any other object.
%.o
:
%.c $(ALLOC_DEP)
$(CC)
-c
$(CFLAGS)
$(ALLOC_FLAGS)
$(DEBUG)
$(COMPILE_TIME)
$<
$(QUIET_CC)
$(CC)
-c
$(CFLAGS)
$(ALLOC_FLAGS)
$(DEBUG)
$(COMPILE_TIME)
$<
clean
:
rm
-rf
$(PRGNAME)
$(BENCHPRGNAME)
$(CLIPRGNAME)
$(CHECKDUMPPRGNAME)
$(CHECKAOFPRGNAME)
*
.o
*
.gcda
*
.gcno
*
.gcov
...
...
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