Define HAVE_XSLTSAVERESULTTOSTRING for Windows
[yaz-moved-to-github.git] / win / makefile
index 958914f..30e4c2b 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright (C) 1994-2005, Index Data ApS
+# Copyright (C) 1994-2006, Index Data ApS
 # All rights reserved.
-# $Id: makefile,v 1.100 2006-02-09 12:36:18 adam Exp $
+# $Id: makefile,v 1.109 2006-05-26 15:46:44 adam Exp $
 #
 # Programmed by
 #  Heikki Levanto & Adam Dickmeiss
@@ -20,6 +20,10 @@ HAVE_TCL=1
 HAVE_ICONV=1
 ICONV_DIR = c:\iconv-1.9.1.win32
 
+# libxslt
+HAVE_LIBXSLT=1
+LIBXSLT_DIR=c:\libxslt-1.1.14.win32
+
 # libxml2
 HAVE_LIBXML2=1
 LIBXML2_DIR=c:\libxml2-2.6.20.win32
@@ -36,7 +40,7 @@ BISON=bison
 
 default: all
 
-all: dirs generate dll client ztest zoomsh utilprog testprog iconv libxml2
+all: dirs generate dll client ztest zoomsh utilprog testprog iconv libxml2 libxslt
 
 NSIS="c:\program files\nsis\makensis.exe"
 HHC="c:\program files\html help workshop\hhc.exe"
@@ -44,6 +48,7 @@ HHC="c:\program files\html help workshop\hhc.exe"
 dist: 
        nmake DEBUG=1 clean
        nmake DEBUG=0 clean
+       nmake DEBUG=1
        nmake DEBUG=0
        $(NSIS) yaz.nsi
 
@@ -173,6 +178,23 @@ libxml2:
 
 !endif
 
+!if $(HAVE_LIBXSLT)
+LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
+LIBXSLT_DEF= \
+       /D HAVE_XSLTSAVERESULTTOSTRING=1 \
+       /D 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 HAVE_XSLT=0
+libxslt: 
+!endif
+
 
 ### C and CPP compiler  (the same thing)
 # Note: $(CPP) has already been defined in the environment
@@ -182,6 +204,7 @@ COMMON_C_OPTIONS=          \
   /nologo /W3 /EHsc /FD /c   \
   $(ICONV_DEF)             \
   $(LIBXML2_DEF)           \
+  $(LIBXSLT_DEF)           \
   /D "_CRT_SECURE_NO_DEPRECATE" \
   /D "_WINDOWS"            \
   /D "WIN32"               \
@@ -194,7 +217,7 @@ COMMON_C_INCLUDES= \
 
 DEBUG_C_OPTIONS=  \
   /D "_DEBUG"      \
-  /MDd  /Od /YX /Zi /Gm
+  /MDd  /Od /Zi /Gm
 
 RELEASE_C_OPTIONS=  \
   /D "NDEBUG"        \
@@ -211,7 +234,6 @@ RELEASE_C_OPTIONS=  \
 # /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
@@ -221,9 +243,8 @@ RELEASE_C_OPTIONS=  \
 LINK=link.exe
 
 LINK_LIBS= kernel32.lib user32.lib   gdi32.lib   \
-           advapi32.lib uuid.lib \
-           wsock32.lib  advapi32.lib \
-           $(ICONV_LIB) $(LIBXML2_LIB)
+           advapi32.lib uuid.lib wsock32.lib  advapi32.lib \
+           $(ICONV_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB)
 
 COMMON_LNK_OPTIONS= /nologo \
                     /subsystem:windows \
@@ -374,6 +395,10 @@ YAZ_UTIL_OBJS= \
    $(OBJDIR)\matchstr.obj \
    $(OBJDIR)\siconv.obj \
    $(OBJDIR)\marc8.obj \
+   $(OBJDIR)\marc8r.obj \
+   $(OBJDIR)\record_conv.obj \
+   $(OBJDIR)\retrieval.obj \
+   $(OBJDIR)\libxml2_error.obj \
    $(OBJDIR)\test.obj
 
 YAZ_ZUTIL_OBJS= \
@@ -398,7 +423,8 @@ YAZ_ZUTIL_OBJS= \
    $(OBJDIR)\zoom-c.obj \
    $(OBJDIR)\zoom-opt.obj \
    $(OBJDIR)\initopt.obj \
-   $(OBJDIR)\xmlquery.obj
+   $(OBJDIR)\xmlquery.obj \
+   $(OBJDIR)\mime.obj
 
 Z3950_OBJS= \
    $(OBJDIR)\z-date.obj\
@@ -665,13 +691,17 @@ $(SRCDIR)\marc8.c: $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl
        @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)\diagbib1.c: $(SRCDIR)\bib1.csv
        @cd $(SRCDIR)
-       $(TCL) csvtobib1.tcl
+       $(TCL) csvtobib1.tcl $(SRCDIR)
 
 $(SRCDIR)\diagsrw.c: $(SRCDIR)\srw.csv
        @cd $(SRCDIR)
-       $(TCL) csvtosrw.tcl
+       $(TCL) csvtosrw.tcl $(SRCDIR)
 
 !endif