-# Copyright (C) 1993-2006, Index Data ApS
+# Copyright (C) 1998-2008 Index Data
# All rights reserved.
-# $Id: makefile,v 1.7 2006-04-30 13:20:47 adam Exp $
###########################################################
############### Parameters
# iconv charcter conversion utility
HAVE_ICONV=1
-ICONV_DIR = c:\iconv-1.9.1.win32
+ICONV_DIR=\iconv-1.9.2.win32
# libxslt
HAVE_LIBXSLT=1
-LIBXSLT_DIR=c:\libxslt-1.1.14.win32
+LIBXSLT_DIR=\libxslt-1.1.24.win32
# libxml2 (used by libxslt)
HAVE_LIBXML2=1
-LIBXML2_DIR=c:\libxml2-2.6.20.win32
+LIBXML2_DIR=\libxml2-2.7.1.win32
# zlib compression (used by libxml2)
-ZLIB_DIR = c:\zlib-1.2.3.win32
+ZLIB_DIR=\zlib-1.2.3.win32
# get WIN32 binaries for libxslt, libxml, iconv, zlib from here:
# http://www.zlatkovic.com/libxml.en.html
nsishelp:
$(NSIS)
-###########################################################
-############### Directories
-###########################################################
# The current directory is supposed to be something like
# ..../yaz/win, everything is relative to that
ROOTDIR=.. # The home of yaz++
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
PROXYDIR=$(ROOTDIR)\proxy
ZOOMDIR=$(ROOTDIR)\zoom
+!if $(DEBUG)
+OBJDIR=$(WINDIR)\dobj # where we store intermediate files
+!else
+OBJDIR=$(WINDIR)\obj # where we store intermediate files
+!endif
+
TMPDIR=$(ROOTDIR)\win\tmp
TMP=$(TMPDIR)
-###########################################################
-############### Targets - what to make
-###########################################################
-
-YAZPROXY_DLL=$(BINDIR)\yazproxy.dll
-YAZPROXY_IMPLIB=$(LIBDIR)\yazproxy.lib
+YAZPROXY_DLL=$(BINDIR)\yazproxy2.dll
+YAZPROXY_IMPLIB=$(LIBDIR)\yazproxy2.lib
YAZPROXY=$(BINDIR)\yazproxy.exe
# shortcut names defined here
dll: $(YAZPROXY_DLL)
proxy: $(YAZPROXY)
-###########################################################
-############### Compiler and linker options
-###########################################################
!if $(DEBUG)
-YAZD=yazd
-YAZPPD=yazpp_1_d
+YAZD=yaz3d
+YAZPPD=yazpp3d
!else
-YAZD=yaz
-YAZPPD=yazpp_1
+YAZD=yaz3
+YAZPPD=yazpp3
!endif
# YAZ includes & libs
YAZ_LIB="$(YAZ_DIR)\lib\$(YAZD).lib"
-YAZ_DEF=/DYAZ_USE_NEW_LOG=1 /I"$(YAZ_DIR)\include"
+YAZ_DEF=/DYAZ_HAVE_XML2=1 /DYAZ_USE_NEW_LOG=1 /I"$(YAZ_DIR)\include"
# Copy yaz.dll to our bin
yaz: $(BINDIR)\$(YAZD).dll
-$(BINDIR)\$(YAZD).dll: $(YAZ_DIR)\bin\$(YAZD).dll
+$(BINDIR)\$(YAZD).dll: "$(YAZ_DIR)\bin\$(YAZD).dll"
copy "$(YAZ_DIR)\bin\$(YAZD).dll" $(BINDIR)
# YAZ++ includes & libs
# Copy yazpp.dll to our bin
yazpp: $(BINDIR)\$(YAZPPD).dll
-$(BINDIR)\$(YAZPPD).dll: $(YAZPP_DIR)\bin\$(YAZPPD).dll
+$(BINDIR)\$(YAZPPD).dll: "$(YAZPP_DIR)\bin\$(YAZPPD).dll"
copy "$(YAZPP_DIR)\bin\$(YAZPPD).dll" $(BINDIR)
!if $(HAVE_ICONV)
!if $(HAVE_LIBXSLT)
LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
-LIBXSLT_DEF=/D HAVE_XSLT=1 /I"$(LIBXSLT_DIR)\include"
+LIBXSLT_DEF=/D YAZ_HAVE_XSLT=1 /I"$(LIBXSLT_DIR)\include"
libxslt: $(BINDIR)\libxslt.dll $(BINDIR)\zlib1.dll
$(BINDIR)\libxslt.dll:
!else
LIBXSLT_LIB=
-LIBXSLT_DEF=/D HAVE_XSLT=0
+LIBXSLT_DEF=/D YAZ_HAVE_XSLT=0
libxslt:
!endif
### Linker options
LINK=link.exe
-LINK_LIBS= kernel32.lib user32.lib gdi32.lib \
- advapi32.lib uuid.lib \
- wsock32.lib advapi32.lib \
+LINK_LIBS=kernel32.lib advapi32.lib ws2_32.lib \
$(YAZ_LIB) $(YAZPP_LIB) $(ICONV_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB)
-COMMON_LNK_OPTIONS= /nologo \
- /subsystem:windows \
- /machine:i386 \
- /incremental:no
+COMMON_LNK_OPTIONS=\
+ /nologo \
+ /subsystem:windows \
+ /machine:i386 \
+ /incremental:no
DEBUG_LNK_OPTIONS= /debug
TCLOPT= $(COMMON_TCL_OPTIONS)
!endif
-###########################################################
-############### Source and object modules
-###########################################################
+# Source and object modules
YAZPROXY_OBJS= \
"$(OBJDIR)\yaz-proxy-main.obj"
DEBUG_RC_OPTIONS=/d "_DEBUG"
RELEASE_RC_OPTIONS=/d "NDEBUG"
-YAZ_RES=$(OBJDIR)\yaz.res
-YAZ_RC=$(WINDIR)\yaz.rc
-
!if $(DEBUG)
RSOPT=/d_DEBUG
!else
RSOPT=/d_NDEBUG
!endif
-$(YAZ_RES): $(YAZ_RC)
- $(RSC) $(RSOPT) /fo"$(YAZ_RES)" $(YAZ_RC)
-
###########################################################
############### Linking
###########################################################
$(YAZPROXY_OBJS) \
/out:$(YAZPROXY)
-###########################################################
-############### Generated Source files
-###########################################################
-
-############## clean
clean:
-del $(BINDIR)\*.exe
-del $(BINDIR)\*.dll
-del $(TMPDIR)\*.
- -del $(LIBDIR)\*.MAP
-del $(LIBDIR)\*.LIB
-del $(OBJDIR)\*.OBJ
realclean: clean
-# Because DOS del will only accept one file name to delete,
-# 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
dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR)