source: gsdl/trunk/src/z3950/win32.mak@ 15793

Last change on this file since 15793 was 15793, checked in by mdewsnip, 16 years ago

(Adding new DB support) First cut at adding sqlite stuff to the Windows makefiles. Likely to change a bit.

  • Property svn:executable set to *
File size: 3.9 KB
Line 
1###########################################################################
2#
3# win32 makefile -- src/z3950
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999-2008 The New Zealand Digital Library Project
9#
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27GSDL_DIR = ..\..
28INDEXERS_DIR = $(GSDL_DIR)\indexers
29PACKAGES_DIR = $(GSDL_DIR)\packages
30COLSERVR_DIR = $(GSDL_DIR)\src\colservr
31PROTOCOL_DIR = $(GSDL_DIR)\src\protocol
32
33
34GSDL_VC4 = 0
35DLL = 0
36DLLDEBUG = 0
37USE_SQLITE = 0
38
39
40!IF $(GSDL_VC4)
41CPPFLAGS = -GX
42!ELSE
43CPPFLAGS = -EHsc
44!ENDIF
45
46!IF $(DLL)
47CPPFLAGS = $(CPPFLAGS) -MD
48!ELSE
49!IF ($(DLLDEBUG))
50CPPFLAGS = $(CPPFLAGS) -MDd
51!ENDIF
52!ENDIF
53
54!IF $(USE_SQLITE)
55SQLITE_LIBS = "$(PACKAGES_DIR)\windows\sqlite\sqlite-amalgamation-3.5.9\sqlite3.lib"
56!ELSE
57SQLITE_LIBS =
58!ENDIF
59
60
61AR = lib
62CC = cl
63DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
64# Do NOT add the "recpt" directory here: the z39.50 code should be independent of the receptionist!
65INCLUDES = -I"$(GSDL_DIR)" -I"$(GSDL_DIR)\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" \
66 -I"$(INDEXERS_DIR)\mgpp\text" -I"$(PACKAGES_DIR)\yaz\yaz-2.1.4\include" \
67 -I"$(PACKAGES_DIR)\yaz\yaz-2.1.4\client" -I"$(PACKAGES_DIR)\d2m" \
68 -I"$(PACKAGES_DIR)\windows\gdbm\gdbm"
69LDFLAGS =
70LIBS = "$(PACKAGES_DIR)\windows\expat\expat\libexpat.lib" "$(PACKAGES_DIR)\windows\gdbm\gdbm\gdbm.lib" \
71 "$(PACKAGES_DIR)\d2m\libd2m.lib" "$(PACKAGES_DIR)\yaz\yaz-2.1.4\lib\yaz.lib" $(SQLITE_LIBS)
72
73!IF $(GSDL_VC4)
74DEFS=$(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
75INCLUDES = $(INCLUDES) -I"$(PACKAGES_DIR)\windows\stlport\stlport"
76!ENDIF
77
78
79COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
80LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
81
82
83.SUFFIXES:
84.SUFFIXES: .c .obj
85.c.obj:
86 $(COMPILE) $<
87
88.SUFFIXES: .cpp .obj
89.cpp.obj:
90 $(COMPILE) $<
91
92
93LIBRARY_SOURCES = \
94 yaz_zclient.c \
95 z3950proto.cpp \
96 z3950proxy.cpp \
97 zparse.tab.c \
98 zparse.yy.c
99
100LIBRARY_OBJECTS = \
101 yaz_zclient.obj \
102 z3950proto.obj \
103 z3950proxy.obj \
104 zparse.tab.obj \
105 zparse.yy.obj
106
107LIBRARY = gsdlz3950.lib
108
109
110SOURCES = \
111 z3950explain.cpp \
112 z3950parser.cpp \
113 z3950server.cpp \
114 z3950_to_gsdl.cpp
115
116OBJECTS = \
117 z3950explain.obj \
118 z3950parser.obj \
119 z3950server.obj \
120 z3950_to_gsdl.obj
121
122GSDL_LIBS = \
123 gsdlz3950.lib \
124 $(PROTOCOL_DIR)\gsdlprotocol.lib \
125 $(COLSERVR_DIR)\gsdlcolservr.lib \
126 $(INDEXERS_DIR)\mg/src/text/libmgtext.lib \
127 $(INDEXERS_DIR)\mg/lib/libmglib.lib \
128 $(INDEXERS_DIR)\mgpp/text/libmgpptext.lib \
129 $(INDEXERS_DIR)\mgpp/lib/libmgpplib.lib \
130 $(GSDL_DIR)\lib\gsdllib.lib
131
132EXECUTABLE_OBJECTS = \
133 $(OBJECTS) \
134 $(GSDL_LIBS)
135
136EXECUTABLE = z3950server.exe
137
138
139# Default target: make both gsdlz3950.lib and z3950server.exe
140all: $(LIBRARY) $(EXECUTABLE)
141
142gsdlz3950.lib: $(LIBRARY_OBJECTS)
143 if EXIST $(LIBRARY) del $(LIBRARY)
144 $(AR) -nologo /out:$(LIBRARY) $(LIBRARY_OBJECTS) $(PACKAGES_DIR)/yaz/yaz-2.1.4/win/obj/tabcomplete.obj
145
146z3950server.exe: $(EXECUTABLE_OBJECTS)
147 $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
148
149install: $(EXECUTABLE)
150 copy $(EXECUTABLE) "$(GSDL_DIR)\bin\windows"
151
152clean:
153 del *.obj
154 del $(LIBRARY)
155 del $(EXECUTABLE)
Note: See TracBrowser for help on using the repository browser.