forked from shenzhe/redis-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (32 loc) · 1.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Top level makefile, the real shit is at src/Makefile
default: all
.DEFAULT:
cd deps/lua && $(MAKE) $@
cd deps/hiredis && $(MAKE) $@
cd deps/linenoise && $(MAKE)
cd src && $(MAKE) $@
init:
cd deps/gperftools-2.0 && ./configure --enable-minimal --enable-frame-pointers && make
cd deps && tar xzvf snappy-1.1.0.tar.gz && cd snappy-1.1.0 && ./configure && make
rm -rf /usr/local/lib/libsnappy.so.1
cp ./deps/snappy-1.1.0/.libs/libsnappy.so.1 /usr/local/lib
ldconfig
chmod +x deps/leveldb-1.10.0/build_detect_platform
cd deps/leveldb-1.10.0 && make
rm -rf /usr/local/lib/libleveldb.so.1
cp ./deps/leveldb-1.10.0/libleveldb.so.1 /usr/local/lib
cp ./redis_storage.so.conf /etc/ld.so.conf.d/redis_storage.conf
ldconfig
install:
mkdir -p $(PREFIX)/db
mkdir -p $(PREFIX)/bin
mkdir -p $(PREFIX)/log
mkdir -p $(PREFIX)/conf
cp src/redis-server $(PREFIX)/bin
cp src/redis-cli $(PREFIX)/bin
cp src/redis-check-dump $(PREFIX)/bin
cp src/redis-sentinel $(PREFIX)/bin
cp src/redis-benchmark $(PREFIX)/bin
cp src/redis-check-aof $(PREFIX)/bin
cp redis.conf $(PREFIX)/conf
.PHONY: install