27a493a22c2a048dfbde283a98c0e06b82661aa2
[yaz-moved-to-github.git] / src / Makefile.am
1 ## This file is part of the YAZ toolkit.
2 ## Copyright (C) 1994-2006, Index Data, All rights reserved.
3 ## $Id: Makefile.am,v 1.35 2006-05-04 20:00:45 adam Exp $
4
5 YAZ_VERSION_INFO=2:1:0
6
7 lib_LTLIBRARIES = libyaz.la libyazthread.la
8 # noinst_PROGRAMS = cqlparse
9
10 dist-hook:
11         test -f $(srcdir)/cql.c || exit 1
12
13 tabdatadir = $(pkgdatadir)/z39.50
14 tabdata_DATA=datetime.asn esupdate.asn univres.asn z3950v3.asn z.tcl \
15  esadmin.asn charneg-3.asn mterm2.asn oclcui.asn
16
17 illdatadir=$(pkgdatadir)/ill
18 illdata_DATA=ill9702.asn item-req.asn ill.tcl
19
20 EXTRA_DIST=$(tabdata_DATA) $(illdata_DATA) \
21  charconv.tcl codetables.xml \
22  csvtodiag.tcl csvtobib1.tcl csvtosrw.tcl bib1.csv srw.csv
23
24 YAZCOMP = ../util/yaz-asncomp
25 YAZCOMPLINE = $(YAZCOMP) -d z.tcl -i yaz -I../include $(YCFLAGS)
26
27 AM_CFLAGS=$(THREAD_CFLAGS)
28 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(SSL_CFLAGS) 
29
30 AM_YFLAGS=-p cql_
31
32 # MARC8->UTF8 conversion is generated from codetables.xml
33 $(srcdir)/marc8.c: charconv.tcl codetables.xml
34         cd $(srcdir); ./charconv.tcl -p marc8 codetables.xml -o marc8.c
35
36 # UTF-8->MARC8 conversion is generated from codetables.xml
37 $(srcdir)/marc8r.c: charconv.tcl codetables.xml
38         cd $(srcdir); ./charconv.tcl -r -p marc8r codetables.xml -o marc8r.c
39
40 # Generate diagnostics from CSVs
41 $(top_srcdir)/include/yaz/diagbib1.h $(srcdir)/diagbib1.c: csvtobib1.tcl bib1.csv
42         cd $(srcdir); ./csvtobib1.tcl
43
44 $(top_srcdir)/include/yaz/diagsrw.h $(srcdir)/diagsrw.c: csvtosrw.tcl srw.csv
45         cd $(srcdir); ./csvtosrw.tcl
46
47 libyaz_la_SOURCES=version.c options.c log.c marcdisp.c oid.c wrbuf.c \
48   nmemsdup.c xmalloc.c readconf.c tpath.c nmem.c matchstr.c atoin.c \
49   siconv.c marc8.c marc8r.c \
50   odr_bool.c ber_bool.c ber_len.c ber_tag.c odr_util.c \
51   odr_null.c ber_null.c odr_int.c ber_int.c odr_tag.c odr_cons.c \
52   odr_seq.c odr_oct.c ber_oct.c odr_bit.c ber_bit.c odr_oid.c \
53   ber_oid.c odr_use.c odr_choice.c odr_any.c ber_any.c odr.c odr_mem.c \
54   dumpber.c odr_enum.c odr-priv.h \
55   comstack.c tcpip.c waislen.c unix.c \
56   z-accdes1.c z-accform1.c z-acckrb1.c z-core.c \
57   z-diag1.c z-espec1.c z-estask.c z-exp.c z-grs.c z-mterm2.c z-opac.c \
58   z-uifr1.c z-rrf1.c z-rrf2.c z-sum.c z-sutrs.c z-oclcui.c\
59   zes-expi.c zes-exps.c zes-order.c zes-pquery.c zes-psched.c \
60   zes-pset.c zes-update0.c z-date.c z-univ.c zes-update.c zes-admin.c \
61   z-charneg.c \
62   prt-ext.c \
63   ill-core.c item-req.c ill-get.c \
64   zget.c yaz-ccl.c diag-entry.c diag-entry.h diagbib1.c diagsrw.c logrpn.c \
65   otherinfo.c pquery.c sortspec.c z3950oid.c charneg.c initopt.c \
66   zoom-c.c zoom-opt.c zoom-p.h grs1disp.c zgdu.c soap.c srw.c srwutil.c \
67   opacdisp.c cclfind.c ccltoken.c cclerrms.c cclqual.c cclptree.c \
68   cclqfile.c cclstr.c \
69   cql.y cqlstdio.c cqltransform.c cqlutil.c xcqlutil.c cqlstring.c \
70   cqlstrer.c querytowrbuf.c \
71   eventl.c seshigh.c statserv.c requestq.c tcpdchk.c \
72   eventl.h service.c service.h session.h test.c \
73   xmlquery.c \
74   mime.c mime.h \
75   nfa.c \
76   record_conv.c retrieval.c
77
78 libyaz_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
79
80 # This library is only built and installed for backwards
81 # compatibility (older libs depend on it). The libyaz.la is now threaded
82 # by itself..
83 libyazthread_la_SOURCES=version.c
84 libyazthread_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
85
86 # Rules for Z39.50 V3
87 $(srcdir)/z-accdes1.c \
88 $(srcdir)/z-accform1.c \
89 $(srcdir)/z-acckrb1.c \
90 $(srcdir)/z-core.c \
91 $(srcdir)/z-diag1.c \
92 $(srcdir)/z-espec1.c \
93 $(srcdir)/z-estask.c \
94 $(srcdir)/z-exp.c \
95 $(srcdir)/z-grs.c \
96 $(srcdir)/z-opac.c \
97 $(srcdir)/z-uifr1.c \
98 $(srcdir)/z-rrf1.c \
99 $(srcdir)/z-rrf2.c \
100 $(srcdir)/z-sum.c \
101 $(srcdir)/z-sutrs.c \
102 $(srcdir)/zes-expi.c \
103 $(srcdir)/zes-exps.c \
104 $(srcdir)/zes-order.c \
105 $(srcdir)/zes-pquery.c \
106 $(srcdir)/zes-psched.c \
107 $(srcdir)/zes-pset.c \
108 $(srcdir)/zes-update0.c \
109 $(top_srcdir)/include/yaz/z-accdes1.h \
110 $(top_srcdir)/include/yaz/z-core.h: \
111 $(srcdir)/z.tcl $(srcdir)/z3950v3.asn $(YAZCOMP)
112         cd $(srcdir); $(YAZCOMPLINE) z3950v3.asn
113
114 # Date extension
115 $(srcdir)/z-date.c \
116 $(top_srcdir)/include/yaz/z-date.h: $(srcdir)/z.tcl $(srcdir)/datetime.asn $(YAZCOMP)
117         cd $(srcdir); $(YAZCOMPLINE) datetime.asn
118
119 # UNIverse extension
120 $(srcdir)/z-univ.c \
121 $(top_srcdir)/include/yaz/z-univ.h: \
122 $(srcdir)/z.tcl $(srcdir)/univres.asn $(YAZCOMP)
123         cd $(srcdir); $(YAZCOMPLINE) univres.asn
124
125 # New Update extended service
126 $(srcdir)/zes-update.c \
127 $(top_srcdir)/include/yaz/zes-update.h: \
128 $(srcdir)/z.tcl $(srcdir)/esupdate.asn $(YAZCOMP)
129         cd $(srcdir); $(YAZCOMPLINE) esupdate.asn
130
131 # Admin extended service
132 $(srcdir)/zes-admin.c \
133 $(top_srcdir)/include/yaz/zes-admin.h: \
134 $(srcdir)/z.tcl $(srcdir)/esadmin.asn $(YAZCOMP)
135         cd $(srcdir); $(YAZCOMPLINE) esadmin.asn
136
137 # Charset negotiation
138 $(srcdir)/z-charneg.c: $(srcdir)/z.tcl $(srcdir)/charneg-3.asn $(YAZCOMP)
139         cd $(srcdir); $(YAZCOMPLINE) $(YCFLAGS) charneg-3.asn
140
141 # UserInfoFormat-multipleSearchTerms-2
142 $(srcdir)/z-mterm2.c: $(srcdir)/z.tcl $(srcdir)/mterm2.asn $(YAZCOMP)
143         cd $(srcdir); $(YAZCOMPLINE) mterm2.asn
144
145 # UserInfoFormat-multipleSearchTerms-2
146 $(srcdir)/z-oclcui.c: $(srcdir)/z.tcl $(srcdir)/oclcui.asn $(YAZCOMP)
147         cd $(srcdir); $(YAZCOMPLINE) oclcui.asn
148
149 # ILL protocol
150 $(srcdir)/ill-core.c \
151 $(top_srcdir)/include/yaz/ill-core.h: \
152 $(srcdir)/ill.tcl $(srcdir)/ill9702.asn $(YAZCOMP)
153         cd $(srcdir); $(YAZCOMP) -d ill.tcl -i yaz -I ../include $(YCFLAGS) ill9702.asn
154
155 # Item Request
156 $(srcdir)/item-req.c \
157 $(top_srcdir)/include/yaz/item-req.h: \
158 $(srcdir)/ill.tcl $(srcdir)/item-req.asn $(YAZCOMP)
159         cd $(srcdir); $(YAZCOMP) -d ill.tcl -i yaz -I ../include $(YCFLAGS) item-req.asn
160
161 # cqlparse_SOURCES = cqlstd.y
162