1# You can put your build options here 2-include config.mk 3 4test: test_default test_strict test_links test_strict_links 5test_default: test/tests.c jsmn.h 6 $(CC) $(CFLAGS) $(LDFLAGS) $< -o test/$@ 7 ./test/$@ 8test_strict: test/tests.c jsmn.h 9 $(CC) -DJSMN_STRICT=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@ 10 ./test/$@ 11test_links: test/tests.c jsmn.h 12 $(CC) -DJSMN_PARENT_LINKS=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@ 13 ./test/$@ 14test_strict_links: test/tests.c jsmn.h 15 $(CC) -DJSMN_STRICT=1 -DJSMN_PARENT_LINKS=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@ 16 ./test/$@ 17 18simple_example: example/simple.c jsmn.h 19 $(CC) $(LDFLAGS) $< -o $@ 20 21jsondump: example/jsondump.c jsmn.h 22 $(CC) $(LDFLAGS) $< -o $@ 23 24fmt: 25 clang-format -i jsmn.h test/*.[ch] example/*.[ch] 26 27lint: 28 clang-tidy jsmn.h --checks='*' 29 30clean: 31 rm -f *.o example/*.o 32 rm -f simple_example 33 rm -f jsondump 34 35.PHONY: clean test 36 37