1 |
vikraman 14/10/02 19:09:59 |
2 |
|
3 |
Added: wrk-3.1.1-makefile.patch |
4 |
Log: |
5 |
New ebuild for wrk, a modern HTTP benchmarking tool |
6 |
|
7 |
(Portage version: 2.2.12/cvs/Linux i686, signed Manifest commit with key B0A72FD2) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-benchmarks/wrk/files/wrk-3.1.1-makefile.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-benchmarks/wrk/files/wrk-3.1.1-makefile.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-benchmarks/wrk/files/wrk-3.1.1-makefile.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: wrk-3.1.1-makefile.patch |
16 |
=================================================================== |
17 |
diff --git i/Makefile w/Makefile |
18 |
index d956c6b..48be677 100644 |
19 |
--- i/Makefile |
20 |
+++ w/Makefile |
21 |
@@ -1,4 +1,4 @@ |
22 |
-CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT |
23 |
+CFLAGS += -std=c99 -Wall -D_REENTRANT |
24 |
LIBS := -lpthread -lm -lcrypto -lssl |
25 |
|
26 |
TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown) |
27 |
@@ -23,38 +23,31 @@ BIN := wrk |
28 |
ODIR := obj |
29 |
OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o |
30 |
|
31 |
-LDIR = deps/luajit/src |
32 |
-LIBS := -lluajit $(LIBS) |
33 |
-CFLAGS += -I$(LDIR) |
34 |
-LDFLAGS += -L$(LDIR) |
35 |
+LIBS := $(shell pkg-config --libs luajit) $(LIBS) |
36 |
+CFLAGS += $(shell pkg-config --cflags luajit) |
37 |
|
38 |
all: $(BIN) |
39 |
|
40 |
clean: |
41 |
$(RM) $(BIN) obj/* |
42 |
- @$(MAKE) -C deps/luajit clean |
43 |
|
44 |
$(BIN): $(OBJ) |
45 |
@echo LINK $(BIN) |
46 |
- @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
47 |
+ @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) |
48 |
|
49 |
-$(OBJ): config.h Makefile $(LDIR)/libluajit.a | $(ODIR) |
50 |
+$(OBJ): config.h Makefile | $(ODIR) |
51 |
|
52 |
$(ODIR): |
53 |
@mkdir -p $@ |
54 |
|
55 |
$(ODIR)/bytecode.o: src/wrk.lua |
56 |
@echo LUAJIT $< |
57 |
- @$(SHELL) -c 'cd $(LDIR) && ./luajit -b $(CURDIR)/$< $(CURDIR)/$@' |
58 |
+ @$(SHELL) -c 'luajit -b $(CURDIR)/$< $(CURDIR)/$@' |
59 |
|
60 |
$(ODIR)/%.o : %.c |
61 |
@echo CC $< |
62 |
@$(CC) $(CFLAGS) -c -o $@ $< |
63 |
|
64 |
-$(LDIR)/libluajit.a: |
65 |
- @echo Building LuaJIT... |
66 |
- @$(MAKE) -C $(LDIR) BUILDMODE=static |
67 |
- |
68 |
.PHONY: all clean |
69 |
.SUFFIXES: |
70 |
.SUFFIXES: .c .o .lua |