still learning using GIT, some changes were not committed:
[yaz-moved-to-github.git] / src / Makefile.am
1 ## This file is part of the YAZ toolkit.
2 ## Copyright (C) 1995-2008 Index Data
3
4 YAZ_VERSION_INFO=3: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
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 \
20  csvtodiag.tcl csvtobib1.tcl csvtosrw.tcl bib1.csv srw.csv \
21  csvtosru_update.tcl sru_update.csv \
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)
30 libyaz_server_la_CFLAGS = $(PTHREAD_CFLAGS)
31 libyaz_server_la_LIBADD = libyaz.la
32 libyaz_icu_la_CPPFLAGS = $(AM_CPPFLAGS) $(ICU_CPPFLAGS)
33 libyaz_icu_la_LIBADD = libyaz.la $(ICU_LIBS)
34
35 AM_YFLAGS=-p cql_
36
37 # MARC8->UTF8 conversion is generated from codetables.xml
38 marc8.c: charconv.tcl codetables.xml
39         $(TCLSH) $(srcdir)/charconv.tcl -p marc8 $(srcdir)/codetables.xml -o marc8.c
40
41 # UTF-8->MARC8 conversion is generated from codetables.xml
42 marc8r.c: charconv.tcl codetables.xml
43         $(TCLSH) $(srcdir)/charconv.tcl -r -p marc8r $(srcdir)/codetables.xml -o marc8r.c
44
45 # ISO5426->UTF8 conversion is generated from codetables.xml
46 iso5426.c: charconv.tcl codetables-iso5426.xml
47         $(TCLSH) $(srcdir)/charconv.tcl -p iso5426 $(srcdir)/codetables-iso5426.xml -o iso5426.c
48
49 # Generate OID database from CSV
50 oid_std.c $(top_srcdir)/include/yaz/oid_std.h: oidtoc.tcl oid.csv
51         $(TCLSH) $(srcdir)/oidtoc.tcl $(srcdir) $(srcdir)/oid.csv oid_std.c oid_std.h
52
53 # Generate diagnostics from CSVs
54 diagbib1.c $(top_srcdir)/include/yaz/diagbib1.h: csvtobib1.tcl bib1.csv
55         $(TCLSH) $(srcdir)/csvtobib1.tcl $(srcdir)
56
57 diagsrw.c $(top_srcdir)/include/yaz/diagsrw.h: csvtosrw.tcl srw.csv
58         $(TCLSH) $(srcdir)/csvtosrw.tcl $(srcdir)
59
60 diagsru_update.c $(top_srcdir)/include/yaz/diagsru_update.h: csvtosru_update.tcl sru_update.csv
61         $(TCLSH) $(srcdir)/csvtosru_update.tcl $(srcdir)
62
63 # Auto-generated C-files
64 GEN_FILES = oid_std.c \
65   marc8.c marc8r.c iso5426.c \
66   diagbib1.c diagsrw.c diagsru_update.c \
67   z-accdes1.c z-accform1.c z-acckrb1.c z-core.c \
68   z-diag1.c z-espec1.c z-estask.c z-exp.c z-grs.c z-mterm2.c z-opac.c \
69   z-uifr1.c z-rrf1.c z-rrf2.c z-sum.c z-sutrs.c z-oclcui.c\
70   zes-expi.c zes-exps.c zes-order.c zes-pquery.c zes-psched.c \
71   zes-pset.c zes-update0.c z-date.c z-univ.c zes-update.c zes-admin.c \
72   z-charneg.c \
73   ill-core.c item-req.c oclc-ill-req-ext.c
74
75 libyaz_la_SOURCES=version.c options.c log.c \
76  $(GEN_FILES) \
77   marcdisp.c marc_read_xml.c marc_read_iso2709.c marc_read_line.c \
78   wrbuf.c oid_db.c \
79   nmemsdup.c xmalloc.c readconf.c tpath.c nmem.c matchstr.c atoin.c \
80   siconv.c iconv-p.h utf8.c ucs4.c iso5428.c advancegreek.c \
81   odr_bool.c ber_bool.c ber_len.c ber_tag.c odr_util.c \
82   odr_null.c ber_null.c odr_int.c ber_int.c odr_tag.c odr_cons.c \
83   odr_seq.c odr_oct.c ber_oct.c odr_bit.c ber_bit.c odr_oid.c \
84   ber_oid.c odr_use.c odr_choice.c odr_any.c ber_any.c odr.c odr_mem.c \
85   dumpber.c odr_enum.c odr-priv.h libxml2_error.c \
86   comstack.c tcpip.c waislen.c unix.c \
87   prt-ext.c \
88   ill-get.c \
89   zget.c yaz-ccl.c diag-entry.c diag-entry.h \
90   logrpn.c \
91   otherinfo.c pquery.c sortspec.c charneg.c initopt.c \
92   zoom-c.c zoom-socket.c zoom-opt.c zoom-p.h \
93   grs1disp.c zgdu.c soap.c srw.c srwutil.c \
94   opacdisp.c cclfind.c ccltoken.c cclerrms.c cclqual.c cclptree.c cclp.h \
95   cclqfile.c cclstr.c cclxmlconfig.c ccl_stop_words.c \
96   cql.y cqlstdio.c cqltransform.c cqlutil.c xcqlutil.c cqlstring.c rpn2cql.c \
97   cqlstrer.c querytowrbuf.c \
98   tcpdchk.c \
99   test.c timing.c \
100   xmlquery.c xmlerror.c http.c \
101   mime.c mime.h oid_util.c tokenizer.c \
102   record_conv.c retrieval.c elementset.c snprintf.c query-charset.c \
103   copy_types.c match_glob.c poll.c daemon.c \
104   iconv_encode_marc8.c iconv_encode_iso_8859_1.c iconv_encode_wchar.c \
105   iconv_decode_marc8.c iconv_decode_iso5426.c sc.c
106
107 libyaz_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
108
109 libyaz_server_la_SOURCES = statserv.c seshigh.c eventl.c \
110   requestq.c eventl.h session.h mutex.c
111
112 libyaz_server_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
113
114 libyaz_icu_la_SOURCES = icu_I18N.c
115 libyaz_icu_la_LDFLAGS=-version-info $(YAZ_VERSION_INFO)
116
117 # Rules for Z39.50 V3
118 z-accdes1.c \
119 z-accform1.c \
120 z-acckrb1.c \
121 z-diag1.c \
122 z-espec1.c \
123 z-estask.c \
124 z-exp.c \
125 z-grs.c \
126 z-opac.c \
127 z-uifr1.c \
128 z-rrf1.c \
129 z-rrf2.c \
130 z-sum.c \
131 z-sutrs.c \
132 zes-expi.c \
133 zes-exps.c \
134 zes-order.c \
135 zes-pquery.c \
136 zes-psched.c \
137 zes-pset.c \
138 zes-update0.c \
139 $(top_srcdir)/include/yaz/z-accdes1.h \
140 $(top_srcdir)/include/yaz/z-core.h: z-core.c
141
142 z-core.c: $(srcdir)/z.tcl $(srcdir)/z3950v3.asn $(YAZCOMP)
143         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/z3950v3.asn
144
145 # Date extension
146 z-date.c \
147 $(top_srcdir)/include/yaz/z-date.h: $(srcdir)/z.tcl $(srcdir)/datetime.asn $(YAZCOMP)
148         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/datetime.asn
149
150 # UNIverse extension
151 z-univ.c \
152 $(top_srcdir)/include/yaz/z-univ.h: \
153 $(srcdir)/z.tcl $(srcdir)/univres.asn $(YAZCOMP)
154         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/univres.asn
155
156 # New Update extended service
157 zes-update.c \
158 $(top_srcdir)/include/yaz/zes-update.h: \
159 $(srcdir)/z.tcl $(srcdir)/esupdate.asn $(YAZCOMP)
160         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/esupdate.asn
161
162 # Admin extended service
163 zes-admin.c \
164 $(top_srcdir)/include/yaz/zes-admin.h: \
165 $(srcdir)/z.tcl $(srcdir)/esadmin.asn $(YAZCOMP)
166         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/esadmin.asn
167
168 # Charset negotiation
169 z-charneg.c \
170 $(top_srcdir)/include/yaz/z-charneg.h: \
171 $(srcdir)/z.tcl $(srcdir)/charneg-3.asn $(YAZCOMP)
172         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/charneg-3.asn
173
174 # UserInfoFormat-multipleSearchTerms-2
175 z-mterm2.c \
176 $(top_srcdir)/include/yaz/z-mterm2.h: \
177 $(srcdir)/z.tcl $(srcdir)/mterm2.asn $(YAZCOMP)
178         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/mterm2.asn
179
180 # UserInfoFormat-multipleSearchTerms-2
181 z-oclcui.c \
182 $(top_srcdir)/include/yaz/z-oclcui.h: \
183 $(srcdir)/z.tcl $(srcdir)/oclcui.asn $(YAZCOMP)
184         $(TCLSH) $(YAZCOMP_Z) $(srcdir)/oclcui.asn
185
186 # ILL protocol
187 ill-core.c \
188 $(top_srcdir)/include/yaz/ill-core.h: \
189 $(srcdir)/ill.tcl $(srcdir)/ill9702.asn $(YAZCOMP)
190         $(TCLSH) $(YAZCOMP_I) $(srcdir)/ill9702.asn
191
192 # OCLC ILL Request Extension
193 oclc-ill-req-ext.c \
194 $(top_srcdir)/include/yaz/oclc-ill-req-ext.h: \
195 $(srcdir)/ill.tcl $(srcdir)/oclc-ill-req-ext.asn $(YAZCOMP)
196         $(TCLSH) $(YAZCOMP_I) $(srcdir)/oclc-ill-req-ext.asn
197
198 # Item Request
199 item-req.c \
200 $(top_srcdir)/include/yaz/item-req.h: \
201 $(srcdir)/ill.tcl $(srcdir)/item-req.asn $(YAZCOMP)
202         $(TCLSH) $(YAZCOMP_I) $(srcdir)/item-req.asn
203