Makefile 507 B

123456789101112131415161718192021222324
  1. CC = gcc
  2. CFLAGS = -O0 -g -Wall -Wextra -std=c89 -pedantic-errors -DTESTS_MAIN
  3. CPPC = g++
  4. CPPFLAGS = -O0 -g -Wall -Wextra -DTESTS_MAIN
  5. all: test testcpp test_hash_collisions
  6. .PHONY: test testcpp test_hash_collisions
  7. test: tests.c parson.c
  8. $(CC) $(CFLAGS) -o $@ tests.c parson.c
  9. ./$@
  10. testcpp: tests.c parson.c
  11. $(CPPC) $(CPPFLAGS) -o $@ tests.c parson.c
  12. ./$@
  13. test_hash_collisions: tests.c parson.c
  14. $(CC) $(CFLAGS) -DPARSON_FORCE_HASH_COLLISIONS -o $@ tests.c parson.c
  15. ./$@
  16. clean:
  17. rm -f test *.o