]> git.saurik.com Git - redis.git/blobdiff - src/Makefile
rewrite INCRBYFLOAT as SETs for AOF/replication
[redis.git] / src / Makefile
index 4b0bf074091f06f3b219fd37fe53403a516a7ce8..6cb5f062302436771ef4f2e64c4825f2a7668a1e 100644 (file)
@@ -6,6 +6,8 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh')
 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
 OPTIMIZATION?=-O2
 
+LUA_CFLAGS=-O2 -Wall
+
 ifeq ($(uname_S),Linux)
   ifneq ($(FORCE_LIBC_MALLOC),yes)
     USE_JEMALLOC=yes
@@ -13,6 +15,8 @@ ifeq ($(uname_S),Linux)
 endif
 
 ifeq ($(uname_S),SunOS)
+  # make isinf() available
+  LUA_CFLAGS+=-D__C99FEATURES__=1
   CFLAGS?=-std=c99 -pedantic $(OPTIMIZATION) -Wall -W -D__EXTENSIONS__ -D_XPG6
   CCLINK?=-ldl -lnsl -lsocket -lm -lpthread
   DEBUG?=-g -ggdb 
@@ -42,6 +46,7 @@ endif
 
 CCLINK+= $(ALLOC_LINK)
 CFLAGS+= $(ALLOC_FLAGS)
+LUA_CFLAGS+= $(ARCH)
 
 CCOPT= $(CFLAGS) $(ARCH) $(PROF)
 
@@ -163,7 +168,7 @@ dependencies:
        @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)linenoise$(ENDCOLOR)
        @cd ../deps/linenoise && $(MAKE) ARCH="$(ARCH)"
        @echo $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)Lua ansi$(ENDCOLOR)
-       @cd ../deps/lua && $(MAKE) ARCH="$(ARCH)" ansi
+       @cd ../deps/lua && $(MAKE) CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(ARCH)" ansi
 
 ../deps/jemalloc/lib/libjemalloc.a:
        cd ../deps/jemalloc && ./configure $(JEMALLOC_CFLAGS) --with-jemalloc-prefix=je_ --enable-cc-silence && $(MAKE) lib/libjemalloc.a
@@ -236,4 +241,9 @@ src/help.h:
        @../utils/generate-command-help.rb > help.h
 
 install: all
-       @../utils/install_server.sh
+       mkdir -p $(INSTALL_BIN)
+       $(INSTALL) $(PRGNAME) $(INSTALL_BIN)
+       $(INSTALL) $(BENCHPRGNAME) $(INSTALL_BIN)
+       $(INSTALL) $(CLIPRGNAME) $(INSTALL_BIN)
+       $(INSTALL) $(CHECKDUMPPRGNAME) $(INSTALL_BIN)
+       $(INSTALL) $(CHECKAOFPRGNAME) $(INSTALL_BIN)