Skip to content

Commit

Permalink
support using system openssl & luajit
Browse files Browse the repository at this point in the history
  • Loading branch information
wg committed Mar 20, 2016
1 parent 29b1848 commit bc6f679
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)

Expand All @@ -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 $<
Expand Down
21 changes: 21 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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.

0 comments on commit bc6f679

Please sign in to comment.