fixed a problem in utils where I was using a va_list after calling va_end on the...
[OpenSRF.git] / src / gateway / Makefile
1 # -------------------------------------------------------------------------------
2 #CC_OPTS = -Wall -O2 -I /opt/include -I /openils/include -I /usr/include/libxml2
3 #LD_OPTS = -L /openils/lib
4 #APXS2 = /opt/bin/apxs
5 #TMPDIR = /tmp/blah
6 #ETCDIR = /tmp/blah
7 # -------------------------------------------------------------------------------
8
9 CC_OPTS += -DASSUME_STATELESS
10 LD_OPTS += -lc_utils -lobjson -lxml2 -lopensrf_transport -lopensrf_stack
11
12 all: msg  ils_gateway rest_gateway
13
14 ils_gateway: libmod_ils_gateway.so
15 rest_gateway: libmod_ils_rest_gateway.so
16
17 msg:
18         echo "-> $$(pwd)"       
19
20 install: 
21         cp gateway.xml.example $(ETCDIR)
22         echo installing ils_gateway
23         $(APXS2) -i -a -n ils_gateway libmod_ils_gateway.so
24         echo installing ils_rest_gateway
25         $(APXS2) -i -a -n ils_rest_gateway libmod_ils_rest_gateway.so
26
27 libmod_ils_gateway.so:  mod_ils_gateway.o
28         echo $@
29         $(CC) $(LD_OPTS) -shared -W1 mod_ils_gateway.o -o libmod_ils_gateway.so
30
31
32 libmod_ils_rest_gateway.so:     rest_xml.o mod_ils_gateway.c    
33         echo $@
34         $(CC) -c -DRESTGATEWAY $(CC_OPTS) -o mod_ils_rest_gateway.o mod_ils_gateway.c
35         $(CC) $(LD_OPTS) -shared -W1 rest_xml.o mod_ils_rest_gateway.o -o libmod_ils_rest_gateway.so
36
37 rest_xml.c:     
38         ./fieldmapper-c-xml-out.pl rest_xml.h rest_xml.c
39
40 rest_xml.o:     rest_xml.c rest_xml.h
41         echo $@
42         $(CC) -c $(CC_OPTS) -o rest_xml.o rest_xml.c
43
44 mod_ils_gateway.o:      mod_ils_gateway.c       
45         echo $@
46         $(CC) -c $(CC_OPTS)  mod_ils_gateway.c
47
48 clean:
49         /bin/rm -f *.o *.so rest_xml.c rest_xml.h