OSDN Git Service

jsmn
[proj16/16.git] / src / lib / 00jsmn00 / Makefile
1 # You can put your build options here
2 -include config.mk
3
4 all: libjsmn.a 
5
6 libjsmn.a: jsmn.o
7         $(AR) rc $@ $^
8
9 %.o: %.c jsmn.h
10         $(CC) -c $(CFLAGS) $< -o $@
11
12 test: jsmn_test
13         ./jsmn_test
14
15 jsmn_test: jsmn_test.o
16         $(CC) $(LDFLAGS) -L. -ljsmn $< -o $@
17
18 jsmn_test.o: jsmn_test.c libjsmn.a
19
20 simple_example: example/simple.o libjsmn.a
21         $(CC) $(LDFLAGS) $^ -o $@
22
23 jsondump: example/jsondump.o libjsmn.a
24         $(CC) $(LDFLAGS) $^ -o $@
25
26 clean:
27         rm -f jsmn.o jsmn_test.o example/simple.o
28         rm -f jsmn_test
29         rm -f jsmn_test.exe
30         rm -f libjsmn.a
31         rm -f simple_example
32         rm -f jsondump
33
34 .PHONY: all clean test
35