root/gsdl/trunk/src/z3950/win32.mak @ 15580

Revision 15580, 3.8 KB (checked in by mdewsnip, 12 years ago)

Hopefully the last of the makefile tidy ups.

  • Property svn:executable set to *
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
37STLPATH = "$(PACKAGES_DIR)\windows\stlport\stlport"
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
55AR = lib
56CC = cl
57DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -DXML_STATIC -D_CRT_SECURE_NO_DEPRECATE
58# Do NOT add the "recpt" directory here: the z39.50 code should be independent of the receptionist!
59INCLUDES = -I"$(GSDL_DIR)" -I"$(GSDL_DIR)\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" \
60    -I"$(INDEXERS_DIR)\mgpp\text" -I"$(PACKAGES_DIR)\yaz\yaz-2.1.4\include" \
61    -I"$(PACKAGES_DIR)\yaz\yaz-2.1.4\client" -I"$(PACKAGES_DIR)\d2m" \
62    -I"$(PACKAGES_DIR)\windows\gdbm\gdbm"
63LDFLAGS =
64LIBS = "$(PACKAGES_DIR)\windows\expat\expat\libexpat.lib" "$(PACKAGES_DIR)\windows\gdbm\gdbm\gdbm.lib" \
65        "$(PACKAGES_DIR)\d2m\libd2m.lib" "$(PACKAGES_DIR)\yaz\yaz-2.1.4\lib\yaz.lib"
66
67!IF $(GSDL_VC4)
68DEFS=$(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
69INCLUDES = $(INCLUDES) -I$(STLPATH)
70!ENDIF
71
72
73COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
74LINK = $(CC) -nologo -Fe"$@" $(LDFLAGS)
75
76
77.SUFFIXES:
78.SUFFIXES: .c .obj
79.c.obj:
80    $(COMPILE) $<
81
82.SUFFIXES: .cpp .obj
83.cpp.obj:
84    $(COMPILE) $<
85
86
87LIBRARY_SOURCES = \
88    yaz_zclient.c \
89    z3950proto.cpp \
90    z3950proxy.cpp \
91    zparse.tab.c \
92    zparse.yy.c
93
94LIBRARY_OBJECTS = \
95    yaz_zclient.obj \
96    z3950proto.obj \
97    z3950proxy.obj \
98    zparse.tab.obj \
99    zparse.yy.obj
100
101LIBRARY = gsdlz3950.lib
102
103
104SOURCES = \
105    z3950explain.cpp \
106    z3950parser.cpp \
107    z3950server.cpp \
108    z3950_to_gsdl.cpp
109
110OBJECTS = \
111    z3950explain.obj \
112    z3950parser.obj \
113    z3950server.obj \
114    z3950_to_gsdl.obj
115
116GSDL_LIBS = \
117    gsdlz3950.lib \
118    $(PROTOCOL_DIR)\gsdlprotocol.lib \
119    $(COLSERVR_DIR)\gsdlcolservr.lib \
120    $(INDEXERS_DIR)\mg/src/text/libmgtext.lib \
121    $(INDEXERS_DIR)\mg/lib/libmglib.lib \
122    $(INDEXERS_DIR)\mgpp/text/libmgpptext.lib \
123    $(INDEXERS_DIR)\mgpp/lib/libmgpplib.lib \
124    $(GSDL_DIR)\lib\gsdllib.lib
125
126EXECUTABLE_OBJECTS = \
127    $(OBJECTS) \
128    $(GSDL_LIBS)
129
130EXECUTABLE = z3950server.exe
131
132
133# Default target: make both gsdlz3950.lib and z3950server.exe
134all: $(LIBRARY) $(EXECUTABLE)
135
136gsdlz3950.lib: $(LIBRARY_OBJECTS)
137    if EXIST $(LIBRARY) del $(LIBRARY)
138    $(AR) -nologo /out:$(LIBRARY) $(LIBRARY_OBJECTS) $(PACKAGES_DIR)/yaz/yaz-2.1.4/win/obj/tabcomplete.obj
139
140z3950server.exe: $(EXECUTABLE_OBJECTS)
141    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS)
142
143install: $(EXECUTABLE)
144    copy $(EXECUTABLE) "$(GSDL_DIR)\bin\windows"
145
146clean:
147    del *.obj
148    del $(LIBRARY)
149    del $(EXECUTABLE)
Note: See TracBrowser for help on using the browser.