1 # This file is part of the YAZ toolkit.
2 # Copyright (C) 1995-2008 Index Data
5 # Heikki Levanto & Adam Dickmeiss
9 DEBUG=0 # 0 for release, 1 for debug
13 TCL="C:\Tcl\bin\tclsh84.exe"
14 #TCL="C:\Program Files\Tcl\bin\tclsh83.exe"
17 # iconv charcter conversion utility
19 ICONV_DIR = c:\iconv-1.9.2.win32
21 # icu charcter conversion utility
22 # get icu libraries from http://www.icu-project.org
28 LIBXSLT_DIR=c:\libxslt-1.1.19.win32
32 LIBXML2_DIR=c:\libxml2-2.6.28.win32
34 # zlib compression (used by libxml2)
35 ZLIB_DIR = c:\zlib-1.2.3.win32
37 # get WIN32 binaries libxml2 & iconv & zlib from here:
38 # http://www.zlatkovic.com/libxml.en.html
46 all: dirs generate dll sc_test client ztest yazicu zoomsh utilprog testprog iconv icu libxml2 libxslt
48 NSIS="c:\program files\nsis\makensis.exe"
49 HHC="c:\program files\html help workshop\hhc.exe"
63 generate: generated_files
66 # The current directory is supposed to be something like
67 # ..../yaz/win, everything is relative to that
68 ROOTDIR=.. # The home of yaz
70 INCLDIR=$(ROOTDIR)\include # our includes
71 LIBDIR=$(ROOTDIR)\lib # We produce .lib, .exp etc there
72 BINDIR=$(ROOTDIR)\bin # We produce exes and dlls there
73 WINDIR=$(ROOTDIR)\win # all these Win make things
74 SRCDIR=$(ROOTDIR)\src # for the case we move them under src
75 DOCDIR=$(ROOTDIR)\doc # where the doc is
77 # where we store intermediate files
84 CLIENTDIR=$(ROOTDIR)\CLIENT
85 ZTESTDIR=$(ROOTDIR)\ZTEST
86 ZOOMDIR=$(ROOTDIR)\ZOOM
87 UTILDIR=$(ROOTDIR)\UTIL
88 TESTDIR=$(ROOTDIR)\TEST
90 TMPDIR=$(ROOTDIR)\win\tmp
93 # Targets - what to make
96 YAZ_DLL=$(BINDIR)\yaz3d.dll
97 YAZ_IMPLIB=$(LIBDIR)\yaz3d.lib
98 YAZ_ICU_DLL=$(BINDIR)\yaz_icu3d.dll
99 YAZ_ICU_IMPLIB=$(LIBDIR)\yaz_icu3d.lib
101 YAZ_DLL=$(BINDIR)\yaz3.dll
102 YAZ_IMPLIB=$(LIBDIR)\yaz3.lib
103 YAZ_ICU_DLL=$(BINDIR)\yaz_icu3.dll
104 YAZ_ICU_IMPLIB=$(LIBDIR)\yaz_icu3.lib
107 CLIENT=$(BINDIR)\yaz-client.exe
108 YAZ_ICU=$(BINDIR)\yaz-icu.exe
109 ZOOMSH=$(BINDIR)\zoomsh.exe
110 ZTEST=$(BINDIR)\yaz-ztest.exe
111 SC_TEST=$(BINDIR)\sc_test.exe
113 ZOOMTST1=$(BINDIR)\zoomtst1.exe
114 ZOOMTST2=$(BINDIR)\zoomtst2.exe
115 ZOOMTST3=$(BINDIR)\zoomtst3.exe
116 ZOOMTST4=$(BINDIR)\zoomtst4.exe
117 ZOOMTST5=$(BINDIR)\zoomtst5.exe
118 ZOOMTST6=$(BINDIR)\zoomtst6.exe
119 ZOOMTST7=$(BINDIR)\zoomtst7.exe
120 ZOOMTST8=$(BINDIR)\zoomtst8.exe
121 ZOOMTST9=$(BINDIR)\zoomtst9.exe
122 ZOOMTST10=$(BINDIR)\zoomtst10.exe
124 CQL2PQF=$(BINDIR)\cql2pqf.exe
125 CQL2XCQL=$(BINDIR)\cql2xcql.exe
126 YAZ_MARCDUMP=$(BINDIR)\yaz-marcdump.exe
128 TSTLOG=$(BINDIR)\tstlog.exe
129 TST_TIMING=$(BINDIR)\tst_timing.exe
131 # shortcut names defined here
132 dll: dirs generate $(YAZ_DLL)
133 client: dirs generate $(CLIENT)
134 ztest: dirs generate $(ZTEST)
138 zoomsh: $(ZOOMSH) $(ZOOMTST1) $(ZOOMTST2) $(ZOOMTST3) \
139 $(ZOOMTST4) $(ZOOMTST5) $(ZOOMTST6) $(ZOOMTST7) $(ZOOMTST8) $(ZOOMTST9) \
142 utilprog: $(CQL2PQF) $(CQL2XCQL) $(YAZ_MARCDUMP)
143 testprog: $(TSTLOG) $(TST_TIMING)
145 htmlhelp: $(DOCDIR)\htmlhelp.chm
147 # Modules and conditional flags, etc
152 /I"$(ICONV_DIR)\include"
154 "$(ICONV_DIR)\lib\iconv.lib"
155 iconv: $(BINDIR)\iconv.dll
158 copy "$(ICONV_DIR)\bin\iconv.dll" $(BINDIR)
167 ###TRYING ICU FLAGS HERE WORKS ####
168 ## ADAM ARE THESE FLAGS OK and the DLL sufficient ##
169 ##IT COMPILES AND SEEMS TO WORK
173 /D YAZ_HAVE_ICU=1 /D HAVE_ICU_H=1 \
174 /I"$(ICU_DIR)\include"
176 $(ICU_DIR)\lib\icudt.lib $(ICU_DIR)\lib\icuin.lib $(ICU_DIR)\lib\icuuc.lib
177 icu: $(BINDIR)\icudt38.dll $(BINDIR)\icuin38.dll $(BINDIR)\icuuc38.dll
178 yazicu: dirs generate $(YAZ_ICU)
180 $(BINDIR)\icudt38.dll:
181 copy "$(ICU_DIR)\bin\icudt38.dll" $(BINDIR)
182 $(BINDIR)\icuin38.dll:
183 copy "$(ICU_DIR)\bin\icuin38.dll" $(BINDIR)
184 $(BINDIR)\icuuc38.dll:
185 copy "$(ICU_DIR)\bin\icuuc38.dll" $(BINDIR)
197 LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib"
198 LIBXML2_DEF=/D YAZ_HAVE_XML2=1 /I"$(LIBXML2_DIR)\include"
199 libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib1.dll
201 $(BINDIR)\libxml2.dll:
202 copy "$(LIBXML2_DIR)\bin\libxml2.dll" $(BINDIR)
205 copy "$(ZLIB_DIR)\bin\zlib1.dll" $(BINDIR)
209 LIBXML2_DEF=/D YAZ_HAVE_XML2=0
215 LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
217 /D HAVE_XSLTSAVERESULTTOSTRING=1 \
219 /I"$(LIBXSLT_DIR)\include"
220 libxslt: $(BINDIR)\libxslt.dll
222 $(BINDIR)\libxslt.dll:
223 copy "$(LIBXSLT_DIR)\bin\libxslt.dll" $(BINDIR)
227 LIBXSLT_DEF=/D YAZ_HAVE_XSLT=0
232 ### C and CPP compiler (the same thing)
233 # Note: $(CPP) has already been defined in the environment
234 # (if you set things up right!)
237 /nologo /W3 /EHsc /FD /c \
242 /D "_CRT_SECURE_NO_DEPRECATE" \
243 /D "_CRT_NONSTDC_NO_DEPRECATE" \
251 /I"$(ROOTDIR)\include"
261 # /W3 = warning level
262 # /GX = Enable exception handling
263 # /FD = Generate file dependencies (what ever they are)
264 # /c = compile without linking
265 # /FR = Generate browse info (.sbr file that gets combined into .bsc)
266 # /Fo = object file name (or at least path)
267 # /Fd = debug database name (or path)
268 # /MD = Runtime library: Multithread DLL
269 # /MDd = Runtime library: Multithread DLL (debug)
270 # /Od = Disable optimising (debug)
271 # /O2 = Optimize for speed
272 # /Gm = Minimal rebuild (some cpp class stuff)
273 # /Zi = Program database for debuggers
274 # /ZI = Pgm database with special "edit&continue" stuff - not available in C5
286 LINK_LIBS= kernel32.lib wsock32.lib advapi32.lib \
287 $(ICONV_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB)
289 COMMON_LNK_OPTIONS= /nologo /subsystem:windows /machine:i386 /incremental:no
291 DEBUG_LNK_OPTIONS= /debug
295 DLL_LINK_OPTIONS= /dll
296 CLIENT_LINK_OPTIONS = /subsystem:console
298 COMMON_TCL_OPTIONS= ..\util\yaz-asncomp -I$(INCLDIR) -i yaz
300 # Final opt variables
302 COPT= $(COMMON_C_OPTIONS) $(DEBUG_C_OPTIONS) $(COMMON_C_INCLUDES)
303 LNKOPT= $(COMMON_LNK_OPTIONS) $(DEBUG_LNK_OPTIONS) $(LNK_LIBS)
304 TCLOPT= $(COMMON_TCL_OPTIONS)
307 COPT= $(COMMON_C_OPTIONS) $(RELEASE_C_OPTIONS) $(COMMON_C_INCLUDES)
308 LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS)
309 TCLOPT= $(COMMON_TCL_OPTIONS)
312 LINK_PROGRAM = $(LINK) $(LNKOPT) \
313 $(CLIENT_LINK_OPTIONS) $(LINK_LIBS) $(YAZ_IMPLIB)
315 LINK_DLL = $(LINK) $(LNKOPT) \
316 $(LINK_LIBS) $(DLL_LINK_OPTIONS)
318 # Source and object modules
320 # Note: Ordinary source files are not specified here at
321 # all, make finds them in suitable dirs. The object modules
322 # need to be specified, though
325 $(OBJDIR)\client.obj \
326 $(OBJDIR)\tabcomplete.obj \
327 $(OBJDIR)\admin.obj \
328 $(OBJDIR)\fhistory.obj
330 YAZ_ICU_OBJS= $(OBJDIR)\yaz-icu.obj
333 $(OBJDIR)\dummy-opac.obj \
334 $(OBJDIR)\read-marc.obj \
335 $(OBJDIR)\read-grs.obj \
339 $(OBJDIR)\sc_test.obj
344 YAZ_ZOOMTST1_OBJS = \
345 $(OBJDIR)\zoomtst1.obj
346 YAZ_ZOOMTST2_OBJS = \
347 $(OBJDIR)\zoomtst2.obj
348 YAZ_ZOOMTST3_OBJS = \
349 $(OBJDIR)\zoomtst3.obj
350 YAZ_ZOOMTST4_OBJS = \
351 $(OBJDIR)\zoomtst4.obj
352 YAZ_ZOOMTST5_OBJS = \
353 $(OBJDIR)\zoomtst5.obj
354 YAZ_ZOOMTST6_OBJS = \
355 $(OBJDIR)\zoomtst6.obj
356 YAZ_ZOOMTST7_OBJS = \
357 $(OBJDIR)\zoomtst7.obj
358 YAZ_ZOOMTST8_OBJS = \
359 $(OBJDIR)\zoomtst8.obj
360 YAZ_ZOOMTST9_OBJS = \
361 $(OBJDIR)\zoomtst9.obj
362 YAZ_ZOOMTST10_OBJS = \
363 $(OBJDIR)\zoomtst10.obj
366 $(OBJDIR)\cql2pqf.obj
367 YAZ_CQL2XCQL_OBJS = \
368 $(OBJDIR)\cql2xcql.obj
369 YAZ_MARCDUMP_OBJS = \
370 $(OBJDIR)\marcdump.obj
377 $(OBJDIR)\tst_timing.obj
380 $(OBJDIR)\version.obj \
381 $(OBJDIR)\oid_std.obj \
382 $(OBJDIR)\eventl.obj \
383 $(OBJDIR)\requestq.obj \
384 $(OBJDIR)\seshigh.obj \
385 $(OBJDIR)\statserv.obj \
386 $(OBJDIR)\tcpdchk.obj \
387 $(OBJDIR)\cclerrms.obj \
388 $(OBJDIR)\cclfind.obj \
389 $(OBJDIR)\cclptree.obj \
390 $(OBJDIR)\cclqfile.obj \
391 $(OBJDIR)\cclqual.obj \
392 $(OBJDIR)\cclstr.obj \
393 $(OBJDIR)\ccltoken.obj \
394 $(OBJDIR)\ccl_stop_words.obj \
395 $(OBJDIR)\comstack.obj \
396 $(OBJDIR)\tcpip.obj \
397 $(OBJDIR)\waislen.obj \
398 $(OBJDIR)\ber_any.obj \
399 $(OBJDIR)\ber_bit.obj \
400 $(OBJDIR)\ber_bool.obj \
401 $(OBJDIR)\ber_int.obj \
402 $(OBJDIR)\ber_len.obj \
403 $(OBJDIR)\ber_null.obj \
404 $(OBJDIR)\ber_oct.obj \
405 $(OBJDIR)\ber_oid.obj \
406 $(OBJDIR)\ber_tag.obj \
407 $(OBJDIR)\dumpber.obj \
409 $(OBJDIR)\odr_any.obj \
410 $(OBJDIR)\odr_bit.obj \
411 $(OBJDIR)\odr_bool.obj \
412 $(OBJDIR)\odr_choice.obj \
413 $(OBJDIR)\odr_cons.obj \
414 $(OBJDIR)\odr_enum.obj \
415 $(OBJDIR)\odr_int.obj \
416 $(OBJDIR)\odr_mem.obj \
417 $(OBJDIR)\odr_null.obj \
418 $(OBJDIR)\odr_oct.obj \
419 $(OBJDIR)\odr_oid.obj \
420 $(OBJDIR)\odr_seq.obj \
421 $(OBJDIR)\odr_tag.obj \
422 $(OBJDIR)\odr_use.obj \
423 $(OBJDIR)\odr_util.obj \
424 $(OBJDIR)\atoin.obj \
426 $(OBJDIR)\marcdisp.obj \
427 $(OBJDIR)\marc_read_xml.obj \
428 $(OBJDIR)\marc_read_iso2709.obj \
429 $(OBJDIR)\marc_read_line.obj \
431 $(OBJDIR)\nmemsdup.obj \
432 $(OBJDIR)\oid_db.obj \
433 $(OBJDIR)\oid_util.obj \
434 $(OBJDIR)\options.obj \
435 $(OBJDIR)\readconf.obj \
436 $(OBJDIR)\tpath.obj \
437 $(OBJDIR)\wrbuf.obj \
438 $(OBJDIR)\xmalloc.obj \
439 $(OBJDIR)\matchstr.obj \
440 $(OBJDIR)\siconv.obj \
441 $(OBJDIR)\iso5428.obj \
444 $(OBJDIR)\advancegreek.obj \
445 $(OBJDIR)\snprintf.obj \
446 $(OBJDIR)\marc8.obj \
447 $(OBJDIR)\marc8r.obj \
448 $(OBJDIR)\record_conv.obj \
449 $(OBJDIR)\retrieval.obj \
450 $(OBJDIR)\libxml2_error.obj \
452 $(OBJDIR)\diagbib1.obj \
453 $(OBJDIR)\diagsru_update.obj \
454 $(OBJDIR)\diagsrw.obj \
455 $(OBJDIR)\diag-entry.obj \
457 $(OBJDIR)\logrpn.obj \
458 $(OBJDIR)\querytowrbuf.obj \
459 $(OBJDIR)\pquery.obj \
460 $(OBJDIR)\yaz-ccl.obj \
461 $(OBJDIR)\otherinfo.obj \
462 $(OBJDIR)\sortspec.obj \
463 $(OBJDIR)\charneg.obj \
464 $(OBJDIR)\grs1disp.obj \
465 $(OBJDIR)\opacdisp.obj \
469 $(OBJDIR)\srwutil.obj \
470 $(OBJDIR)\zoom-c.obj \
471 $(OBJDIR)\zoom-opt.obj \
472 $(OBJDIR)\zoom-socket.obj \
473 $(OBJDIR)\initopt.obj \
474 $(OBJDIR)\xmlquery.obj \
475 $(OBJDIR)\xmlerror.obj \
478 $(OBJDIR)\cqlstdio.obj \
479 $(OBJDIR)\cqlstring.obj \
480 $(OBJDIR)\cqltransform.obj \
481 $(OBJDIR)\cqlutil.obj \
482 $(OBJDIR)\cqlstrer.obj \
483 $(OBJDIR)\rpn2cql.obj \
484 $(OBJDIR)\xcqlutil.obj \
485 $(OBJDIR)\elementset.obj \
486 $(OBJDIR)\timing.obj \
487 $(OBJDIR)\query-charset.obj \
488 $(OBJDIR)\tokenizer.obj \
489 $(OBJDIR)\copy_types.obj \
491 $(OBJDIR)\match_glob.obj \
493 $(OBJDIR)\daemon.obj \
494 $(OBJDIR)\iconv_encode_iso_8859_1.obj \
495 $(OBJDIR)\iconv_encode_marc8.obj \
496 $(OBJDIR)\iconv_decode_marc8.obj \
497 $(OBJDIR)\iconv_encode_wchar.obj \
501 $(OBJDIR)\z-date.obj\
502 $(OBJDIR)\z-univ.obj\
503 $(OBJDIR)\zes-update.obj\
504 $(OBJDIR)\zes-admin.obj \
505 $(OBJDIR)\z-accdes1.obj \
506 $(OBJDIR)\z-accform1.obj \
507 $(OBJDIR)\z-acckrb1.obj \
508 $(OBJDIR)\z-core.obj \
509 $(OBJDIR)\z-diag1.obj \
510 $(OBJDIR)\z-espec1.obj \
511 $(OBJDIR)\z-estask.obj \
512 $(OBJDIR)\z-exp.obj \
513 $(OBJDIR)\z-grs.obj \
514 $(OBJDIR)\z-opac.obj \
515 $(OBJDIR)\z-uifr1.obj \
516 $(OBJDIR)\z-rrf1.obj \
517 $(OBJDIR)\z-rrf2.obj \
518 $(OBJDIR)\z-sum.obj \
519 $(OBJDIR)\z-sutrs.obj \
520 $(OBJDIR)\zes-expi.obj \
521 $(OBJDIR)\zes-exps.obj \
522 $(OBJDIR)\zes-order.obj \
523 $(OBJDIR)\zes-pquery.obj \
524 $(OBJDIR)\zes-psched.obj \
525 $(OBJDIR)\zes-pset.obj \
526 $(OBJDIR)\zes-update0.obj \
527 $(OBJDIR)\prt-ext.obj \
528 $(OBJDIR)\z-charneg.obj \
529 $(OBJDIR)\z-mterm2.obj \
530 $(OBJDIR)\z-oclcui.obj
533 $(OBJDIR)\ill-get.obj\
534 $(OBJDIR)\ill-core.obj\
535 $(OBJDIR)\item-req.obj
543 $(OBJDIR)\icu_I18N.obj
545 # Generated C and H files
547 Z3950_C_DIR=$(SRCDIR)
549 #!!! Should be moved to OBJ, but that requires too much trickery
551 # Files generated from datetime.asn
552 DATETIME_H_FILES = $(INCLDIR)\yaz\z-date.h
553 DATETIME_C_FILES = $(Z3950_C_DIR)\z-date.c
555 # Files generated from univres.asn
556 UNIVRES_H_FILES = $(INCLDIR)\yaz\z-univ.h
557 UNIVRES_C_FILES = $(Z3950_C_DIR)\z-univ.c
559 # Files generated from esupdate.asn
560 ESUPDATE_H_FILES = $(INCLDIR)\yaz\zes-update.h
561 ESUPDATE_C_FILES = $(Z3950_C_DIR)\zes-update.c
563 # Files generated from esadmin.asn
564 ESADMIN_H_FILES = $(INCLDIR)\yaz\zes-admin.h
565 ESADMIN_C_FILES = $(Z3950_C_DIR)\zes-admin.c
567 # Files generated from esadmin.asn
568 CHARNEG_H_FILES = $(INCLDIR)\yaz\z-charneg.h
569 CHARNEG_C_FILES = $(Z3950_C_DIR)\z-charneg.c
571 # Files generated from mterm2.asn
572 MTERM2_H_FILES = $(INCLDIR)\yaz\z-mterm2.h
573 MTERM2_C_FILES = $(Z3950_C_DIR)\z-mterm2.c
575 # Files generated from mterm2.asn
576 OCLCUI_H_FILES = $(INCLDIR)\yaz\z-oclcui.h
577 OCLCUI_C_FILES = $(Z3950_C_DIR)\z-oclcui.c
579 # Files created from z3950v3.asn
581 $(INCLDIR)\yaz\z-accdes1.h \
582 $(INCLDIR)\yaz\z-core.h
585 $(Z3950_C_DIR)\z-accdes1.c \
586 $(Z3950_C_DIR)\z-accform1.c \
587 $(Z3950_C_DIR)\z-acckrb1.c \
588 $(Z3950_C_DIR)\z-core.c \
589 $(Z3950_C_DIR)\z-diag1.c \
590 $(Z3950_C_DIR)\z-espec1.c \
591 $(Z3950_C_DIR)\z-estask.c \
592 $(Z3950_C_DIR)\z-exp.c \
593 $(Z3950_C_DIR)\z-grs.c \
594 $(Z3950_C_DIR)\z-opac.c \
595 $(Z3950_C_DIR)\z-uifr1.c \
596 $(Z3950_C_DIR)\z-rrf1.c \
597 $(Z3950_C_DIR)\z-rrf2.c \
598 $(Z3950_C_DIR)\z-sum.c \
599 $(Z3950_C_DIR)\z-sutrs.c \
600 $(Z3950_C_DIR)\zes-expi.c \
601 $(Z3950_C_DIR)\zes-exps.c \
602 $(Z3950_C_DIR)\zes-order.c \
603 $(Z3950_C_DIR)\zes-pquery.c \
604 $(Z3950_C_DIR)\zes-psched.c \
605 $(Z3950_C_DIR)\zes-pset.c \
606 $(Z3950_C_DIR)\zes-update0.c
608 # Files generated from ill9702.asn
610 $(INCLDIR)\yaz\ill-core.h
613 $(ILL_C_DIR)\ill-core.c
615 # Files generated from itemreq.asn
617 $(INCLDIR)\yaz\item-req.h
620 $(ILL_C_DIR)\item-req.c
623 DATETIME_FILES = $(DATETIME_H_FILES) $(DATETIME_C_FILES)
624 UNIVRES_FILES = $(UNIVRES_H_FILES) $(UNIVRES_C_FILES)
625 ESUPDATE_FILES = $(ESUPDATE_H_FILES) $(ESUPDATE_C_FILES)
626 ESADMIN_FILES = $(ESADMIN_H_FILES) $(ESADMIN_C_FILES)
627 Z3950V3_FILES= $(Z3950V3_C_FILES) $(Z3950V3_H_FILES)
628 ILL_CORE_FILES= $(ILL_CORE_C_FILES) $(ILL_CORE_H_FILES)
629 ITEM_REQ_FILES= $(ITEM_REQ_C_FILES) $(ITEM_REQ_H_FILES)
630 CHARNEG_FILES = $(CHARNEG_C_FILES) $(CHARNEG_H_FILES)
631 MTERM2_FILES = $(MTERM2_C_FILES) $(MTERM2_H_FILES)
632 OCLCUI_FILES = $(OCLCUI_C_FILES) $(OCLCUI_H_FILES)
636 $(ESUPDATE_C_FILES) \
638 $(DATETIME_C_FILES) \
643 $(ILL_CORE_C_FILES) \
648 $(ESUPDATE_H_FILES) \
650 $(DATETIME_H_FILES) \
655 $(ILL_CORE_H_FILES) \
659 $(GENERATED_H_FILES) \
660 $(GENERATED_C_FILES) \
661 $(SRCDIR)\diagsrw.c \
662 $(SRCDIR)\diagbib1.c \
663 $(SRCDIR)\diagsru_update.c
667 # Note: This defines where to look for the necessary
668 # source files. Funny way of doing it, but it works.
671 {$(CLIENTDIR)}.c{$(OBJDIR)}.obj:
672 $(CPP) $(COPT) $< /D"_CONSOLE"
675 {$(ZTESTDIR)}.c{$(OBJDIR)}.obj:
676 $(CPP) $(COPT) $< /D"_CONSOLE"
679 {$(SERVERDIR)}.c{$(OBJDIR)}.obj:
682 # Various YAZ source directories
683 {$(SRCDIR)}.c{$(OBJDIR)}.obj:
684 $(CPP) $(COPT) /D"YAZ_DLL" $<
686 {$(ZOOMDIR)}.c{$(OBJDIR)}.obj:
689 {$(UTILDIR)}.c{$(OBJDIR)}.obj:
692 {$(TESTDIR)}.c{$(OBJDIR)}.obj:
695 # ASN-generated files
699 $(Z3950V3_FILES): $(SRCDIR)\z3950v3.asn
701 $(TCL) $(TCLOPT) -d z.tcl z3950v3.asn
704 $(DATETIME_FILES): $(SRCDIR)\datetime.asn
706 $(TCL) $(TCLOPT) -d z.tcl datetime.asn
709 $(UNIVRES_FILES): $(SRCDIR)\univres.asn
711 $(TCL) $(TCLOPT) -d z.tcl univres.asn
714 $(ESUPDATE_FILES): $(SRCDIR)\esupdate.asn
716 $(TCL) $(TCLOPT) -d z.tcl esupdate.asn
719 $(ESADMIN_FILES): $(SRCDIR)\esadmin.asn
721 $(TCL) $(TCLOPT) -d z.tcl esadmin.asn
724 $(CHARNEG_FILES): $(SRCDIR)\charneg-3.asn
726 $(TCL) $(TCLOPT) -d z.tcl charneg-3.asn
729 $(MTERM2_FILES): $(SRCDIR)\mterm2.asn
731 $(TCL) $(TCLOPT) -d z.tcl mterm2.asn
734 $(OCLCUI_FILES): $(SRCDIR)\oclcui.asn
736 $(TCL) $(TCLOPT) -d z.tcl oclcui.asn
739 $(ILL_CORE_FILES): $(SRCDIR)\ill9702.asn
741 $(TCL) $(TCLOPT) -d ill.tcl ill9702.asn
744 $(ITEM_REQ_FILES): $(SRCDIR)\item-req.asn
746 $(TCL) $(TCLOPT) -d ill.tcl item-req.asn
749 $(SRCDIR)\marc8.c: $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl
751 $(TCL) charconv.tcl -p marc8 codetables.xml -o marc8.c
753 $(SRCDIR)\marc8r.c: $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl
755 $(TCL) charconv.tcl -r -p marc8r codetables.xml -o marc8r.c
757 $(SRCDIR)\oid_std.c: $(SRCDIR)\oid.csv $(SRCDIR)\charconv.tcl
759 $(TCL) oidtoc.tcl $(SRCDIR) oid.csv oid_std.c oid_std.h
761 $(SRCDIR)\diagbib1.c: $(SRCDIR)\bib1.csv
763 $(TCL) csvtobib1.tcl $(SRCDIR)
765 $(SRCDIR)\diagsrw.c: $(SRCDIR)\srw.csv
767 $(TCL) csvtosrw.tcl $(SRCDIR)
769 $(SRCDIR)\diagsru_update.c: $(SRCDIR)\sru_update.csv
771 $(TCL) csvtosru_update.tcl $(SRCDIR)
776 $(SRCDIR)\cql.c: $(SRCDIR)\cql.y
778 $(BISON) -y -p cql_ -o cql.c cql.y
783 # The RC compiler (resource files)
786 YAZ_RC=$(WINDIR)\yaz.rc
787 YAZ_RES=$(OBJDIR)\yaz.res
788 YAZ_ICU_RES=$(OBJDIR)\yaz_icu.res
796 $(YAZ_RES): $(YAZ_RC)
797 $(RSC) $(RSOPT) /I"../include" /fo"$(YAZ_RES)" $(YAZ_RC)
799 $(YAZ_ICU_RES): $(YAZ_RC)
800 $(RSC) $(RSOPT) /DICU=1 /I"../include" /fo"$(YAZ_ICU_RES)" $(YAZ_RC)
804 $(YAZ_DLL) $(YAZ_IMPLIB): "$(BINDIR)" $(DLL_OBJS) $(YAZ_RES)
809 /implib:"$(YAZ_IMPLIB)"
810 $(MT) -manifest $@.manifest -outputresource:$@;2
812 $(YAZ_ICU_DLL) $(YAZ_ICU_IMPLIB): "$(BINDIR)" $(ICU_DLL_OBJS) $(YAZ_ICU_RES)
813 $(LINK_DLL) $(ICU_LIB) $(YAZ_IMPLIB)\
817 /implib:"$(YAZ_ICU_IMPLIB)"
818 $(MT) -manifest $@.manifest -outputresource:$@;2
820 $(CLIENT) : "$(BINDIR)" $(YAZ_CLIENT_OBJS) $(YAZ_DLL)
821 $(LINK_PROGRAM) $(YAZ_CLIENT_OBJS) /out:$@
822 $(MT) -manifest $@.manifest -outputresource:$@;1
824 $(YAZ_ICU) : "$(BINDIR)" $(YAZ_ICU_OBJS) $(YAZ_ICU_DLL)
825 $(LINK_PROGRAM) $(ICU_LIB) $(YAZ_ICU_IMPLIB) $(YAZ_ICU_OBJS) /out:$@
826 $(MT) -manifest $@.manifest -outputresource:$@;1
829 $(SC_TEST) : "$(BINDIR)" $(SC_TEST_OBJS) $(YAZ_DLL)
830 $(LINK_PROGRAM) $(SC_TEST_OBJS) /out:$@
831 $(MT) -manifest $@.manifest -outputresource:$@;1
833 $(ZOOMSH) : "$(BINDIR)" $(YAZ_ZOOMSH_OBJS) $(YAZ_DLL)
834 $(LINK_PROGRAM) $(YAZ_ZOOMSH_OBJS) /out:$@
835 $(MT) -manifest $@.manifest -outputresource:$@;1
837 $(ZOOMTST1) : "$(BINDIR)" $(YAZ_ZOOMTST1_OBJS) $(YAZ_DLL)
838 $(LINK_PROGRAM) $(YAZ_ZOOMTST1_OBJS) /out:$@
839 $(MT) -manifest $@.manifest -outputresource:$@;1
841 $(ZOOMTST2) : "$(BINDIR)" $(YAZ_ZOOMTST2_OBJS) $(YAZ_DLL)
842 $(LINK_PROGRAM) $(YAZ_ZOOMTST2_OBJS) /out:$@
843 $(MT) -manifest $@.manifest -outputresource:$@;1
845 $(ZOOMTST3) : "$(BINDIR)" $(YAZ_ZOOMTST3_OBJS) $(YAZ_DLL)
846 $(LINK_PROGRAM) $(YAZ_ZOOMTST3_OBJS) /out:$@
847 $(MT) -manifest $@.manifest -outputresource:$@;1
849 $(ZOOMTST4) : "$(BINDIR)" $(YAZ_ZOOMTST4_OBJS) $(YAZ_DLL)
850 $(LINK_PROGRAM) $(YAZ_ZOOMTST4_OBJS) /out:$@
851 $(MT) -manifest $@.manifest -outputresource:$@;1
853 $(ZOOMTST5) : "$(BINDIR)" $(YAZ_ZOOMTST5_OBJS) $(YAZ_DLL)
854 $(LINK_PROGRAM) $(YAZ_ZOOMTST5_OBJS) /out:$@
855 $(MT) -manifest $@.manifest -outputresource:$@;1
857 $(ZOOMTST6) : "$(BINDIR)" $(YAZ_ZOOMTST6_OBJS) $(YAZ_DLL)
858 $(LINK_PROGRAM) $(YAZ_ZOOMTST6_OBJS) /out:$@
859 $(MT) -manifest $@.manifest -outputresource:$@;1
861 $(ZOOMTST7) : "$(BINDIR)" $(YAZ_ZOOMTST7_OBJS) $(YAZ_DLL)
862 $(LINK_PROGRAM) $(YAZ_ZOOMTST7_OBJS) /out:$@
863 $(MT) -manifest $@.manifest -outputresource:$@;1
865 $(ZOOMTST8) : "$(BINDIR)" $(YAZ_ZOOMTST8_OBJS) $(YAZ_DLL)
866 $(LINK_PROGRAM) $(YAZ_ZOOMTST8_OBJS) /out:$@
867 $(MT) -manifest $@.manifest -outputresource:$@;1
869 $(ZOOMTST9) : "$(BINDIR)" $(YAZ_ZOOMTST9_OBJS) $(YAZ_DLL)
870 $(LINK_PROGRAM) $(YAZ_ZOOMTST9_OBJS) /out:$@
871 $(MT) -manifest $@.manifest -outputresource:$@;1
873 $(ZOOMTST10) : "$(BINDIR)" $(YAZ_ZOOMTST10_OBJS) $(YAZ_DLL)
874 $(LINK_PROGRAM) $(YAZ_ZOOMTST10_OBJS) /out:$@
875 $(MT) -manifest $@.manifest -outputresource:$@;1
877 $(CQL2PQF) : "$(BINDIR)" $(YAZ_CQL2PQF_OBJS) $(YAZ_DLL)
878 $(LINK_PROGRAM) $(YAZ_CQL2PQF_OBJS) /out:$@
879 $(MT) -manifest $@.manifest -outputresource:$@;1
881 $(CQL2XCQL) : "$(BINDIR)" $(YAZ_CQL2XCQL_OBJS) $(YAZ_DLL)
882 $(LINK_PROGRAM) $(YAZ_CQL2XCQL_OBJS) /out:$@
883 $(MT) -manifest $@.manifest -outputresource:$@;1
885 $(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(YAZ_DLL)
886 $(LINK_PROGRAM) $(ZTEST_OBJS) /out:$@
887 $(MT) -manifest $@.manifest -outputresource:$@;1
889 $(YAZ_MARCDUMP) : "$(BINDIR)" $(YAZ_MARCDUMP_OBJS) $(YAZ_DLL)
890 $(LINK_PROGRAM) $(YAZ_MARCDUMP_OBJS) /out:$@
891 $(MT) -manifest $@.manifest -outputresource:$@;1
894 $(TSTLOG) : "$(BINDIR)" $(TSTLOG_OBJS) $(YAZ_DLL)
895 $(LINK_PROGRAM) $(TSTLOG_OBJS) /out:$@
896 $(MT) -manifest $@.manifest -outputresource:$@;1
898 $(TST_TIMING) : "$(BINDIR)" $(TST_TIMING_OBJS) $(YAZ_DLL)
899 $(LINK_PROGRAM) $(TST_TIMING_OBJS) /out:$@
900 $(MT) -manifest $@.manifest -outputresource:$@;1
904 $(DOCDIR)\htmlhelp.chm: $(DOCDIR)\htmlhelp.hhp
918 -del $(SRCDIR)\marc8.c
921 -del $(SRCDIR)\ill-core.c
922 -del $(SRCDIR)\item-req.c
923 -del $(INCLDIR)\yaz\ill-core.h
924 -del $(INCLDIR)\yaz\item-req.h
925 -del $(INCLDIR)\yaz\z-accdes1.h
926 -del $(INCLDIR)\yaz\z-core.h
927 -del $(DATETIME_H_FILES)
928 -del $(UNIVRES_H_FILES)
929 -del $(ESUPDATE_H_FILES)
931 # Because DOS del will only accept one file name to delete,
932 # the _H_ files work only on sets that have just one file.
933 # Z3950_H_FILES had to be spelled out. One more point for MS!
935 # check directories and create if needed
936 dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR)
938 $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR):
939 if not exist "$@/$(NUL)" mkdir "$@"
942 # Explicit dependencies
944 # force recompilation of everything, if makefile changed
946 $(Z3950_OBJS): $(GENERATED_C_FILES) $(GENERATED_H_FILES)
948 $(ILL_OBJS): $(ILL_CORE_FILES) $(ITEM_REQ_FILES)
950 # makes sure we generate before compiling anything, as the
951 # new proto.h refers to the generated files, and is included