]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/libjson/Makefile
651131eafe9cf835cd4610173ec1f4a93beb0af1
[OpenSRF.git] / src / libjson / Makefile
1 # $Id$
2
3 CFLAGS          += -g -O2 -Wall -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -I ../../include
4 LDFLAGS         += -shared -W1 
5 LIB_DIR         = ../../lib
6 LDLIBS          += -L . -ljson -L $(LIB_DIR)
7
8 LIB_OBJS        = debug.o \
9                   linkhash.o \
10                   printbuf.o \
11                   arraylist.o \
12                   json_object.o \
13                   json_tokener.o
14
15 TESTS           = test1 test2
16
17 all: tests lib oils_method
18
19 lib: $(LIB_OBJS)
20         gcc $(LDFLAGS) $(LIB_OBJS) -o $(LIB_DIR)/libjson.so
21
22 tests: $(TESTS)
23
24 test1: test1.o lib 
25         gcc $(LDLIBS) test1.o -o test1
26 test2: test2.o lib 
27         gcc $(LDLIBS) test2.o -o test2
28 oils_method: oils_method.o lib
29         gcc $(LDLIBS) oils_method.o -o oils_method
30
31 oils_method.o: oils_method.c
32         gcc -c $(CFLAGS) oils_method.c -o oils_method.o
33
34 clean:
35         rm -f *.o *~ $(TESTS) $(LIB_DIR)/libjson.so oils_method
36
37 cex.o: cex.c 
38 debug.o: debug.c 
39 linkhash.o: linkhash.c 
40 arraylist.o: arraylist.c 
41 json_object.o: json_object.c 
42 json_tokener.o: json_tokener.c 
43 test1.o: test1.c 
44 test2.o: test2.c 
45