From bc6f6797c489d93f56bc5adbf55eecfb54590b98 Mon Sep 17 00:00:00 2001 From: Will Date: Sun, 20 Mar 2016 16:26:48 +0900 Subject: [PATCH] support using system openssl & luajit --- Makefile | 22 ++++++++++++++++++---- README | 21 +++++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 407250c..da3492e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT +CFLAGS += -std=c99 -Wall -O2 -D_REENTRANT LIBS := -lpthread -lm -lssl -lcrypto TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown) @@ -23,11 +23,25 @@ BIN := wrk ODIR := obj OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o +LIBS := -lluajit-5.1 $(LIBS) -LIBS := -lluajit-5.1 $(LIBS) +DEPS := CFLAGS += -I$(ODIR)/include 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) @@ -45,7 +59,7 @@ $(ODIR): $(ODIR)/bytecode.o: src/wrk.lua @echo LUAJIT $< - @$(SHELL) -c 'obj/bin/luajit -b $(CURDIR)/$< $(CURDIR)/$@' + @$(SHELL) -c 'PATH=obj/bin:$(PATH) luajit -b $(CURDIR)/$< $(CURDIR)/$@' $(ODIR)/%.o : %.c @echo CC $< diff --git a/README b/README index 0881dd9..8532f2a 100644 --- a/README +++ b/README @@ -44,3 +44,24 @@ Acknowledgements 'ae' event loop from redis, the nginx/joyent/node.js 'http-parser', and Mike Pall's LuaJIT. Please consult the NOTICE file for licensing 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 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.