]> git.evergreen-ils.org Git - working/Evergreen.git/blob - OpenSRF/src/libjson/Makefile
sort groups by name for consistancy
[working/Evergreen.git] / OpenSRF / src / libjson / Makefile
1 # $Id$
2
3 CFLAGS          += -g -O2 -Wall -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -I ../../include -fPIC
4
5 DEST_INCLUDE = libjson
6
7 LIB_OBJS        = debug.o \
8                   linkhash.o \
9                   printbuf.o \
10                   arraylist.o \
11                   json_object.o \
12                   json_tokener.o
13
14 TESTS           = test1 test2
15
16 all: tests  
17
18 lib: $(LIB_OBJS)
19         gcc -shared -W1 $(LIB_OBJS) -o $(TMPDIR)/libjson.so
20         mkdir -p $(TMPDIR)/$(DEST_INCLUDE)/
21         cp *.h $(TMPDIR)/$(DEST_INCLUDE)/
22
23 install:
24         mkdir -p $(INCLUDEDIR)/$(DEST_INCLUDE)/
25         cp $(TMPDIR)/$(DEST_INCLUDE)/*.h $(INCLUDEDIR)/$(DEST_INCLUDE)/
26         cp $(TMPDIR)/libjson.so $(LIBDIR)/libjson.so
27
28
29 tests: $(TESTS)
30
31 test1: test1.o lib 
32         gcc -ljson $(LD_OPTS) $(LDLIBS) test1.o -o test1
33 test2: test2.o lib 
34         gcc -ljson $(LD_OPTS) $(LDLIBS) test2.o -o test2
35
36
37 clean:
38         rm -f *.o *~ $(TESTS) 
39
40 cex.o: cex.c 
41 debug.o: debug.c 
42 linkhash.o: linkhash.c 
43 arraylist.o: arraylist.c 
44 json_object.o: json_object.c 
45 json_tokener.o: json_tokener.c 
46 test1.o: test1.c 
47 test2.o: test2.c 
48