Add jsmn to deps
This commit is contained in:
41
deps/jsmn/Makefile
vendored
Normal file
41
deps/jsmn/Makefile
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# You can put your build options here
|
||||
-include config.mk
|
||||
|
||||
all: libjsmn.a
|
||||
|
||||
libjsmn.a: jsmn.o
|
||||
$(AR) rc $@ $^
|
||||
|
||||
%.o: %.c jsmn.h
|
||||
$(CC) -c $(CFLAGS) $< -o $@
|
||||
|
||||
test: test_default test_strict test_links test_strict_links
|
||||
test_default: test/tests.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $< -o test/$@
|
||||
./test/$@
|
||||
test_strict: test/tests.c
|
||||
$(CC) -DJSMN_STRICT=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@
|
||||
./test/$@
|
||||
test_links: test/tests.c
|
||||
$(CC) -DJSMN_PARENT_LINKS=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@
|
||||
./test/$@
|
||||
test_strict_links: test/tests.c
|
||||
$(CC) -DJSMN_STRICT=1 -DJSMN_PARENT_LINKS=1 $(CFLAGS) $(LDFLAGS) $< -o test/$@
|
||||
./test/$@
|
||||
|
||||
jsmn_test.o: jsmn_test.c libjsmn.a
|
||||
|
||||
simple_example: example/simple.o libjsmn.a
|
||||
$(CC) $(LDFLAGS) $^ -o $@
|
||||
|
||||
jsondump: example/jsondump.o libjsmn.a
|
||||
$(CC) $(LDFLAGS) $^ -o $@
|
||||
|
||||
clean:
|
||||
rm -f *.o example/*.o
|
||||
rm -f *.a *.so
|
||||
rm -f simple_example
|
||||
rm -f jsondump
|
||||
|
||||
.PHONY: all clean test
|
||||
|
Reference in New Issue
Block a user