]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/src/gateway/Makefile
38e898e96a9317fc05207606daab1c1a4f476a2f
[Evergreen.git] / OpenSRF / 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         echo installing ils_gateway
22         $(APXS2) -i -a -n ils_gateway libmod_ils_gateway.so
23         echo installing ils_rest_gateway
24         $(APXS2) -i -a -n ils_rest_gateway libmod_ils_rest_gateway.so
25
26 libmod_ils_gateway.so:  mod_ils_gateway.o
27         echo $@
28         $(CC) $(LD_OPTS) -shared -W1 mod_ils_gateway.o -o libmod_ils_gateway.so
29
30
31 libmod_ils_rest_gateway.so:     rest_xml.o mod_ils_gateway.c    
32         echo $@
33         $(CC) -c -DRESTGATEWAY $(CC_OPTS) -o mod_ils_rest_gateway.o mod_ils_gateway.c
34         $(CC) $(LD_OPTS) -shared -W1 rest_xml.o mod_ils_rest_gateway.o -o libmod_ils_rest_gateway.so
35
36 rest_xml.c:     
37         ./fieldmapper-c-xml-out.pl rest_xml.h rest_xml.c
38
39 rest_xml.o:     rest_xml.c rest_xml.h
40         echo $@
41         $(CC) -c $(CC_OPTS) -o rest_xml.o rest_xml.c
42
43 mod_ils_gateway.o:      mod_ils_gateway.c       
44         echo $@
45         $(CC) -c $(CC_OPTS)  mod_ils_gateway.c
46
47 clean:
48         /bin/rm -f *.o *.so rest_xml.c rest_xml.h