2012-12-02 17:40:13 +00:00
|
|
|
CC = gcc
|
2023-10-31 19:44:37 +00:00
|
|
|
CFLAGS = -O0 -g -Wall -Wextra -std=c89 -pedantic-errors -DTESTS_MAIN
|
2012-12-02 17:16:12 +00:00
|
|
|
|
2015-10-05 07:37:25 +00:00
|
|
|
CPPC = g++
|
2023-10-31 19:44:37 +00:00
|
|
|
CPPFLAGS = -O0 -g -Wall -Wextra -DTESTS_MAIN
|
2012-12-02 17:16:12 +00:00
|
|
|
|
2021-08-05 18:24:57 +00:00
|
|
|
all: test testcpp test_hash_collisions
|
2015-10-05 07:37:25 +00:00
|
|
|
|
2021-08-05 18:24:57 +00:00
|
|
|
.PHONY: test testcpp test_hash_collisions
|
2012-12-02 17:16:12 +00:00
|
|
|
test: tests.c parson.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ tests.c parson.c
|
|
|
|
./$@
|
|
|
|
|
2015-10-05 07:37:25 +00:00
|
|
|
testcpp: tests.c parson.c
|
|
|
|
$(CPPC) $(CPPFLAGS) -o $@ tests.c parson.c
|
|
|
|
./$@
|
|
|
|
|
2021-08-05 18:24:57 +00:00
|
|
|
test_hash_collisions: tests.c parson.c
|
|
|
|
$(CC) $(CFLAGS) -DPARSON_FORCE_HASH_COLLISIONS -o $@ tests.c parson.c
|
|
|
|
./$@
|
|
|
|
|
2012-12-02 17:16:12 +00:00
|
|
|
clean:
|
2015-10-05 07:37:25 +00:00
|
|
|
rm -f test *.o
|
|
|
|
|