-# Copyright (C) 1994-2004, Index Data
-# All rights reserved.
-# $Id: makefile,v 1.87 2004-11-21 21:56:28 adam Exp $
-#
-# Programmed by
-# HL: Heikki Levanto, Index Data
+# This file is part of the YAZ toolkit.
+# Copyright (C) 1995-2010 Index Data
-###########################################################
-############### Parameters
-###########################################################
+# Parameters
DEBUG=0 # 0 for release, 1 for debug
+USE_MANIFEST = 1
# TCL
-TCL="C:\Tcl\bin\tclsh84.exe"
+TCL="C:\Tcl\bin\tclsh85.exe"
#TCL="C:\Program Files\Tcl\bin\tclsh83.exe"
HAVE_TCL=1
# iconv charcter conversion utility
HAVE_ICONV=1
-ICONV_DIR = c:\iconv-1.9.1.win32
+ICONV_DIR = c:\iconv-1.9.2.win32
+
+# icu charcter conversion utility
+# get icu libraries from http://www.icu-project.org
+HAVE_ICU=1
+ICU_DIR = c:\icu
+
+# libxslt
+HAVE_LIBXSLT=1
+LIBXSLT_DIR=c:\libxslt-1.1.26.win32
# libxml2
HAVE_LIBXML2=1
-LIBXML2_DIR=c:\libxml2-2.6.9.win32
+LIBXML2_DIR=c:\libxml2-2.7.6.win32
# zlib compression (used by libxml2)
-ZLIB_DIR = c:\zlib-1.1.4.win32
+ZLIB_DIR = c:\zlib-1.2.3.win32
# get WIN32 binaries libxml2 & iconv & zlib from here:
-# http://www.zlatkovic.com/projects/libxml/binaries.html
+# http://www.zlatkovic.com/libxml.en.html
# bison
HAVE_BISON=1
default: all
-all: dirs generate dll client ztest zoomsh utilprog iconv libxml2
+all: dirs generate dll sc_test client ztest yazicu zoomsh utilprog testprog iconv icu libxml2 libxslt
NSIS="c:\program files\nsis\makensis.exe"
+HHC="c:\program files\html help workshop\hhc.exe"
-dist:
+dist: yaz.nsi
nmake DEBUG=1 clean
nmake DEBUG=0 clean
nmake DEBUG=0
$(NSIS) yaz.nsi
-nsis:
+nsis: all yaz.nsi
$(NSIS) yaz.nsi
nsishelp:
$(NSIS)
-generate: generated_files
-
-###########################################################
-############### Directories
-###########################################################
+# Directories
# The current directory is supposed to be something like
# ..../yaz/win, everything is relative to that
ROOTDIR=.. # The home of yaz
BINDIR=$(ROOTDIR)\bin # We produce exes and dlls there
WINDIR=$(ROOTDIR)\win # all these Win make things
SRCDIR=$(ROOTDIR)\src # for the case we move them under src
+DOCDIR=$(ROOTDIR)\doc # where the doc is
# where we store intermediate files
!if $(DEBUG)
ZTESTDIR=$(ROOTDIR)\ZTEST
ZOOMDIR=$(ROOTDIR)\ZOOM
UTILDIR=$(ROOTDIR)\UTIL
+TESTDIR=$(ROOTDIR)\TEST
TMPDIR=$(ROOTDIR)\win\tmp
TMP=$(TMPDIR)
-###########################################################
-############### Targets - what to make
-###########################################################
+# Targets - what to make
!if $(DEBUG)
-DLL=$(BINDIR)\yazd.dll
-IMPLIB=$(LIBDIR)\yazd.lib
+YAZ_DLL=$(BINDIR)\yaz4d.dll
+YAZ_IMPLIB=$(LIBDIR)\yaz4d.lib
+YAZ_ICU_DLL=$(BINDIR)\yaz_icu4d.dll
+YAZ_ICU_IMPLIB=$(LIBDIR)\yaz_icu4d.lib
+YAZ_COND_DLL=$(BINDIR)\yaz_cond4d.dll
+YAZ_COND_IMPLIB=$(LIBDIR)\yaz_cond4d.lib
!else
-DLL=$(BINDIR)\yaz.dll
-IMPLIB=$(LIBDIR)\yaz.lib
+YAZ_DLL=$(BINDIR)\yaz4.dll
+YAZ_IMPLIB=$(LIBDIR)\yaz4.lib
+YAZ_ICU_DLL=$(BINDIR)\yaz_icu4.dll
+YAZ_ICU_IMPLIB=$(LIBDIR)\yaz_icu4.lib
+YAZ_COND_DLL=$(BINDIR)\yaz_cond4.dll
+YAZ_COND_IMPLIB=$(LIBDIR)\yaz_cond4.lib
!endif
CLIENT=$(BINDIR)\yaz-client.exe
+YAZ_ICU=$(BINDIR)\yaz-icu.exe
ZOOMSH=$(BINDIR)\zoomsh.exe
ZTEST=$(BINDIR)\yaz-ztest.exe
+SC_TEST=$(BINDIR)\sc_test.exe
ZOOMTST1=$(BINDIR)\zoomtst1.exe
ZOOMTST2=$(BINDIR)\zoomtst2.exe
ZOOMTST6=$(BINDIR)\zoomtst6.exe
ZOOMTST7=$(BINDIR)\zoomtst7.exe
ZOOMTST8=$(BINDIR)\zoomtst8.exe
+ZOOMTST9=$(BINDIR)\zoomtst9.exe
+ZOOMTST10=$(BINDIR)\zoomtst10.exe
CQL2PQF=$(BINDIR)\cql2pqf.exe
CQL2XCQL=$(BINDIR)\cql2xcql.exe
YAZ_MARCDUMP=$(BINDIR)\yaz-marcdump.exe
+TSTLOG=$(BINDIR)\test_log.exe
+TST_TIMING=$(BINDIR)\test_timing.exe
+TEST_MUTEX=$(BINDIR)\test_mutex.exe
+
# shortcut names defined here
-dll: dirs generate $(DLL)
+dll: dirs generate $(YAZ_DLL) $(YAZ_COND_DLL)
client: dirs generate $(CLIENT)
ztest: dirs generate $(ZTEST)
+sc_test: $(SC_TEST)
+
zoomsh: $(ZOOMSH) $(ZOOMTST1) $(ZOOMTST2) $(ZOOMTST3) \
- $(ZOOMTST4) $(ZOOMTST5) $(ZOOMTST6) $(ZOOMTST7) $(ZOOMTST8)
+ $(ZOOMTST4) $(ZOOMTST5) $(ZOOMTST6) $(ZOOMTST7) $(ZOOMTST8) $(ZOOMTST9) \
+ $(ZOOMTST10)
+
+utilprog: $(CQL2PQF) $(CQL2XCQL) $(YAZ_MARCDUMP)
+testprog: $(TSTLOG) $(TST_TIMING) $(TEST_MUTEX)
-utilprog: $(CQL2PQF) $(CQL2XCQL) $(YAZ_MARCDUMP)
+htmlhelp: $(DOCDIR)\htmlhelp.chm
-###########################################################
-############### Compiler and linker options
-###########################################################
+# Modules and conditional flags, etc
!if $(HAVE_ICONV)
ICONV_DEF= \
iconv: $(BINDIR)\iconv.dll
$(BINDIR)\iconv.dll:
- copy "$(ICONV_DIR)\lib\iconv.dll" $(BINDIR)
+ copy "$(ICONV_DIR)\bin\iconv.dll" $(BINDIR)
!else
ICONV_DEF= \
/D HAVE_ICONV_H=0
!endif
+###TRYING ICU FLAGS HERE WORKS ####
+## ADAM ARE THESE FLAGS OK and the DLL sufficient ##
+##IT COMPILES AND SEEMS TO WORK
+
+!if $(HAVE_ICU)
+ICU_DEF= \
+ /D YAZ_HAVE_ICU=1 /D HAVE_ICU_H=1 \
+ /I"$(ICU_DIR)\include"
+ICU_LIB= \
+ $(ICU_DIR)\lib\icudt.lib $(ICU_DIR)\lib\icuin.lib $(ICU_DIR)\lib\icuuc.lib
+icu: $(BINDIR)\icudt42.dll $(BINDIR)\icuin42.dll $(BINDIR)\icuuc42.dll
+yazicu: dirs generate $(YAZ_ICU)
+
+$(BINDIR)\icudt42.dll:
+ copy "$(ICU_DIR)\bin\icudt42.dll" $(BINDIR)
+$(BINDIR)\icuin42.dll:
+ copy "$(ICU_DIR)\bin\icuin42.dll" $(BINDIR)
+$(BINDIR)\icuuc42.dll:
+ copy "$(ICU_DIR)\bin\icuuc42.dll" $(BINDIR)
+!else
+ICU_DEF= \
+ /D YAZ_HAVE_ICU=0
+ICU_LIB=
+icu:
+yazicu:
+!endif
+
+###
+
!if $(HAVE_LIBXML2)
LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib"
-LIBXML2_DEF=/D HAVE_XML2=1 /I"$(LIBXML2_DIR)\include"
-libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib.dll
+LIBXML2_DEF=/D YAZ_HAVE_XML2=1 /I"$(LIBXML2_DIR)\include"
+libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib1.dll
$(BINDIR)\libxml2.dll:
- copy "$(LIBXML2_DIR)\lib\libxml2.dll" $(BINDIR)
+ copy "$(LIBXML2_DIR)\bin\libxml2.dll" $(BINDIR)
-$(BINDIR)\zlib.dll:
- copy "$(ZLIB_DIR)\lib\zlib.dll" $(BINDIR)
+$(BINDIR)\zlib1.dll:
+ copy "$(ZLIB_DIR)\bin\zlib1.dll" $(BINDIR)
!else
LIBXML2_LIB=
-LIBXML2_DEF=/D HAVE_XML2=0
+LIBXML2_DEF=/D YAZ_HAVE_XML2=0
libxml2:
!endif
+!if $(HAVE_LIBXSLT)
+LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
+LIBXSLT_DEF= \
+ /D HAVE_XSLTSAVERESULTTOSTRING=1 \
+ /D YAZ_HAVE_XSLT=1 \
+ /I"$(LIBXSLT_DIR)\include"
+libxslt: $(BINDIR)\libxslt.dll
+
+$(BINDIR)\libxslt.dll:
+ copy "$(LIBXSLT_DIR)\bin\libxslt.dll" $(BINDIR)
+
+!else
+LIBXSLT_LIB=
+LIBXSLT_DEF=/D YAZ_HAVE_XSLT=0
+libxslt:
+!endif
+
### C and CPP compiler (the same thing)
# Note: $(CPP) has already been defined in the environment
# (if you set things up right!)
COMMON_C_OPTIONS= \
- /nologo /W3 /GX /FD /c \
+ /nologo /W3 /EHsc /FD /c \
$(ICONV_DEF) \
+ $(ICU_DEF) \
$(LIBXML2_DEF) \
+ $(LIBXSLT_DEF) \
+ /D "_CRT_SECURE_NO_DEPRECATE" \
+ /D "_CRT_NONSTDC_NO_DEPRECATE" \
/D "_WINDOWS" \
/D "WIN32" \
/FR"$(OBJDIR)\\" \
DEBUG_C_OPTIONS= \
/D "_DEBUG" \
- /MDd /Od /YX /Zi /Gm
+ /MDd /Od /Zi /Gm
RELEASE_C_OPTIONS= \
/D "NDEBUG" \
# /MDd = Runtime library: Multithread DLL (debug)
# /Od = Disable optimising (debug)
# /O2 = Optimize for speed
-# /YX = Automatic use of precomipled headers
# /Gm = Minimal rebuild (some cpp class stuff)
# /Zi = Program database for debuggers
# /ZI = Pgm database with special "edit&continue" stuff - not available in C5
### Linker options
LINK=link.exe
-LINK_LIBS= kernel32.lib user32.lib gdi32.lib \
- advapi32.lib uuid.lib \
- wsock32.lib advapi32.lib \
- $(ICONV_LIB) $(LIBXML2_LIB)
+!if $(USE_MANIFEST)
+MT=mt.exe /nologo
+!else
+MT=echo
+!endif
-COMMON_LNK_OPTIONS= /nologo \
- /subsystem:windows \
- /machine:i386 \
- /incremental:no
+LINK_LIBS= kernel32.lib ws2_32.lib advapi32.lib \
+ $(ICONV_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB)
+
+COMMON_LNK_OPTIONS= /nologo /subsystem:windows /incremental:no
DEBUG_LNK_OPTIONS= /debug
DLL_LINK_OPTIONS= /dll
CLIENT_LINK_OPTIONS = /subsystem:console
-SERVER_LINK_OPTIONS = -lib
-ZTEST_LINK_OPTIONS = /subsystem:console
COMMON_TCL_OPTIONS= ..\util\yaz-asncomp -I$(INCLDIR) -i yaz
# Final opt variables
!if $(DEBUG)
COPT= $(COMMON_C_OPTIONS) $(DEBUG_C_OPTIONS) $(COMMON_C_INCLUDES)
-MTLOPT= $(COMMON_MTL_OPTIONS) $(DEBUG_MTL_OPTIONS)
-RCOPT= $(COMMON_RC_OPTIONS) $(DEBUG_RC_OPTIONS)
LNKOPT= $(COMMON_LNK_OPTIONS) $(DEBUG_LNK_OPTIONS) $(LNK_LIBS)
TCLOPT= $(COMMON_TCL_OPTIONS)
!else
COPT= $(COMMON_C_OPTIONS) $(RELEASE_C_OPTIONS) $(COMMON_C_INCLUDES)
-MTLOPT= $(COMMON_MTL_OPTIONS) $(RELEASE_MTL_OPTIONS)
-RCOPT= $(COMMON_RC_OPTIONS) $(RELEASE_RC_OPTIONS)
LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS)
TCLOPT= $(COMMON_TCL_OPTIONS)
!endif
+LINK_PROGRAM = $(LINK) $(LNKOPT) \
+ $(CLIENT_LINK_OPTIONS) $(LINK_LIBS) $(YAZ_IMPLIB)
+
+LINK_DLL = $(LINK) $(LNKOPT) \
+ $(LINK_LIBS) $(DLL_LINK_OPTIONS)
-###########################################################
-############### Source and object modules
-###########################################################
+# Source and object modules
# Note: Ordinary source files are not specified here at
# all, make finds them in suitable dirs. The object modules
YAZ_CLIENT_OBJS= \
$(OBJDIR)\client.obj \
$(OBJDIR)\tabcomplete.obj \
- $(OBJDIR)\admin.obj
+ $(OBJDIR)\admin.obj \
+ $(OBJDIR)\fhistory.obj
+
+YAZ_ICU_OBJS= $(OBJDIR)\yaz-icu.obj
+COND_DLL_OBJS= $(OBJDIR)\condvar.obj
+
+ZTEST_OBJS= \
+ $(OBJDIR)\dummy-opac.obj \
+ $(OBJDIR)\read-marc.obj \
+ $(OBJDIR)\read-grs.obj \
+ $(OBJDIR)\ztest.obj
+
+SC_TEST_OBJS = \
+ $(OBJDIR)\sc_test.obj
YAZ_ZOOMSH_OBJS = \
$(OBJDIR)\zoomsh.obj
$(OBJDIR)\zoomtst7.obj
YAZ_ZOOMTST8_OBJS = \
$(OBJDIR)\zoomtst8.obj
+YAZ_ZOOMTST9_OBJS = \
+ $(OBJDIR)\zoomtst9.obj
+YAZ_ZOOMTST10_OBJS = \
+ $(OBJDIR)\zoomtst10.obj
YAZ_CQL2PQF_OBJS = \
$(OBJDIR)\cql2pqf.obj
YAZ_MARCDUMP_OBJS = \
$(OBJDIR)\marcdump.obj
-YAZ_SERVER_OBJS= \
- "$(OBJDIR)\eventl.obj" \
- "$(OBJDIR)\requestq.obj" \
- "$(OBJDIR)\service.obj" \
- "$(OBJDIR)\seshigh.obj" \
- "$(OBJDIR)\statserv.obj" \
- "$(OBJDIR)\tcpdchk.obj"
-ZTEST_OBJS= \
- "$(OBJDIR)\read-marc.obj" \
- "$(OBJDIR)\read-grs.obj" \
- "$(OBJDIR)\ztest.obj"
+TSTLOG_OBJS = \
+ $(OBJDIR)\test_log.obj
+
+TST_TIMING_OBJS = \
+ $(OBJDIR)\test_timing.obj
+
+TEST_MUTEX_OBJS = \
+ $(OBJDIR)\test_mutex.obj
-YAZ_CCL_OBJS= \
+MISC_OBJS= \
+ $(OBJDIR)\version.obj \
+ $(OBJDIR)\oid_std.obj \
+ $(OBJDIR)\eventl.obj \
+ $(OBJDIR)\requestq.obj \
+ $(OBJDIR)\seshigh.obj \
+ $(OBJDIR)\statserv.obj \
+ $(OBJDIR)\tcpdchk.obj \
$(OBJDIR)\cclerrms.obj \
$(OBJDIR)\cclfind.obj \
$(OBJDIR)\cclptree.obj \
$(OBJDIR)\cclqfile.obj \
$(OBJDIR)\cclqual.obj \
$(OBJDIR)\cclstr.obj \
- $(OBJDIR)\ccltoken.obj
-
-YAZ_COMSTACK_OBJS= \
+ $(OBJDIR)\ccltoken.obj \
+ $(OBJDIR)\ccl_stop_words.obj \
$(OBJDIR)\comstack.obj \
$(OBJDIR)\tcpip.obj \
- $(OBJDIR)\waislen.obj
-
-YAZ_ODR_OBJS= \
+ $(OBJDIR)\waislen.obj \
$(OBJDIR)\ber_any.obj \
$(OBJDIR)\ber_bit.obj \
$(OBJDIR)\ber_bool.obj \
$(OBJDIR)\ber_oid.obj \
$(OBJDIR)\ber_tag.obj \
$(OBJDIR)\dumpber.obj \
+ $(OBJDIR)\errno.obj \
$(OBJDIR)\odr.obj \
$(OBJDIR)\odr_any.obj \
$(OBJDIR)\odr_bit.obj \
$(OBJDIR)\odr_seq.obj \
$(OBJDIR)\odr_tag.obj \
$(OBJDIR)\odr_use.obj \
- $(OBJDIR)\odr_util.obj
-
-YAZ_UTIL_OBJS= \
- $(OBJDIR)\version.obj \
+ $(OBJDIR)\odr_util.obj \
$(OBJDIR)\atoin.obj \
$(OBJDIR)\log.obj \
$(OBJDIR)\marcdisp.obj \
+ $(OBJDIR)\marc_read_xml.obj \
+ $(OBJDIR)\marc_read_iso2709.obj \
+ $(OBJDIR)\marc_read_line.obj \
$(OBJDIR)\nmem.obj \
$(OBJDIR)\nmemsdup.obj \
- $(OBJDIR)\oid.obj \
+ $(OBJDIR)\oid_db.obj \
+ $(OBJDIR)\oid_util.obj \
$(OBJDIR)\options.obj \
$(OBJDIR)\readconf.obj \
$(OBJDIR)\tpath.obj \
$(OBJDIR)\xmalloc.obj \
$(OBJDIR)\matchstr.obj \
$(OBJDIR)\siconv.obj \
- $(OBJDIR)\marc8.obj
-
-YAZ_ZUTIL_OBJS= \
+ $(OBJDIR)\iso5428.obj \
+ $(OBJDIR)\utf8.obj \
+ $(OBJDIR)\ucs4.obj \
+ $(OBJDIR)\advancegreek.obj \
+ $(OBJDIR)\snprintf.obj \
+ $(OBJDIR)\marc8.obj \
+ $(OBJDIR)\marc8r.obj \
+ $(OBJDIR)\iso5426.obj \
+ $(OBJDIR)\record_conv.obj \
+ $(OBJDIR)\retrieval.obj \
+ $(OBJDIR)\test.obj \
$(OBJDIR)\diagbib1.obj \
+ $(OBJDIR)\diagsru_update.obj \
$(OBJDIR)\diagsrw.obj \
+ $(OBJDIR)\diag-entry.obj \
$(OBJDIR)\zget.obj \
$(OBJDIR)\logrpn.obj \
+ $(OBJDIR)\querytowrbuf.obj \
$(OBJDIR)\pquery.obj \
$(OBJDIR)\yaz-ccl.obj \
$(OBJDIR)\otherinfo.obj \
$(OBJDIR)\sortspec.obj \
- $(OBJDIR)\z3950oid.obj \
$(OBJDIR)\charneg.obj \
$(OBJDIR)\grs1disp.obj \
$(OBJDIR)\opacdisp.obj \
$(OBJDIR)\srw.obj \
$(OBJDIR)\srwutil.obj \
$(OBJDIR)\zoom-c.obj \
+ $(OBJDIR)\zoom-z3950.obj \
+ $(OBJDIR)\facet.obj \
$(OBJDIR)\zoom-opt.obj \
- $(OBJDIR)\initopt.obj
+ $(OBJDIR)\zoom-socket.obj \
+ $(OBJDIR)\initopt.obj \
+ $(OBJDIR)\xmlquery.obj \
+ $(OBJDIR)\xmlerror.obj \
+ $(OBJDIR)\mime.obj \
+ $(OBJDIR)\cql.obj \
+ $(OBJDIR)\cqlstdio.obj \
+ $(OBJDIR)\cqlstring.obj \
+ $(OBJDIR)\cqltransform.obj \
+ $(OBJDIR)\cqlutil.obj \
+ $(OBJDIR)\cqlstrer.obj \
+ $(OBJDIR)\rpn2cql.obj \
+ $(OBJDIR)\xcqlutil.obj \
+ $(OBJDIR)\elementset.obj \
+ $(OBJDIR)\timing.obj \
+ $(OBJDIR)\uri.obj \
+ $(OBJDIR)\query-charset.obj \
+ $(OBJDIR)\tokenizer.obj \
+ $(OBJDIR)\copy_types.obj \
+ $(OBJDIR)\http.obj \
+ $(OBJDIR)\match_glob.obj \
+ $(OBJDIR)\poll.obj \
+ $(OBJDIR)\daemon.obj \
+ $(OBJDIR)\iconv_encode_iso_8859_1.obj \
+ $(OBJDIR)\iconv_encode_marc8.obj \
+ $(OBJDIR)\iconv_decode_marc8.obj \
+ $(OBJDIR)\iconv_encode_wchar.obj \
+ $(OBJDIR)\iconv_decode_iso5426.obj \
+ $(OBJDIR)\iconv_decode_danmarc.obj \
+ $(OBJDIR)\mutex.obj \
+ $(OBJDIR)\thread_create.obj \
+ $(OBJDIR)\spipe.obj \
+ $(OBJDIR)\gettimeofday.obj \
+ $(OBJDIR)\json.obj \
+ $(OBJDIR)\sc.obj \
+ $(OBJDIR)\xml_include.obj \
+ $(OBJDIR)\file_glob.obj \
+ $(OBJDIR)\thread_id.obj \
+ $(OBJDIR)\dirent.obj
Z3950_OBJS= \
$(OBJDIR)\z-date.obj\
$(OBJDIR)\prt-ext.obj \
$(OBJDIR)\z-charneg.obj \
$(OBJDIR)\z-mterm2.obj \
- $(OBJDIR)\z-oclcui.obj
+ $(OBJDIR)\z-oclcui.obj \
+ $(OBJDIR)\z-facet-1.obj
ILL_OBJS= \
$(OBJDIR)\ill-get.obj\
$(OBJDIR)\ill-core.obj\
$(OBJDIR)\item-req.obj
-YAZ_CQL_OBJS = \
- $(OBJDIR)\cql.obj \
- $(OBJDIR)\cqlstdio.obj \
- $(OBJDIR)\cqlstring.obj \
- $(OBJDIR)\cqltransform.obj \
- $(OBJDIR)\cqlutil.obj \
- $(OBJDIR)\cqlstrer.obj \
- $(OBJDIR)\xcqlutil.obj
-
-YAZ_OBJS =\
- $(YAZ_UTIL_OBJS) \
- $(YAZ_ODR_OBJS) \
- $(YAZ_COMSTACK_OBJS) \
+DLL_OBJS =\
+ $(MISC_OBJS) \
$(Z3950_OBJS) \
$(ILL_OBJS) \
- $(YAZ_ZUTIL_OBJS) \
- $(YAZ_CCL_OBJS) \
- $(YAZ_CQL_OBJS) \
- $(YAZ_SERVER_OBJS)
-
-DLL_OBJS= $(YAZ_OBJS)
-
-###########################################################
-############### Generated C and H files
-#####
-######################################################
+
+ICU_DLL_OBJS =\
+ $(OBJDIR)\icu_chain.obj \
+ $(OBJDIR)\icu_utf16.obj \
+ $(OBJDIR)\icu_utf8.obj \
+ $(OBJDIR)\icu_transform.obj \
+ $(OBJDIR)\icu_casemap.obj \
+ $(OBJDIR)\icu_tokenizer.obj \
+ $(OBJDIR)\icu_sortkey.obj
+
+# Generated C and H files
Z3950_C_DIR=$(SRCDIR)
ILL_C_DIR=$(SRCDIR)
OCLCUI_H_FILES = $(INCLDIR)\yaz\z-oclcui.h
OCLCUI_C_FILES = $(Z3950_C_DIR)\z-oclcui.c
+# Files generated from facet.asn
+FACET_H_FILES = $(INCLDIR)\yaz\z-facet-1.h
+FACET_C_FILES = $(Z3950_C_DIR)\z-facet-1.c
+
# Files created from z3950v3.asn
Z3950V3_H_FILES= \
$(INCLDIR)\yaz\z-accdes1.h \
CHARNEG_FILES = $(CHARNEG_C_FILES) $(CHARNEG_H_FILES)
MTERM2_FILES = $(MTERM2_C_FILES) $(MTERM2_H_FILES)
OCLCUI_FILES = $(OCLCUI_C_FILES) $(OCLCUI_H_FILES)
+FACET_FILES = $(FACET_C_FILES) $(FACET_H_FILES)
GENERATED_C_FILES= \
$(Z3950V3_C_FILES) \
$(ESADMIN_C_FILES) \
$(CHARNEG_C_FILES) \
$(MTERM2_C_FILES) \
- $(OCLCUI_C_FILES)
+ $(OCLCUI_C_FILES) \
+ $(FACET_C_FILES) \
+ $(ILL_CORE_C_FILES) \
+ $(ITEM_REQ_C_FILES)
GENERATED_H_FILES= \
$(Z3950V3_H_FILES) \
$(ESADMIN_H_FILES) \
$(CHARNEG_H_FILES) \
$(MTERM2_H_FILES) \
- $(OCLCUI_H_FILES)
+ $(OCLCUI_H_FILES) \
+ $(FACET_H_FILES) \
+ $(ILL_CORE_H_FILES) \
+ $(ITEM_REQ_H_FILES)
-generated_files: \
+generate: \
$(GENERATED_H_FILES) \
$(GENERATED_C_FILES) \
+ $(SRCDIR)\diagsrw.c \
+ $(SRCDIR)\diagbib1.c \
+ $(SRCDIR)\diagsru_update.c \
+ $(INCLDIR)\yaz\yaz-version.h
-###########################################################
-############### Compiling
-###########################################################
+# Compiling
# Note: This defines where to look for the necessary
# source files. Funny way of doing it, but it works.
# yaz client
{$(CLIENTDIR)}.c{$(OBJDIR)}.obj:
- @$(CPP) $(COPT) $< /D"_CONSOLE"
+ $(CPP) $(COPT) $< /D"_CONSOLE"
# Ztest
{$(ZTESTDIR)}.c{$(OBJDIR)}.obj:
- @$(CPP) $(COPT) $< /D"_CONSOLE"
+ $(CPP) $(COPT) $< /D"_CONSOLE"
# Server
{$(SERVERDIR)}.c{$(OBJDIR)}.obj:
# Various YAZ source directories
{$(SRCDIR)}.c{$(OBJDIR)}.obj:
- $(CPP) $(COPT) $<
+ $(CPP) $(COPT) /D"YAZ_DLL" $<
{$(ZOOMDIR)}.c{$(OBJDIR)}.obj:
$(CPP) $(COPT) $<
{$(UTILDIR)}.c{$(OBJDIR)}.obj:
$(CPP) $(COPT) $<
-############### ASN-generated files
+{$(TESTDIR)}.c{$(OBJDIR)}.obj:
+ $(CPP) $(COPT) $<
+
+# ASN-generated files
!if $(HAVE_TCL)
$(TCL) $(TCLOPT) -d z.tcl oclcui.asn
@cd $(WINDIR)
+$(FACET_FILES): $(SRCDIR)\facet.asn
+ @cd $(SRCDIR)
+ $(TCL) $(TCLOPT) -d z.tcl facet.asn
+ @cd $(WINDIR)
+
$(ILL_CORE_FILES): $(SRCDIR)\ill9702.asn
@cd $(SRCDIR)
$(TCL) $(TCLOPT) -d ill.tcl ill9702.asn
@cd $(SRCDIR)
$(TCL) charconv.tcl -p marc8 codetables.xml -o marc8.c
+$(SRCDIR)\marc8r.c: $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl
+ @cd $(SRCDIR)
+ $(TCL) charconv.tcl -r -p marc8r codetables.xml -o marc8r.c
+
+$(SRCDIR)\iso5426.c: $(SRCDIR)\codetables-iso5426.xml $(SRCDIR)\charconv.tcl
+ @cd $(SRCDIR)
+ $(TCL) charconv.tcl -r -p iso5426 codetables-iso5426.xml -o iso5426.c
+
+$(SRCDIR)\oid_std.c: $(SRCDIR)\oid.csv
+ @cd $(SRCDIR)
+ $(TCL) oidtoc.tcl $(SRCDIR) oid.csv oid_std.c oid_std.h
+
+$(SRCDIR)\diagbib1.c: $(SRCDIR)\bib1.csv
+ @cd $(SRCDIR)
+ $(TCL) csvtobib1.tcl $(SRCDIR)
+
+$(SRCDIR)\diagsrw.c: $(SRCDIR)\srw.csv
+ @cd $(SRCDIR)
+ $(TCL) csvtosrw.tcl $(SRCDIR)
+
+$(SRCDIR)\diagsru_update.c: $(SRCDIR)\sru_update.csv
+ @cd $(SRCDIR)
+ $(TCL) csvtosru_update.tcl $(SRCDIR)
+
+$(INCLDIR)\yaz\yaz-version.h: $(ROOTDIR)/configure.ac
+ @cd $(SRCDIR)
+ $(TCL) mk_version.tcl $(ROOTDIR)/configure.ac $(INCLDIR)\yaz\yaz-version.h
+
+
!endif
!if $(HAVE_BISON)
!endif
-###########################################################
-############### Resources
-###########################################################
-
-### The RC compiler (resource files)
+# Resources
+# The RC compiler (resource files)
RSC=rc.exe
-COMMON_RC_OPTIONS= /l 0x406 /i"$(ROOTDIR)"
-DEBUG_RC_OPTIONS=/d "_DEBUG"
-RELEASE_RC_OPTIONS=/d "NDEBUG"
-YAZ_RES=$(OBJDIR)\yaz.res
YAZ_RC=$(WINDIR)\yaz.rc
+YAZ_RES=$(OBJDIR)\yaz.res
+YAZ_ICU_RES=$(OBJDIR)\yaz_icu.res
!if $(DEBUG)
RSOPT=/d_DEBUG
!endif
$(YAZ_RES): $(YAZ_RC)
- $(RSC) $(RSOPT) /fo"$(YAZ_RES)" $(YAZ_RC)
-
-###########################################################
-############### Linking
-###########################################################
-
-$(DLL) $(IMPLIB): "$(BINDIR)" $(DLL_OBJS) $(YAZ_RES)
- @echo Linking the dll $(DLL)
- $(LINK) @<<
- $(LNKOPT)
- $(LINK_LIBS)
- $(DLL_LINK_OPTIONS)
- $(DLL_OBJS)
- $(YAZ_RES)
- /out:$(DLL)
- /implib:"$(IMPLIB)"
- /map:"$(LIBDIR)\yaz.map"
-<<
-
-$(CLIENT) : "$(BINDIR)" $(YAZ_CLIENT_OBJS)
- @echo Linking $(CLIENT)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_CLIENT_OBJS)
- /map:"$(LIBDIR)\yaz-client.map"
- /out:$(CLIENT)
-<<
-
-$(ZOOMSH) : "$(BINDIR)" $(YAZ_ZOOMSH_OBJS)
- @echo Linking $(ZOOMSH)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMSH_OBJS)
- /map:"$(LIBDIR)\zoomsh.map"
- /out:$(ZOOMSH)
-<<
-
-$(ZOOMTST1) : "$(BINDIR)" $(YAZ_ZOOMTST1_OBJS)
- @echo Linking $(ZOOMTST1)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST1_OBJS)
- /map:"$(LIBDIR)\zoomtst1.map"
- /out:$(ZOOMTST1)
-<<
-
-$(ZOOMTST2) : "$(BINDIR)" $(YAZ_ZOOMTST2_OBJS)
- @echo Linking $(ZOOMTST2)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST2_OBJS)
- /map:"$(LIBDIR)\zoomtst2.map"
- /out:$(ZOOMTST2)
-<<
-
-$(ZOOMTST3) : "$(BINDIR)" $(YAZ_ZOOMTST3_OBJS)
- @echo Linking $(ZOOMTST3)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST3_OBJS)
- /map:"$(LIBDIR)\zoomtst3.map"
- /out:$(ZOOMTST3)
-<<
-
-$(ZOOMTST4) : "$(BINDIR)" $(YAZ_ZOOMTST4_OBJS)
- @echo Linking $(ZOOMTST4)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST4_OBJS)
- /map:"$(LIBDIR)\zoomtst4.map"
- /out:$(ZOOMTST4)
-<<
-
-$(ZOOMTST5) : "$(BINDIR)" $(YAZ_ZOOMTST5_OBJS)
- @echo Linking $(ZOOMTST5)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST5_OBJS)
- /map:"$(LIBDIR)\zoomtst5.map"
- /out:$(ZOOMTST5)
-<<
-
-$(ZOOMTST6) : "$(BINDIR)" $(YAZ_ZOOMTST6_OBJS)
- @echo Linking $(ZOOMTST6)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST6_OBJS)
- /map:"$(LIBDIR)\zoomtst6.map"
- /out:$(ZOOMTST6)
-<<
-
-$(ZOOMTST7) : "$(BINDIR)" $(YAZ_ZOOMTST7_OBJS)
- @echo Linking $(ZOOMTST7)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST7_OBJS)
- /map:"$(LIBDIR)\zoomtst7.map"
- /out:$(ZOOMTST7)
-<<
-
-$(ZOOMTST8) : "$(BINDIR)" $(YAZ_ZOOMTST8_OBJS)
- @echo Linking $(ZOOMTST8)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_ZOOMTST8_OBJS)
- /map:"$(LIBDIR)\zoomtst8.map"
- /out:$(ZOOMTST8)
-<<
-
-$(CQL2PQF) : "$(BINDIR)" $(YAZ_CQL2PQF_OBJS)
- @echo Linking $(CQL2PQF)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_CQL2PQF_OBJS)
- /map:"$(LIBDIR)\cql2pqf.map"
- /out:$(CQL2PQF)
-<<
-
-$(CQL2XCQL) : "$(BINDIR)" $(YAZ_CQL2XCQL_OBJS)
- @echo Linking $(CQL2XCQL)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(IMPLIB)
- $(YAZ_CQL2XCQL_OBJS)
- /map:"$(LIBDIR)\cql2xcql.map"
- /out:$(CQL2XCQL)
-<<
-
-$(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(DLL)
- @echo Linking $(ZTEST)
- $(LINK) @<<
- $(LNKOPT)
- $(ZTEST_LINK_OPTIONS)
- $(LINK_LIBS)
- shell32.lib
- $(IMPLIB)
- $(ZTEST_OBJS)
- /implib:"$(LIBDIR)\yaz-ztest.lib"
- /map:"$(LIBDIR)\yaz-ztest.map"
- /out:$(ZTEST)
-<<
-
-$(YAZ_MARCDUMP) : "$(BINDIR)" $(YAZ_MARCDUMP_OBJS) $(DLL)
- @echo Linking $(YAZ_MARCDUMP)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- shell32.lib
- $(IMPLIB)
- $(YAZ_MARCDUMP_OBJS)
- /map:"$(LIBDIR)\yaz-marcdump.map"
- /out:$(YAZ_MARCDUMP)
-<<
-
-
-# note that this links a lib, so it uses completely different options.
-
-###########################################################
-############### Special operations
-###########################################################
-
-
-############## clean
+ $(RSC) $(RSOPT) /I"../include" /fo"$(YAZ_RES)" $(YAZ_RC)
+
+$(YAZ_ICU_RES): $(YAZ_RC)
+ $(RSC) $(RSOPT) /DICU=1 /I"../include" /fo"$(YAZ_ICU_RES)" $(YAZ_RC)
+
+# Linking
+
+$(YAZ_DLL) $(YAZ_IMPLIB): "$(BINDIR)" $(DLL_OBJS) $(YAZ_RES)
+ $(LINK_DLL) \
+ $(DLL_OBJS) \
+ $(YAZ_RES) \
+ /out:$@ \
+ /implib:"$(YAZ_IMPLIB)"
+ $(MT) -manifest $@.manifest -outputresource:$@;2
+
+$(YAZ_ICU_DLL) $(YAZ_ICU_IMPLIB): "$(BINDIR)" $(ICU_DLL_OBJS) $(YAZ_ICU_RES)
+ $(LINK_DLL) $(ICU_LIB) $(YAZ_IMPLIB)\
+ $(ICU_DLL_OBJS) \
+ $(YAZ_ICU_RES) \
+ /out:$@ \
+ /implib:"$(YAZ_ICU_IMPLIB)"
+ $(MT) -manifest $@.manifest -outputresource:$@;2
+
+$(YAZ_COND_DLL) $(YAZ_COND_IMPLIB): "$(BINDIR)" $(COND_DLL_OBJS) $(YAZ_COND_RES)
+ $(LINK_DLL) $(COND_LIB) $(YAZ_IMPLIB)\
+ $(COND_DLL_OBJS) \
+ $(YAZ_COND_RES) \
+ /out:$@ \
+ /implib:"$(YAZ_COND_IMPLIB)"
+ $(MT) -manifest $@.manifest -outputresource:$@;2
+
+$(CLIENT) : "$(BINDIR)" $(YAZ_CLIENT_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_CLIENT_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(YAZ_ICU) : "$(BINDIR)" $(YAZ_ICU_OBJS) $(YAZ_ICU_DLL)
+ $(LINK_PROGRAM) $(ICU_LIB) $(YAZ_ICU_IMPLIB) $(YAZ_ICU_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+
+$(SC_TEST) : "$(BINDIR)" $(SC_TEST_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(SC_TEST_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMSH) : "$(BINDIR)" $(YAZ_ZOOMSH_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMSH_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST1) : "$(BINDIR)" $(YAZ_ZOOMTST1_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST1_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST2) : "$(BINDIR)" $(YAZ_ZOOMTST2_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST2_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST3) : "$(BINDIR)" $(YAZ_ZOOMTST3_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST3_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST4) : "$(BINDIR)" $(YAZ_ZOOMTST4_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST4_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST5) : "$(BINDIR)" $(YAZ_ZOOMTST5_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST5_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST6) : "$(BINDIR)" $(YAZ_ZOOMTST6_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST6_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST7) : "$(BINDIR)" $(YAZ_ZOOMTST7_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST7_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST8) : "$(BINDIR)" $(YAZ_ZOOMTST8_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST8_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST9) : "$(BINDIR)" $(YAZ_ZOOMTST9_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST9_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZOOMTST10) : "$(BINDIR)" $(YAZ_ZOOMTST10_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_ZOOMTST10_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(CQL2PQF) : "$(BINDIR)" $(YAZ_CQL2PQF_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_CQL2PQF_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(CQL2XCQL) : "$(BINDIR)" $(YAZ_CQL2XCQL_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_CQL2XCQL_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(ZTEST_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(YAZ_MARCDUMP) : "$(BINDIR)" $(YAZ_MARCDUMP_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(YAZ_MARCDUMP_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+
+$(TSTLOG) : "$(BINDIR)" $(TSTLOG_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(TSTLOG_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(TST_TIMING) : "$(BINDIR)" $(TST_TIMING_OBJS) $(YAZ_DLL)
+ $(LINK_PROGRAM) $(TST_TIMING_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+$(TEST_MUTEX) : "$(BINDIR)" $(TEST_MUTEX_OBJS) $(YAZ_COND_DLL)
+ $(LINK_PROGRAM) $(YAZ_COND_IMPLIB) $(TEST_MUTEX_OBJS) /out:$@
+ $(MT) -manifest $@.manifest -outputresource:$@;1
+
+# Other rules
+
+$(DOCDIR)\htmlhelp.chm: $(DOCDIR)\htmlhelp.hhp
+ @cd $(DOCDIR)
+ -$(HHC) htmlhelp.hhp
+ @cd $(WINDIR)
+
clean:
-del $(BINDIR)\*.exe
-del $(BINDIR)\*.dll
-del $(BINDIR)\*.pdb
-del $(TMPDIR)\*.
- -del $(LIBDIR)\*.MAP
-del $(LIBDIR)\*.LIB
-del $(OBJDIR)\*.OBJ
# the _H_ files work only on sets that have just one file.
# Z3950_H_FILES had to be spelled out. One more point for MS!
-########### check directories and create if needed
+# check directories and create if needed
dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR)
$(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR):
if not exist "$@/$(NUL)" mkdir "$@"
-###########################################################
-############### Explicit dependencies
-###########################################################
+# Explicit dependencies
# force recompilation of everything, if makefile changed