mirror of
https://github.com/wg/wrk
synced 2025-01-08 23:32:54 +08:00
support using system openssl & luajit
This commit is contained in:
parent
29b1848551
commit
bc6f6797c4
22
Makefile
22
Makefile
@ -1,4 +1,4 @@
|
|||||||
CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT
|
CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT
|
||||||
LIBS := -lpthread -lm -lssl -lcrypto
|
LIBS := -lpthread -lm -lssl -lcrypto
|
||||||
|
|
||||||
TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
|
TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
|
||||||
@ -23,11 +23,25 @@ BIN := wrk
|
|||||||
|
|
||||||
ODIR := obj
|
ODIR := obj
|
||||||
OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o
|
OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o
|
||||||
|
LIBS := -lluajit-5.1 $(LIBS)
|
||||||
|
|
||||||
LIBS := -lluajit-5.1 $(LIBS)
|
DEPS :=
|
||||||
CFLAGS += -I$(ODIR)/include
|
CFLAGS += -I$(ODIR)/include
|
||||||
LDFLAGS += -L$(ODIR)/lib
|
LDFLAGS += -L$(ODIR)/lib
|
||||||
DEPS := $(ODIR)/lib/libluajit-5.1.a $(ODIR)/lib/libssl.a
|
|
||||||
|
ifneq ($(WITH_LUAJIT),)
|
||||||
|
CFLAGS += -I$(WITH_LUAJIT)/include
|
||||||
|
LDFLAGS += -L$(WITH_LUAJIT)/lib
|
||||||
|
else
|
||||||
|
DEPS += $(ODIR)/lib/libluajit-5.1.a
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(WITH_OPENSSL),)
|
||||||
|
CFLAGS += -I$(WITH_OPENSSL)/include
|
||||||
|
LDFLAGS += -L$(WITH_OPENSSL)/lib
|
||||||
|
else
|
||||||
|
DEPS += $(ODIR)/lib/libssl.a
|
||||||
|
endif
|
||||||
|
|
||||||
all: $(BIN)
|
all: $(BIN)
|
||||||
|
|
||||||
@ -45,7 +59,7 @@ $(ODIR):
|
|||||||
|
|
||||||
$(ODIR)/bytecode.o: src/wrk.lua
|
$(ODIR)/bytecode.o: src/wrk.lua
|
||||||
@echo LUAJIT $<
|
@echo LUAJIT $<
|
||||||
@$(SHELL) -c 'obj/bin/luajit -b $(CURDIR)/$< $(CURDIR)/$@'
|
@$(SHELL) -c 'PATH=obj/bin:$(PATH) luajit -b $(CURDIR)/$< $(CURDIR)/$@'
|
||||||
|
|
||||||
$(ODIR)/%.o : %.c
|
$(ODIR)/%.o : %.c
|
||||||
@echo CC $<
|
@echo CC $<
|
||||||
|
21
README
21
README
@ -44,3 +44,24 @@ Acknowledgements
|
|||||||
'ae' event loop from redis, the nginx/joyent/node.js 'http-parser',
|
'ae' event loop from redis, the nginx/joyent/node.js 'http-parser',
|
||||||
and Mike Pall's LuaJIT. Please consult the NOTICE file for licensing
|
and Mike Pall's LuaJIT. Please consult the NOTICE file for licensing
|
||||||
details.
|
details.
|
||||||
|
|
||||||
|
Cryptography Notice
|
||||||
|
|
||||||
|
This distribution includes cryptographic software. The country in
|
||||||
|
which you currently reside may have restrictions on the import,
|
||||||
|
possession, use, and/or re-export to another country, of encryption
|
||||||
|
software. BEFORE using any encryption software, please check your
|
||||||
|
country's laws, regulations and policies concerning the import,
|
||||||
|
possession, or use, and re-export of encryption software, to see if
|
||||||
|
this is permitted. See <http://www.wassenaar.org/> for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
The U.S. Government Department of Commerce, Bureau of Industry and
|
||||||
|
Security (BIS), has classified this software as Export Commodity
|
||||||
|
Control Number (ECCN) 5D002.C.1, which includes information security
|
||||||
|
software using or performing cryptographic functions with symmetric
|
||||||
|
algorithms. The form and manner of this distribution makes it
|
||||||
|
eligible for export under the License Exception ENC Technology
|
||||||
|
Software Unrestricted (TSU) exception (see the BIS Export
|
||||||
|
Administration Regulations, Section 740.13) for both object code and
|
||||||
|
source code.
|
||||||
|
Loading…
Reference in New Issue
Block a user