fb1458826d
bundled with it. OK jasper@
84 lines
3.2 KiB
Plaintext
84 lines
3.2 KiB
Plaintext
$OpenBSD: patch-src_Makefile,v 1.12 2013/01/16 13:13:03 dcoppa Exp $
|
|
--- src/Makefile.orig Thu Jan 10 17:15:16 2013
|
|
+++ src/Makefile Wed Jan 16 13:20:46 2013
|
|
@@ -14,12 +14,12 @@
|
|
|
|
release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
|
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
|
-OPTIMIZATION?=-O2
|
|
-DEPENDENCY_TARGETS=hiredis linenoise lua
|
|
+# OPTIMIZATION?=-O2
|
|
+DEPENDENCY_TARGETS=hiredis linenoise
|
|
|
|
# Default settings
|
|
STD= -std=c99 -pedantic
|
|
-WARN= -Wall
|
|
+# WARN= -Wall
|
|
OPT= $(OPTIMIZATION)
|
|
|
|
# Default allocator
|
|
@@ -52,13 +52,13 @@ ifeq ($(uname_S),SunOS)
|
|
DEBUG= -g -ggdb
|
|
else
|
|
FINAL_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
|
|
- FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS) -g -rdynamic -ggdb
|
|
+ FINAL_LDFLAGS= $(LDFLAGS) $(REDIS_LDFLAGS)
|
|
FINAL_LIBS= -lm -pthread
|
|
- DEBUG= -g -rdynamic -ggdb
|
|
+# DEBUG= -g -rdynamic -ggdb
|
|
endif
|
|
|
|
# Include paths to dependencies
|
|
-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src
|
|
+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I${MODLUA_INCL_DIR}
|
|
|
|
ifeq ($(MALLOC),tcmalloc)
|
|
FINAL_CFLAGS+= -DUSE_TCMALLOC
|
|
@@ -84,6 +84,10 @@ PREFIX?=/usr/local
|
|
INSTALL_BIN= $(PREFIX)/bin
|
|
INSTALL= cp -pf
|
|
|
|
+ifndef INSTALL_DIR
|
|
+ INSTALL_DIR= mkdir -p
|
|
+endif
|
|
+
|
|
CCCOLOR="\033[34m"
|
|
LINKCOLOR="\033[34;1m"
|
|
SRCCOLOR="\033[33m"
|
|
@@ -99,7 +103,7 @@ endif
|
|
|
|
REDIS_SERVER_NAME= redis-server
|
|
REDIS_SENTINEL_NAME= redis-sentinel
|
|
-REDIS_SERVER_OBJ= adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o
|
|
+REDIS_SERVER_OBJ= adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o strbuf.o lua_cjson.o lua_struct.o lua_cmsgpack.o
|
|
REDIS_CLI_NAME= redis-cli
|
|
REDIS_CLI_OBJ= anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o
|
|
REDIS_BENCHMARK_NAME= redis-benchmark
|
|
@@ -154,7 +158,7 @@ endif
|
|
|
|
# redis-server
|
|
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
|
|
- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
|
|
+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) -L${LOCALBASE}/lib ${MODLUA_LIB}
|
|
|
|
# redis-sentinel
|
|
$(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
|
|
@@ -194,7 +198,7 @@ distclean: clean
|
|
.PHONY: distclean
|
|
|
|
test: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME)
|
|
- @(cd ..; ./runtest)
|
|
+ @(cd ..; ulimit -Sn 192; ${TCL_BIN} tests/test_helper.tcl)
|
|
|
|
lcov:
|
|
$(MAKE) gcov
|
|
@@ -223,7 +227,7 @@ src/help.h:
|
|
@../utils/generate-command-help.rb > help.h
|
|
|
|
install: all
|
|
- mkdir -p $(INSTALL_BIN)
|
|
+ $(INSTALL_DIR) $(INSTALL_BIN)
|
|
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(INSTALL_BIN)
|
|
$(REDIS_INSTALL) $(REDIS_BENCHMARK_NAME) $(INSTALL_BIN)
|
|
$(REDIS_INSTALL) $(REDIS_CLI_NAME) $(INSTALL_BIN)
|