yazd.{dll,lib} instead of yazdebug.{dll,lib}.
[yaz-moved-to-github.git] / win / makefile
index 071fb54..397c4bf 100644 (file)
@@ -1,10 +1,9 @@
 # Copyright (C) 1994-2004, Index Data
 # All rights reserved.
-# $Id: makefile,v 1.74 2004-03-17 18:47:42 adam Exp $
+# $Id: makefile,v 1.85 2004-08-19 07:48:00 adam Exp $
 #
 # Programmed by
 #  HL: Heikki Levanto, Index Data
-#
 
 ###########################################################
 ############### Parameters 
@@ -19,13 +18,16 @@ HAVE_TCL=1
 
 # iconv charcter conversion utility
 HAVE_ICONV=1
-ICONV_DIR = c:\iconv-1.8.win32
+ICONV_DIR = c:\iconv-1.9.1.win32
 
 # libxml2
 HAVE_LIBXML2=1
-LIBXML2_DIR=c:\libxml2-2.5.10.win32
+LIBXML2_DIR=c:\libxml2-2.6.9.win32
+
+# zlib compression (used by libxml2)
+ZLIB_DIR = c:\zlib-1.1.4.win32
 
-# WIN32 binaries libxml2 & iconv from here:
+# get WIN32 binaries libxml2 & iconv & zlib from here:
 #  http://www.zlatkovic.com/projects/libxml/binaries.html
 
 # bison
@@ -36,9 +38,15 @@ default: all
 
 all: dirs generate dll client ztest zoomsh utilprog iconv libxml2
 
-NSIS="c:\program files\nsis\makensis-bz2.exe"
+NSIS="c:\program files\nsis\makensis.exe"
+
+dist: 
+       nmake DEBUG=1 clean
+       nmake DEBUG=0 clean
+       nmake DEBUG=0
+       $(NSIS) yaz.nsi
 
-nsis: all
+nsis:
        $(NSIS) yaz.nsi
 
 nsishelp:
@@ -57,9 +65,15 @@ INCLDIR=$(ROOTDIR)\include  # our includes
 LIBDIR=$(ROOTDIR)\lib       # We produce .lib, .exp etc there
 BINDIR=$(ROOTDIR)\bin       # We produce exes and dlls there
 WINDIR=$(ROOTDIR)\win       # all these Win make things
-OBJDIR=$(WINDIR)\obj        # where we store intermediate files
 SRCDIR=$(ROOTDIR)\src       # for the case we move them under src
 
+# where we store intermediate files
+!if $(DEBUG)
+OBJDIR=$(WINDIR)\dobj
+!else
+OBJDIR=$(WINDIR)\obj
+!endif
+
 CLIENTDIR=$(ROOTDIR)\CLIENT
 ZTESTDIR=$(ROOTDIR)\ZTEST
 ZOOMDIR=$(ROOTDIR)\ZOOM
@@ -72,8 +86,13 @@ TMP=$(TMPDIR)
 ############### Targets - what to make
 ###########################################################
 
+!if $(DEBUG)
+DLL=$(BINDIR)\yazd.dll
+IMPLIB=$(LIBDIR)\yazd.lib
+!else
 DLL=$(BINDIR)\yaz.dll
 IMPLIB=$(LIBDIR)\yaz.lib
+!endif
 
 CLIENT=$(BINDIR)\yaz-client.exe
 ZOOMSH=$(BINDIR)\zoomsh.exe
@@ -93,9 +112,9 @@ CQL2XCQL=$(BINDIR)\cql2xcql.exe
 YAZ_MARCDUMP=$(BINDIR)\yaz-marcdump.exe
 
 # shortcut names defined here
-dll : $(DLL) 
-client: $(CLIENT)
-ztest: $(ZTEST)
+dll: dirs generate $(DLL) 
+client: dirs generate $(CLIENT)
+ztest: dirs generate $(ZTEST)
 
 zoomsh: $(ZOOMSH) $(ZOOMTST1) $(ZOOMTST2) $(ZOOMTST3) \
  $(ZOOMTST4) $(ZOOMTST5) $(ZOOMTST6) $(ZOOMTST7) $(ZOOMTST8)
@@ -127,10 +146,14 @@ iconv:
 !if $(HAVE_LIBXML2)
 LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib"
 LIBXML2_DEF=/D HAVE_XML2=1 /I"$(LIBXML2_DIR)\include"
-libxml2: $(BINDIR)\libxml2.dll
+libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib.dll
 
 $(BINDIR)\libxml2.dll:
   copy "$(LIBXML2_DIR)\lib\libxml2.dll" $(BINDIR)
+
+$(BINDIR)\zlib.dll:
+  copy "$(ZLIB_DIR)\lib\zlib.dll" $(BINDIR)
+
 !else
 LIBXML2_LIB=
 LIBXML2_DEF=/D HAVE_XML2=0
@@ -613,9 +636,9 @@ $(ITEM_REQ_FILES): $(SRCDIR)\item-req.asn
        $(TCL) $(TCLOPT) -d ill.tcl item-req.asn
        @cd $(WINDIR)
 
-$(SRCDIR)\marc8.c: $(SRCDIR)\charconv.sgm $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl
+$(SRCDIR)\marc8.c: $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl
        @cd $(SRCDIR)
-       $(TCL) charconv.tcl -O 1 -p marc8 charconv.sgm codetables.xml -o marc8.c
+       $(TCL) charconv.tcl -p marc8 codetables.xml -o marc8.c
 
 !endif
 
@@ -661,7 +684,7 @@ $(DLL) $(IMPLIB): "$(BINDIR)" $(DLL_OBJS) $(YAZ_RES)
                $(DLL_OBJS)
                $(YAZ_RES)
                /out:$(DLL) 
-               /implib:"$(LIBDIR)\yaz.lib"
+               /implib:"$(IMPLIB)"
                /map:"$(LIBDIR)\yaz.map"  
 <<
 
@@ -848,6 +871,7 @@ $(YAZ_MARCDUMP) : "$(BINDIR)" $(YAZ_MARCDUMP_OBJS) $(DLL)
 clean:
        -del $(BINDIR)\*.exe
        -del $(BINDIR)\*.dll
+       -del $(BINDIR)\*.pdb
        -del $(TMPDIR)\*.
        -del $(LIBDIR)\*.MAP
        -del $(LIBDIR)\*.LIB