projects
/
yazpp-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
DEBUG=0
[yazpp-moved-to-github.git]
/
win
/
makefile
diff --git
a/win/makefile
b/win/makefile
index
b5ee8aa
..
0697bfe
100644
(file)
--- a/
win/makefile
+++ b/
win/makefile
@@
-1,19
+1,17
@@
-# Copyright (C) 1993-2004, Index Data ApS
+# Copyright (C) 1999-2006, Index Data ApS
# All rights reserved.
# All rights reserved.
-# $Id: makefile,v 1.4 2004-04-11 17:49:36 adam Exp $
+# $Id: makefile,v 1.17 2006-04-30 14:14:59 adam Exp $
-###########################################################
-############### Parameters
-###########################################################
+# Parameters
DEBUG=0 # 0 for release, 1 for debug
# YAZ
DEBUG=0 # 0 for release, 1 for debug
# YAZ
-YAZ_DIR=c:\yaz
+YAZ_DIR=..\..\yaz
default: all
default: all
-all: dirs generated dll zclient yaz
+all: dirs generated dll myclient zclient yaz
NSIS="c:\program files\nsis\makensis-bz2.exe"
NSIS="c:\program files\nsis\makensis-bz2.exe"
@@
-23,54
+21,60
@@
nsis: all
nsishelp:
$(NSIS)
nsishelp:
$(NSIS)
-###########################################################
-############### Directories
-###########################################################
+# Directories
# The current directory is supposed to be something like
# ..../yaz/win, everything is relative to that
# The current directory is supposed to be something like
# ..../yaz/win, everything is relative to that
-ROOTDIR=.. # The home of yaz++
+ROOTDIR=.. # The home of yazpp
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
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
SRCDIR=$(ROOTDIR)\src # for the case we move them under src
-PROXYDIR=$(ROOTDIR)\proxy
ZOOMDIR=$(ROOTDIR)\zoom
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)
TMPDIR=$(ROOTDIR)\win\tmp
TMP=$(TMPDIR)
-###########################################################
-############### Targets - what to make
-###########################################################
+# Targets - what to make
+
+!if $(DEBUG)
+YAZPP_DLL=$(BINDIR)\yazpp_1_d.dll
+YAZPP_IMPLIB=$(LIBDIR)\yazpp_1_d.lib
+YAZD=yazd
+!else
+YAZPP_DLL=$(BINDIR)\yazpp_1.dll
+YAZPP_IMPLIB=$(LIBDIR)\yazpp_1.lib
+YAZD=yaz
+!endif
-YAZPP_DLL=$(BINDIR)\yazpp.dll
-YAZPP_IMPLIB=$(LIBDIR)\yazpp.lib
ZCLIENT=$(BINDIR)\zclient.exe
ZCLIENT=$(BINDIR)\zclient.exe
+MY_CLIENT=$(BINDIR)\yaz-my-client.exe
# shortcut names defined here
dll: $(YAZPP_DLL)
zclient: $(ZCLIENT)
# shortcut names defined here
dll: $(YAZPP_DLL)
zclient: $(ZCLIENT)
+myclient: $(MY_CLIENT)
-###########################################################
-############### Compiler and linker options
-###########################################################
+# Compiler and linker options
-YAZ_LIB="$(YAZ_DIR)\lib\yaz.lib"
+# YAZ includes & libs
+YAZ_LIB="$(YAZ_DIR)\lib\$(YAZD).lib"
YAZ_DEF=/I"$(YAZ_DIR)\include"
YAZ_DEF=/I"$(YAZ_DIR)\include"
-yaz: $(BINDIR)\yaz.dll $(BINDIR)\yaz.dll
+yaz: $(BINDIR)\$(YAZD).dll $(BINDIR)\$(YAZD).dll
-$(BINDIR)\yaz.dll: $(YAZ_DIR)\bin\yaz.dll
- copy "$(YAZ_DIR)\bin\yaz.dll" $(BINDIR)
-
-### C and CPP compiler (the same thing)
-# Note: $(CPP) has already been defined in the environment
-# (if you set things up right!)
+$(BINDIR)\$(YAZD).dll: $(YAZ_DIR)\bin\$(YAZD).dll
+ copy "$(YAZ_DIR)\bin\$(YAZD).dll" $(BINDIR)
COMMON_C_OPTIONS= \
COMMON_C_OPTIONS= \
- /nologo /W3 /GX /FD /c \
+ /nologo /W3 /EHsc /FD /c \
+ /D "_CRT_SECURE_NO_DEPRECATE" \
$(YAZ_DEF) \
/D "_WINDOWS" \
/D "WIN32" \
$(YAZ_DEF) \
/D "_WINDOWS" \
/D "WIN32" \
@@
-84,7
+88,7
@@
COMMON_C_INCLUDES= \
DEBUG_C_OPTIONS= \
/D "_DEBUG" \
DEBUG_C_OPTIONS= \
/D "_DEBUG" \
- /MDd /Od /YX /Zi /Gm
+ /MDd /Od /Zi /Gm
RELEASE_C_OPTIONS= \
/D "NDEBUG" \
RELEASE_C_OPTIONS= \
/D "NDEBUG" \
@@
-101,7
+105,6
@@
RELEASE_C_OPTIONS= \
# /MDd = Runtime library: Multithread DLL (debug)
# /Od = Disable optimising (debug)
# /O2 = Optimize for speed
# /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
# /Gm = Minimal rebuild (some cpp class stuff)
# /Zi = Program database for debuggers
# /ZI = Pgm database with special "edit&continue" stuff - not available in C5
@@
-110,15
+113,11
@@
RELEASE_C_OPTIONS= \
### Linker options
LINK=link.exe
### Linker options
LINK=link.exe
-LINK_LIBS= kernel32.lib user32.lib gdi32.lib \
- advapi32.lib uuid.lib \
+LINK_LIBS= kernel32.lib user32.lib gdi32.lib advapi32.lib uuid.lib \
wsock32.lib advapi32.lib \
wsock32.lib advapi32.lib \
- $(YAZ_LIB) $(ICONV_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB)
+ $(YAZ_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
DEBUG_LNK_OPTIONS= /debug
@@
-130,24
+129,24
@@
CLIENT_LINK_OPTIONS = /subsystem:console
# Final opt variables
!if $(DEBUG)
COPT= $(COMMON_C_OPTIONS) $(DEBUG_C_OPTIONS) $(COMMON_C_INCLUDES)
# 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)
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)
!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)
RCOPT= $(COMMON_RC_OPTIONS) $(RELEASE_RC_OPTIONS)
LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS)
-TCLOPT= $(COMMON_TCL_OPTIONS)
!endif
!endif
-###########################################################
-############### Source and object modules
-###########################################################
+# Source and object modules
YAZPP_DLL_OBJS = \
YAZPP_DLL_OBJS = \
+ "$(OBJDIR)\gdu.obj" \
+ "$(OBJDIR)\gduqueue.obj" \
+ "$(OBJDIR)\pdu-observer.obj" \
+ "$(OBJDIR)\query.obj" \
+ "$(OBJDIR)\socket-observer.obj" \
+ "$(OBJDIR)\z-server.obj" \
"$(OBJDIR)\yaz-socket-manager.obj" \
"$(OBJDIR)\yaz-pdu-assoc.obj" \
"$(OBJDIR)\yaz-z-assoc.obj" \
"$(OBJDIR)\yaz-socket-manager.obj" \
"$(OBJDIR)\yaz-pdu-assoc.obj" \
"$(OBJDIR)\yaz-z-assoc.obj" \
@@
-167,13
+166,12
@@
YAZPP_DLL_OBJS = \
"$(OBJDIR)\zrs.obj" \
"$(OBJDIR)\zrec.obj"
"$(OBJDIR)\zrs.obj" \
"$(OBJDIR)\zrec.obj"
+MY_CLIENT_OBJS = \
+ "$(OBJDIR)\yaz-my-client.obj"
+
ZCLIENT_OBJS = \
"$(OBJDIR)\zclient.obj"
ZCLIENT_OBJS = \
"$(OBJDIR)\zclient.obj"
-###########################################################
-############### Compiling
-###########################################################
-
# Note: This defines where to look for the necessary
# source files. Funny way of doing it, but it works.
# Note: This defines where to look for the necessary
# source files. Funny way of doing it, but it works.
@@
-183,83
+181,60
@@
ZCLIENT_OBJS = \
{$(ZOOMDIR)}.cpp{$(OBJDIR)}.obj:
$(CPP) $(COPT) $<
{$(ZOOMDIR)}.cpp{$(OBJDIR)}.obj:
$(CPP) $(COPT) $<
-###########################################################
-############### 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"
### 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
-
!if $(DEBUG)
RSOPT=/d_DEBUG
!else
RSOPT=/d_NDEBUG
!endif
!if $(DEBUG)
RSOPT=/d_DEBUG
!else
RSOPT=/d_NDEBUG
!endif
-$(YAZ_RES): $(YAZ_RC)
- $(RSC) $(RSOPT) /fo"$(YAZ_RES)" $(YAZ_RC)
-
-###########################################################
-############### Linking
-###########################################################
-
$(YAZPP_DLL) $(YAZPP_IMPLIB): "$(BINDIR)" $(YAZPP_DLL_OBJS)
$(YAZPP_DLL) $(YAZPP_IMPLIB): "$(BINDIR)" $(YAZPP_DLL_OBJS)
- @echo Linking $(YAZPP_DLL)
- $(LINK) @<<
- $(LNKOPT)
- $(LINK_LIBS)
- $(DLL_LINK_OPTIONS)
- $(YAZPP_DLL_OBJS)
- /out:"$(YAZPP_DLL)"
- /implib:"$(YAZPP_IMPLIB)"
- /map:"$(LIBDIR)\yazpp.map"
-<<
+ $(LINK) \
+ $(LNKOPT) \
+ $(LINK_LIBS) \
+ $(DLL_LINK_OPTIONS) \
+ $(YAZPP_DLL_OBJS) \
+ /out:"$(YAZPP_DLL)" \
+ /implib:"$(YAZPP_IMPLIB)"
+
+$(MY_CLIENT) : "$(BINDIR)" $(MY_CLIENT_OBJS) $(YAZPP_IMPLIB)
+ $(LINK) \
+ $(LNKOPT) \
+ $(CLIENT_LINK_OPTIONS) \
+ $(LINK_LIBS) \
+ $(YAZPP_IMPLIB) \
+ $(MY_CLIENT_OBJS) \
+ /out:$(MY_CLIENT)
$(ZCLIENT) : "$(BINDIR)" $(ZCLIENT_OBJS) $(YAZPP_IMPLIB)
$(ZCLIENT) : "$(BINDIR)" $(ZCLIENT_OBJS) $(YAZPP_IMPLIB)
- @echo Linking $(ZCLIENT)
- $(LINK) @<<
- $(LNKOPT)
- $(CLIENT_LINK_OPTIONS)
- $(LINK_LIBS)
- $(YAZPP_IMPLIB)
- $(ZCLIENT_OBJS)
- /map:"$(LIBDIR)\zclient.map"
+ $(LINK) \
+ $(LNKOPT) \
+ $(CLIENT_LINK_OPTIONS) \
+ $(LINK_LIBS) \
+ $(YAZPP_IMPLIB) \
+ $(ZCLIENT_OBJS) \
/out:$(ZCLIENT)
/out:$(ZCLIENT)
-<<
-
-
-###########################################################
-############### Generated SOurce files
-###########################################################
generated: $(ZOOMDIR)\zoom.h
"$(ZOOMDIR)\zoom.h": "$(ZOOMDIR)\master-header"
sed "s/^* / /; s/^*/ /" "$(ZOOMDIR)\master-header" >"$(ZOOMDIR)\zoom.h"
generated: $(ZOOMDIR)\zoom.h
"$(ZOOMDIR)\zoom.h": "$(ZOOMDIR)\master-header"
sed "s/^* / /; s/^*/ /" "$(ZOOMDIR)\master-header" >"$(ZOOMDIR)\zoom.h"
-############## clean
clean:
-del $(BINDIR)\*.exe
-del $(BINDIR)\*.dll
-del $(TMPDIR)\*.
clean:
-del $(BINDIR)\*.exe
-del $(BINDIR)\*.dll
-del $(TMPDIR)\*.
- -del $(LIBDIR)\*.MAP
-del $(LIBDIR)\*.LIB
-del $(OBJDIR)\*.OBJ
realclean: clean
-del $(ZOOMDIR)\zoom.h
-del $(LIBDIR)\*.LIB
-del $(OBJDIR)\*.OBJ
realclean: clean
-del $(ZOOMDIR)\zoom.h
-# 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)
$(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR):
dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR)
$(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR):