-# makefile.mak - makefile for MS NMAKE
-# $Id: makefile,v 1.54 2003-02-18 09:11:50 adam Exp $
+# Copyright (C) 1994-2003, Index Data
+# All rights reserved.
+# $Id: makefile,v 1.55 2003-02-18 21:27:53 adam Exp $
#
# Programmed by
# HL: Heikki Levanto, Index Data
#
-# Log at the end of the file
-#
-# Missing
-# - Move MS-C's whatnots into win direcotry
-# - The TCL script produces C and H files in the same dir as the
-# ASN files. H's are copied to INCL, C's are left there.
-# They should be produced into OBJ...
-#
-# Envoronment problems
-# - You need to have the proper path and environment for VC set
-# up. There is a bat file VCVARS32.BAT that sets most of it up
-# for you. You can find this somewhere near DevStudio\VC\BIN
-# - RegSvr32 must also be along the path, often in WINDOWS\SYSTEM
-# - TCL has to be available too, if compiling for NEW_Z3950
-# - You may have to edit the path to tcl below
###########################################################
############### Parameters
# WIN32 binaries libxml2 & iconv from here:
# http://www.zlatkovic.com/projects/libxml/binaries.html
+# bison
+HAVE_BISON=1
+BISON=bison
+
default: all
-all: dirs generate dll client ztest zoomsh iconv libxml2
+all: dirs generate dll client ztest zoomsh cqlprog iconv libxml2
NSIS="c:\program files\nsis\makensis-bz2.exe"
ILLDIR=$(SRCDIR)\ill
CCLDIR=$(SRCDIR)\ccl
ZOOMDIR=$(SRCDIR)\zoom
+CQLDIR=$(SRCDIR)\cql
+
CLIENTDIR=$(SRCDIR)\CLIENT
SERVERDIR=$(SRCDIR)\SERVER
ZOOMTST7=$(BINDIR)\zoomtst7.exe
ZOOMTST8=$(BINDIR)\zoomtst8.exe
+CQL2PQF=$(BINDIR)\cql2pqf.exe
+CQL2XCQL=$(BINDIR)\cql2xcql.exe
+
# shortcut names defined here
dll : $(DLL)
client: $(CLIENT)
zoomsh: $(ZOOMSH) $(ZOOMTST1) $(ZOOMTST2) $(ZOOMTST3) \
$(ZOOMTST4) $(ZOOMTST5) $(ZOOMTST6) $(ZOOMTST7) $(ZOOMTST8)
+cqlprog: $(CQL2PQF) $(CQL2XCQL)
+
###########################################################
############### Compiler and linker options
###########################################################
ZOOMSH_LINK_OPTIONS = /subsystem:console
SERVER_LINK_OPTIONS = -lib
ZTEST_LINK_OPTIONS = /subsystem:console
+CQL2PQF_LINK_OPTIONS = /subsystem:console
+CQL2XCQL_LINK_OPTIONS = /subsystem:console
+
COMMON_TCL_OPTIONS= ..\util\yaz-comp -I$(INCLDIR) -i yaz
YAZ_ZOOMTST8_OBJS = \
$(OBJDIR)\zoomtst8.obj
+YAZ_CQL2PQF_OBJS = \
+ $(OBJDIR)\cql2pqf.obj
+YAZ_CQL2XCQL_OBJS = \
+ $(OBJDIR)\cql2xcql.obj
+
YAZ_SERVER_OBJS= \
"$(OBJDIR)\eventl.obj" \
"$(OBJDIR)\requestq.obj" \
$(OBJDIR)\zoom-c.obj \
$(OBJDIR)\zoom-opt.obj
+YAZ_CQL_OBJS = \
+ $(OBJDIR)\cql.obj \
+ $(OBJDIR)\cqlstdio.obj \
+ $(OBJDIR)\cqlstring.obj \
+ $(OBJDIR)\cqltransform.obj \
+ $(OBJDIR)\cqlutil.obj \
+ $(OBJDIR)\xcqlutil.obj
+
COMMON_YAZ_OBJS= \
$(YAZ_UTIL_OBJS) \
$(YAZ_ODR_OBJS) \
$(YAZ_ZUTIL_OBJS) \
$(YAZ_CCL_OBJS) \
$(YAZ_SERVER_OBJS) \
- $(YAZ_ZOOM_OBJS)
+ $(YAZ_ZOOM_OBJS) \
+ $(YAZ_CQL_OBJS)
YAZ_OBJS= \
$(Z3950_OBJS) \
{$(ZOOMDIR)}.c{$(OBJDIR)}.obj:
$(CPP) $(COPT) $<
+{$(CQLDIR)}.c{$(OBJDIR)}.obj:
+ $(CPP) $(COPT) $<
+
############### ASN-generated files
!if $(HAVE_TCL)
!endif
+!if $(HAVE_BISON)
+$(CQLDIR)\cql.c: $(CQLDIR)\cql.y
+ @cd $(CQLDIR)
+ $(BISON) -y -p cql_ -o cql.c cql.y
+
+!endif
###########################################################
############### Resources
/out:$(ZOOMTST8)
<<
+$(CQL2PQF) : "$(BINDIR)" $(YAZ_CQL2PQF_OBJS)
+ @echo Linking $(CQL2PQF)
+ $(LINK) @<<
+ $(LNKOPT)
+ $(CQL2PQF_LINK_OPTIONS)
+ $(LINK_LIBS)
+ $(IMPLIB)
+ $(YAZ_CQL2PQF_OBJS)
+ /pdb:"$(LIBDIR)\cql2pqf.pdb"
+ /map:"$(LIBDIR)\cql2pqf.map"
+ /out:$(CQL2PQF)
+<<
+
+$(CQL2XCQL) : "$(BINDIR)" $(YAZ_CQL2XCQL_OBJS)
+ @echo Linking $(CQL2XCQL)
+ $(LINK) @<<
+ $(LNKOPT)
+ $(CQL2XCQL_LINK_OPTIONS)
+ $(LINK_LIBS)
+ $(IMPLIB)
+ $(YAZ_CQL2XCQL_OBJS)
+ /pdb:"$(LIBDIR)\cql2xcql.pdb"
+ /map:"$(LIBDIR)\cql2xcql.map"
+ /out:$(CQL2XCQL)
+<<
+
$(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(DLL)
@echo Linking the ztest $(ZTEST)
$(LINK) @<<
/out:$(ZTEST)
<<
-
# note that this links a lib, so it uses completely different options.
###########################################################
-del $(BINDIR)\*.exe
-del $(BINDIR)\*.dll
-del $(TMPDIR)\*.
-
-del $(LIBDIR)\*.MAP
-
-del $(LIBDIR)\*.LIB
-del $(OBJDIR)\*.OBJ
realclean: clean
+ -del $(CQLDIR)\cql.c
-del $(Z3950_C_DIR)\z*.c
-del $(INCLDIR)\yaz\z-accdes1.h
-del $(INCLDIR)\yaz\z-core.h
###########################################################
#
# $Log: makefile,v $
-# Revision 1.54 2003-02-18 09:11:50 adam
+# Revision 1.55 2003-02-18 21:27:53 adam
+# CQL w/bison on WIN32
+#
+# Revision 1.54 2003/02/18 09:11:50 adam
# Prepare for external utilties: iconv, libxml2 on WIN32
#
# Revision 1.53 2003/02/17 22:34:39 adam