Skip to content

Commit d98133e

Browse files
committed
Clean up the Makefile
Also add a target for the benchmark.
1 parent f8d0513 commit d98133e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
bench
12
test-bin
23
xcuserdata
34
*.xccheckout

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
CC?=gcc
2727
PROVE?=prove
28-
CFLAGS=-Wall -fsanitize=address,undefined
28+
TEST_CFLAGS=$(CFLAGS) -Wall -fsanitize=address,undefined
2929
TEST_ENV="UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1"
3030

3131
all:
@@ -34,9 +34,11 @@ test: test-bin
3434
env $(TEST_ENV) $(PROVE) -v ./test-bin
3535

3636
test-bin: picohttpparser.c picotest/picotest.c test.c
37-
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
37+
$(CC) $(TEST_CFLAGS) $(LDFLAGS) -o $@ $^
38+
39+
bench: bench.c picohttpparser.c
3840

3941
clean:
40-
rm -f test-bin
42+
rm -f bench test-bin
4143

42-
.PHONY: test
44+
.PHONY: all clean test

0 commit comments

Comments
 (0)