$OpenBSD: patch-src_Makefile,v 1.4 2011/11/06 11:43:00 rpointel Exp $ --- src/Makefile.orig Wed Oct 26 16:16:33 2011 +++ src/Makefile Sat Nov 5 13:47:06 2011 @@ -4,7 +4,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh') uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') -OPTIMIZATION?=-O2 +# OPTIMIZATION?=-O2 CCCOLOR="\033[34m" LINKCOLOR="\033[34;1m" @@ -31,7 +31,7 @@ ifeq ($(uname_S),SunOS) else CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF) CCLINK?=-lm -pthread - DEBUG?=-g -rdynamic -ggdb +# DEBUG?=-g -rdynamic -ggdb endif ifeq ($(USE_TCMALLOC),yes) @@ -54,11 +54,15 @@ endif CCOPT= $(CFLAGS) $(ARCH) $(PROF) -PREFIX= /usr/local +PREFIX?= /usr/local INSTALL_BIN= $(PREFIX)/bin INSTALL= cp -p -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 vm.o pubsub.o multi.o debug.o sort.o intset.o syncio.o slowlog.o bio.o +ifndef INSTALL_DIR + INSTALL_DIR= mkdir -p +endif + +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 vm.o pubsub.o multi.o debug.o sort.o intset.o syncio.o endian.o slowlog.o bio.o BENCHOBJ = ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o CHECKDUMPOBJ = redis-check-dump.o lzf_c.o lzf_d.o @@ -149,9 +153,7 @@ zmalloc.o: zmalloc.c config.h zmalloc.h .PHONY: dependencies dependencies: - @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)hiredis$(ENDCOLOR) @cd ../deps/hiredis && $(MAKE) static ARCH="$(ARCH)" - @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)linenoise$(ENDCOLOR) @cd ../deps/linenoise && $(MAKE) ARCH="$(ARCH)" ../deps/jemalloc/lib/libjemalloc.a: @@ -162,7 +164,6 @@ redis-benchmark.o: $(QUIET_CC)$(CC) -c $(CFLAGS) -I../deps/hiredis $(DEBUG) $(COMPILE_TIME) $< redis-benchmark: dependencies $(BENCHOBJ) - @printf '%b %b\n' $(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) @@ -199,7 +200,7 @@ dep: $(CC) -MM *.c -I ../deps/hiredis -I ../deps/linenoise test: redis-server redis-check-aof - @(cd ..; ./runtest) + @(cd ..; ulimit -Sn 192; ${TCL_BIN} tests/test_helper.tcl) bench: ./redis-benchmark @@ -226,7 +227,7 @@ noopt: $(MAKE) PROF="-pg" ARCH="-arch i386" install: all - mkdir -p $(INSTALL_BIN) + $(INSTALL_DIR) $(INSTALL_BIN) $(INSTALL) $(PRGNAME) $(INSTALL_BIN) $(INSTALL) $(BENCHPRGNAME) $(INSTALL_BIN) $(INSTALL) $(CLIPRGNAME) $(INSTALL_BIN)