Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the Makefile #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Clean up the Makefile
Also add a target for the benchmark.
volyrique committed Feb 24, 2024
commit d98133eb08c0561300bb2f6f38c3c5c944a27f9e
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bench
test-bin
xcuserdata
*.xccheckout
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@

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

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

test-bin: picohttpparser.c picotest/picotest.c test.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
$(CC) $(TEST_CFLAGS) $(LDFLAGS) -o $@ $^

bench: bench.c picohttpparser.c

clean:
rm -f test-bin
rm -f bench test-bin

.PHONY: test
.PHONY: all clean test