Remove deprecated functions yaz_uri_val ..
[yaz-moved-to-github.git] / src / Makefile.am
1 ## This file is part of the YAZ toolkit.
2 ## Copyright (C) 1995-2013 Index Data
3
4 YAZ_VERSION_INFO=5:0:0
5
6 lib_LTLIBRARIES = libyaz.la libyaz_server.la libyaz_icu.la
7
8 dist-hook:
9         test -f $(srcdir)/cql.c || exit 1
10
11 tabdatadir = $(pkgdatadir)/z39.50
12 tabdata_DATA=datetime.asn esupdate.asn univres.asn z3950v3.asn z.tcl \
13  esadmin.asn charneg-3.asn mterm2.asn oclcui.asn facet.asn
14
15 illdatadir=$(pkgdatadir)/ill
16 illdata_DATA=ill9702.asn item-req.asn ill.tcl oclc-ill-req-ext.asn
17
18 EXTRA_DIST=$(tabdata_DATA) $(illdata_DATA) \
19  charconv.tcl codetables.xml codetables-iso5426.xml \
20  csvtodiag.tcl csvtobib1.tcl csvtosrw.tcl bib1.csv srw.csv \
21  csvtosru_update.tcl sru_update.csv mk_version.tcl \
22  oidtoc.tcl oid.csv sc_test.c
23
24 YAZCOMP=$(top_srcdir)/util/yaz-asncomp
25 YAZCOMP_Z = $(YAZCOMP) -d $(srcdir)/z.tcl -i yaz -I$(top_srcdir)/include
26 YAZCOMP_I = $(YAZCOMP) -d $(srcdir)/ill.tcl -i yaz -I$(top_srcdir)/include
27
28 AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(SSL_CFLAGS) 
29 libyaz_la_LIBADD = $(SSL_LIBS) $(TCPD_LIBS)
30 libyaz_server_la_LIBADD = libyaz.la
31 libyaz_icu_la_CPPFLAGS = $(AM_CPPFLAGS) $(ICU_CPPFLAGS) -I$(top_srcdir)/libstemmer_c/include
32 libyaz_icu_la_LIBADD = libyaz.la $(ICU_LIBS)
33
34 AM_YFLAGS=-p cql_
35
36 # MARC8->UTF8 conversion is generated from codetables.xml
37 marc8.c: charconv.tcl codetables.xml
38         $(TCLSH) $(srcdir)/charconv.tcl -p marc8 $(srcdir)/codetables.xml -o $@
39
40 # UTF-8->MARC8 conversion is generated from codetables.xml
41 marc8r.c: charconv.tcl codetables.xml
42         $(TCLSH) $(srcdir)/charconv.tcl -r -p marc8r $(srcdir)/codetables.xml -o $@
43
44 # ISO5426->UTF8 conversion is generated from codetables-iso5426.xml
45 iso5426.c: charconv.tcl codetables-iso5426.xml
46         $(TCLSH) $(srcdir)/charconv.tcl -p iso5426 $(srcdir)/codetables-iso5426.xml -o $@
47
48 # Generate OID database from CSV
49 oid_std.c $(top_srcdir)/include/yaz/oid_std.h: oidtoc.tcl oid.csv
50         $(TCLSH) $(srcdir)/oidtoc.tcl $(srcdir) $(srcdir)/oid.csv oid_std.c oid_std.h
51
52 # Generate diagnostics from CSVs
53 diagbib1.c $(top_srcdir)/include/yaz/diagbib1.h: csvtobib1.tcl bib1.csv
54         $(TCLSH) $(srcdir)/csvtobib1.tcl $(srcdir)
55
56 diagsrw.c $(top_srcdir)/include/yaz/diagsrw.h: csvtosrw.tcl srw.csv
57         $(TCLSH) $(srcdir)/csvtosrw.tcl $(srcdir)
58
59 diagsru_update.c $(top_srcdir)/include/yaz/diagsru_update.h: csvtosru_update.tcl sru_update.csv
60         $(TCLSH) $(srcdir)/csvtosru_update.tcl $(srcdir)
61
62 # Auto-generated C-files
63 GEN_FILES = oid_std.c \
64   marc8.c marc8r.c iso5426.c \
65   diagbib1.c diagsrw.c diagsru_update.c \
66   z-accdes1.c z-accform1.c z-acckrb1.c z-core.c z-facet-1.c \
67   z-diag1.c z-espec1.c z-estask.c z-exp.c z-grs.c z-mterm2.c z-opac.c \
68   z-uifr1.c z-rrf1.c z-rrf2.c z-sum.c z-sutrs.c z-oclcui.c\
69   zes-expi.c zes-exps.c zes-order.c zes-pquery.c zes-psched.c \
70   zes-pset.c zes-update0.c z-date.c z-univ.c zes-update.c zes-admin.c \
71   z-charneg.c \
72   ill-core.c item-req.c oclc-ill-req-ext.c
73
74 libyaz_la_SOURCES=base64.c version.c options.c log.c \
75  $(GEN_FILES) \
76   marcdisp.c marc_read_xml.c marc_read_iso2709.c marc_read_line.c \
77   wrbuf.c oid_db.c errno.c \
78   nmemsdup.c xmalloc.c readconf.c tpath.c nmem.c matchstr.c atoin.c \
79   siconv.c iconv-p.h utf8.c ucs4.c iso5428.c advancegreek.c \
80   odr_bool.c ber_bool.c ber_len.c ber_tag.c odr_util.c facet.c \
81   odr_null.c ber_null.c odr_int.c ber_int.c odr_tag.c odr_cons.c \
82   odr_seq.c odr_oct.c ber_oct.c odr_bit.c ber_bit.c odr_oid.c \
83   ber_oid.c odr_use.c odr_choice.c odr_any.c ber_any.c odr.c odr_mem.c \
84   dumpber.c odr_enum.c odr-priv.h \
85   comstack.c tcpip.c unix.c \
86   prt-ext.c \
87   ill-get.c \
88   zget.c yaz-ccl.c diag-entry.c diag-entry.h \
89   logrpn.c \
90   otherinfo.c pquery.c sortspec.c charneg.c initopt.c init_diag.c \
91   zoom-c.c zoom-z3950.c zoom-sru.c zoom-query.c zoom-record-cache.c \
92   zoom-event.c \
93   record_render.c zoom-socket.c zoom-opt.c zoom-p.h sru_facet.c sru-p.h \
94   grs1disp.c zgdu.c soap.c srw.c srwutil.c uri.c solr.c diag_map.c \
95   opac_to_xml.c xml_add.c xml_match.c xml_to_opac.c \
96   cclfind.c ccltoken.c cclerrms.c cclqual.c cclptree.c cclp.h \
97   cclqfile.c cclstr.c cclxmlconfig.c ccl_stop_words.c \
98   cql.y cqlstdio.c cqltransform.c cqlutil.c xcqlutil.c cqlstring.c \
99   cql_sortkeys.c cql2ccl.c rpn2cql.c \
100   rpn2solr.c solrtransform.c \
101   cqlstrer.c querytowrbuf.c \
102   tcpdchk.c \
103   test.c timing.c \
104   xmlquery.c xmlerror.c http.c \
105   mime.c mime.h oid_util.c tokenizer.c \
106   record_conv.c retrieval.c elementset.c snprintf.c query-charset.c \
107   copy_types.c match_glob.c poll.c daemon.c \
108   iconv_encode_marc8.c iconv_encode_iso_8859_1.c iconv_encode_wchar.c \
109   iconv_decode_marc8.c iconv_decode_iso5426.c iconv_decode_danmarc.c sc.c \
110   json.c xml_include.c file_glob.c dirent.c mutex-p.h mutex.c condvar.c \
111   thread_id.c gettimeofday.c thread_create.c spipe.c url.c
112
113 libyaz_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
114
115 libyaz_server_la_SOURCES = statserv.c seshigh.c eventl.c \
116   requestq.c eventl.h session.h 
117
118 libyaz_server_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
119
120 STEMMER_SOURCES = \
121         ../libstemmer_c/include/libstemmer.h \
122         ../libstemmer_c/libstemmer/libstemmer.c \
123         ../libstemmer_c/libstemmer/modules.h \
124         ../libstemmer_c/runtime/api.c \
125         ../libstemmer_c/runtime/api.h \
126         ../libstemmer_c/runtime/header.h \
127         ../libstemmer_c/runtime/utilities.c \
128         ../libstemmer_c/src_c/stem_UTF_8_porter.c \
129         ../libstemmer_c/src_c/stem_UTF_8_porter.h \
130         ../libstemmer_c/src_c/stem_UTF_8_english.c \
131         ../libstemmer_c/src_c/stem_UTF_8_english.h
132
133 libyaz_icu_la_SOURCES = icu_chain.c icu_utf16.c icu_utf8.c stemmer.c \
134         icu_transform.c icu_casemap.c icu_tokenizer.c icu_sortkey.c \
135         $(STEMMER_SOURCES)
136 libyaz_icu_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
137
138 # Rules for Z39.50 V3
139 z-accdes1.c \
140 z-accform1.c \
141 z-acckrb1.c \
142 z-diag1.c \
143 z-espec1.c \
144 z-estask.c \
145 z-exp.c \
146 z-grs.c \
147 z-opac.c \
148 z-uifr1.c \
149 z-rrf1.c \
150 z-rrf2.c \
151 z-sum.c \
152 z-sutrs.c \
153 zes-expi.c \
154 zes-exps.c \
155 zes-order.c \
156 zes-pquery.c \
157 zes-psched.c \
158 zes-pset.c \
159 zes-update0.c \
160 $(top_srcdir)/include/yaz/z-accdes1.h \
161 $(top_srcdir)/include/yaz/z-core.h: z-core.c
162
163 z-core.c: $(srcdir)/z.tcl $(srcdir)/z3950v3.asn $(YAZCOMP)
164         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/z3950v3.asn
165
166 # Date extension
167 z-date.c \
168 $(top_srcdir)/include/yaz/z-date.h: $(srcdir)/z.tcl $(srcdir)/datetime.asn $(YAZCOMP)
169         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/datetime.asn
170
171 # UNIverse extension
172 z-univ.c \
173 $(top_srcdir)/include/yaz/z-univ.h: \
174 $(srcdir)/z.tcl $(srcdir)/univres.asn $(YAZCOMP)
175         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/univres.asn
176
177 # New Update extended service
178 zes-update.c \
179 $(top_srcdir)/include/yaz/zes-update.h: \
180 $(srcdir)/z.tcl $(srcdir)/esupdate.asn $(YAZCOMP)
181         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/esupdate.asn
182
183 # Admin extended service
184 zes-admin.c \
185 $(top_srcdir)/include/yaz/zes-admin.h: \
186 $(srcdir)/z.tcl $(srcdir)/esadmin.asn $(YAZCOMP)
187         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/esadmin.asn
188
189 # Charset negotiation
190 z-charneg.c \
191 $(top_srcdir)/include/yaz/z-charneg.h: \
192 $(srcdir)/z.tcl $(srcdir)/charneg-3.asn $(YAZCOMP)
193         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/charneg-3.asn
194
195 # UserInfoFormat-multipleSearchTerms-2
196 z-mterm2.c \
197 $(top_srcdir)/include/yaz/z-mterm2.h: \
198 $(srcdir)/z.tcl $(srcdir)/mterm2.asn $(YAZCOMP)
199         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/mterm2.asn
200
201 # UserInfoFormat-multipleSearchTerms-2
202 z-oclcui.c \
203 $(top_srcdir)/include/yaz/z-oclcui.h: \
204 $(srcdir)/z.tcl $(srcdir)/oclcui.asn $(YAZCOMP)
205         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/oclcui.asn
206
207 # UserInfoFormat-facet-1
208 z-facet-1.c \
209 $(top_srcdir)/include/yaz/z-facet-1.h: $(srcdir)/facet.asn $(YAZCOMP)
210         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/facet.asn
211
212
213 # ILL protocol
214 ill-core.c \
215 $(top_srcdir)/include/yaz/ill-core.h: \
216 $(srcdir)/ill.tcl $(srcdir)/ill9702.asn $(YAZCOMP)
217         $(TCLSH) $(YAZCOMP_I) $(srcdir)/ill9702.asn
218
219 # OCLC ILL Request Extension
220 oclc-ill-req-ext.c \
221 $(top_srcdir)/include/yaz/oclc-ill-req-ext.h: \
222 $(srcdir)/ill.tcl $(srcdir)/oclc-ill-req-ext.asn $(YAZCOMP)
223         $(TCLSH) $(YAZCOMP_I) $(srcdir)/oclc-ill-req-ext.asn
224
225 # Item Request
226 item-req.c \
227 $(top_srcdir)/include/yaz/item-req.h: \
228 $(srcdir)/ill.tcl $(srcdir)/item-req.asn $(YAZCOMP)
229         $(TCLSH) $(YAZCOMP_I) $(srcdir)/item-req.asn
230
231