forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2952cc
commit 407e295
Showing
219 changed files
with
115,294 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
obj/* | ||
/wrk | ||
*.o | ||
*.a | ||
wrk | ||
deps/luajit/src/host/buildvm | ||
deps/luajit/src/host/buildvm_arch.h | ||
deps/luajit/src/host/minilua | ||
deps/luajit/src/jit/vmdef.lua | ||
deps/luajit/src/lj_bcdef.h | ||
deps/luajit/src/lj_ffdef.h | ||
deps/luajit/src/lj_folddef.h | ||
deps/luajit/src/lj_libdef.h | ||
deps/luajit/src/lj_recdef.h | ||
deps/luajit/src/lj_vm.s | ||
deps/luajit/src/luajit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,64 @@ | ||
CFLAGS := -std=c99 -Wall -O2 -pthread | ||
LDFLAGS := -pthread | ||
LIBS := -lm | ||
ifeq ($(shell uname),SunOS) | ||
LIBS += -lnsl -lsocket -lresolv | ||
CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT | ||
LIBS := -lpthread -lm -lcrypto -lssl | ||
|
||
TARGET := $(shell uname -s | tr [A-Z] [a-z] 2>/dev/null || echo unknown) | ||
|
||
ifeq ($(TARGET), sunos) | ||
CFLAGS += -D_PTHREADS -D_POSIX_C_SOURCE=200112L | ||
LIBS += -lsocket | ||
else ifeq ($(TARGET), darwin) | ||
LDFLAGS += -pagezero_size 10000 -image_base 100000000 | ||
else ifeq ($(TARGET), linux) | ||
LIBS += -ldl | ||
LDFLAGS += -Wl,-E | ||
else ifeq ($(TARGET), freebsd) | ||
CFLAGS += -D_DECLARE_C99_LDBL_MATH | ||
LDFLAGS += -Wl,-E | ||
endif | ||
|
||
SRC := wrk.c aprintf.c stats.c units.c ae.c zmalloc.c http_parser.c tinymt64.c | ||
SRC := wrk.c net.c ssl.c aprintf.c stats.c script.c units.c \ | ||
ae.c zmalloc.c http_parser.c tinymt64.c | ||
BIN := wrk | ||
|
||
ODIR := obj | ||
OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) | ||
OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o | ||
|
||
LDIR = deps/luajit/src | ||
LIBS := -lluajit $(LIBS) | ||
CFLAGS += -I $(LDIR) | ||
LDFLAGS += -L $(LDIR) | ||
|
||
all: $(BIN) | ||
|
||
clean: | ||
$(RM) $(BIN) obj/* | ||
@$(MAKE) -C deps/luajit clean | ||
|
||
$(BIN): $(OBJ) | ||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) | ||
@echo LINK $(BIN) | ||
@$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) | ||
|
||
$(OBJ): config.h Makefile | $(ODIR) | ||
$(OBJ): config.h Makefile $(LDIR)/libluajit.a | $(ODIR) | ||
|
||
$(ODIR): | ||
@mkdir $@ | ||
@mkdir -p $@ | ||
|
||
$(ODIR)/bytecode.o: src/wrk.lua | ||
@echo LUAJIT $< | ||
@$(SHELL) -c 'cd $(LDIR) && ./luajit -b $(CURDIR)/$< $(CURDIR)/$@' | ||
|
||
$(ODIR)/%.o : %.c | ||
$(CC) $(CFLAGS) -c -o $@ $< | ||
@echo CC $< | ||
@$(CC) $(CFLAGS) -c -o $@ $< | ||
|
||
$(LDIR)/libluajit.a: | ||
@echo Building LuaJIT... | ||
@$(MAKE) -C $(LDIR) BUILDMODE=static | ||
|
||
.PHONY: all clean | ||
.SUFFIXES: | ||
.SUFFIXES: .c .o | ||
.SUFFIXES: .c .o .lua | ||
|
||
vpath %.c src | ||
vpath %.h src | ||
vpath %.c src | ||
vpath %.h src | ||
vpath %.lua scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,9 @@ This product includes software developed by Salvatore Sanfilippo and | |
other contributors to the redis project. | ||
|
||
Copyright (c) 2006-2010, Salvatore Sanfilippo <antirez at gmail dot com> | ||
Copyright (c) 2009-2012, Salvatore Sanfilippo <antirez at gmail dot com> | ||
Copyright (C) 2009 Harish Mallipeddi - [email protected] | ||
Copyright (c) 2012, Joyent, Inc. All rights reserved. | ||
|
||
Copyright (c) 2006-2009, Salvatore Sanfilippo | ||
All rights reserved. | ||
|
@@ -79,6 +81,32 @@ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | |
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
========================================================================= | ||
== LuaJIT Notice == | ||
========================================================================= | ||
|
||
LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/ | ||
|
||
Copyright (C) 2005-2013 Mike Pall. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
========================================================================= | ||
== Tiny Mersenne Twister (TinyMT) Notice == | ||
========================================================================= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
=============================================================================== | ||
LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/ | ||
|
||
Copyright (C) 2005-2013 Mike Pall. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
[ MIT license: http://www.opensource.org/licenses/mit-license.php ] | ||
|
||
=============================================================================== | ||
[ LuaJIT includes code from Lua 5.1/5.2, which has this license statement: ] | ||
|
||
Copyright (C) 1994-2012 Lua.org, PUC-Rio. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
=============================================================================== | ||
[ LuaJIT includes code from dlmalloc, which has this license statement: ] | ||
|
||
This is a version (aka dlmalloc) of malloc/free/realloc written by | ||
Doug Lea and released to the public domain, as explained at | ||
http://creativecommons.org/licenses/publicdomain | ||
|
||
=============================================================================== |
Oops, something went wrong.