root/gsdl/trunk/src/w32server/win32.mak @ 15852

Revision 15829, 4.7 KB (checked in by mdewsnip, 11 years ago)

(Adding new DB support) Fixed SQLite library path.

  • Property svn:keywords set to Author Date Id Revision
Line 
1###########################################################################
2#
3# win32 makefile -- src/w32server
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  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
32RECPT_DIR = $(GSDL_DIR)\src\recpt
33
34
35GSDL_VC4 = 0
36ENABLE_ACCENTFOLD = 1
37USE_SQLITE = 0
38
39
40!IF $(GSDL_VC4)
41CPPFLAGS = -GX
42!ELSE
43CPPFLAGS = -EHsc
44!ENDIF
45
46!IF $(ENABLE_ACCENTFOLD)
47ACCENTFOLD_LIBS = "$(INDEXERS_DIR)\packages\unac\libunac.lib" "$(INDEXERS_DIR)\packages\unac\iconv.lib"
48!ELSE
49ACCENTFOLD_LIBS =
50!ENDIF
51
52!IF $(USE_SQLITE)
53SQLITE_LIBS = "$(PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
54!ELSE
55SQLITE_LIBS =
56!ENDIF
57
58
59AR = lib
60CC = cl
61DEFS = -D__WIN32__ -DHAVE_CONFIG_H -D_LITTLE_ENDIAN -DPARADOCNUM -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
62INCLUDES = -I"$(GSDL_DIR)" -I"$(GSDL_DIR)\lib" -I"$(COLSERVR_DIR)" -I"$(PROTOCOL_DIR)" -I"$(RECPT_DIR)" \
63    -I"$(GSDL_DIR)\src\colservr" -I"$(GSDL_DIR)\indexers\mg" \
64    -I"$(PACKAGES_DIR)\windows\gdbm\gdbm" \
65        -I"$(GSDL_DIR)\indexers\mg\lib" -I"$(GSDL_DIR)\indexers\mg\src\text" \
66        -I"$(GSDL_DIR)\indexers\mgpp\lib" -I"$(GSDL_DIR)\indexers\mgpp\text"
67LDFLAGS =
68LIBS = "$(PACKAGES_DIR)\windows\crypt\crypt\crypt.lib" "$(PACKAGES_DIR)\windows\expat\expat\libexpat.lib" \
69        "$(PACKAGES_DIR)\windows\gdbm\gdbm\gdbm.lib" $(ACCENTFOLD_LIBS) $(SQLITE_LIBS)
70RSC = rc
71WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
72          comdlg32.lib advapi32.lib shell32.lib ole32.lib \
73          oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
74#wsock32.lib
75
76
77!IF $(GSDL_VC4)
78DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
79INCLUDES = $(INCLUDES) -I"$(PACKAGES_DIR)\windows\stlport\stlport"
80!ENDIF
81
82
83COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
84LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
85
86
87.SUFFIXES:
88.SUFFIXES: .cpp .obj
89.cpp.obj:
90    $(COMPILE) $<
91
92
93SOURCES = \
94    cgiwrapper.cpp \
95    conftools.cpp \
96    d_winsock.cpp \
97    fnord.cpp \
98    httpreq.cpp \
99    httpsend.cpp \
100        httpsrv.cpp \
101    locate.cpp \
102    netio.cpp \
103    parse.cpp \
104    settings.cpp \
105    startbrowser.cpp \
106    wincgiutils.cpp
107
108OBJECTS = \
109    cgiwrapper.obj \
110    conftools.obj \
111    d_winsock.obj \
112    fnord.obj \
113    httpreq.obj \
114    httpsend.obj \
115        httpsrv.obj \
116    locate.obj \
117    netio.obj \
118    parse.obj \
119    settings.obj \
120    startbrowser.obj \
121    wincgiutils.obj
122
123RESOURCES = \
124    server.res
125
126GSDL_LIBS = \
127    "$(RECPT_DIR)\gsdlrecpt.lib" \
128    "$(PROTOCOL_DIR)\gsdlprotocol.lib" \
129    "$(COLSERVR_DIR)\gsdlcolservr.lib" \
130    "$(GSDL_DIR)\lib\gsdllib.lib" \
131    "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
132    "$(INDEXERS_DIR)\mg\lib\libmglib.lib" \
133    "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
134    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
135
136EXECUTABLE_OBJECTS = \
137    $(OBJECTS) \
138    $(RESOURCES) \
139    $(GSDL_LIBS)
140
141EXECUTABLE = server.exe
142
143
144# Default target: make the local library executable
145all: $(EXECUTABLE)
146
147server.exe: $(EXECUTABLE_OBJECTS)
148    $(LINK) $(EXECUTABLE_OBJECTS) $(LIBS) $(WINLIBS)
149install:
150    copy $(EXECUTABLE) "$(GSDL_DIR)"
151
152clean:
153    del *.obj
154    del $(EXECUTABLE)
155
156
157# Resources stuff
158SOURCE = "$(GSDL_DIR)\src\w32server\newgsdl.bmp"
159SOURCE = "$(GSDL_DIR)\src\w32server\resource.h"
160SOURCE = "$(GSDL_DIR)\src\w32server\server.ico"
161SOURCE = "$(GSDL_DIR)\src\w32server\gsdlcol.bmp"
162SOURCE = "$(GSDL_DIR)\src\w32server\server.rc"
163DEP_RSC_SERVE=\
164    "$(GSDL_DIR)\src\w32server\gsdlcol.bmp"\
165    "$(GSDL_DIR)\src\w32server\newgsdl.bmp"\
166    "$(GSDL_DIR)\src\w32server\server.ico"
167
168server.res : $(SOURCE) $(DEP_RSC_SERVE) "$(GSDL_DIR)\src\w32server"
169   $(RSC) /l 0x409 /fo"$(GSDL_DIR)\src\w32server\server.res" /i "$(GSDL_DIR)\src\w32server" \
170 /d "NDEBUG" $(SOURCE)
171
172"$(GSDL_DIR)\src\w32server\server.res" : $(SOURCE) $(DEP_RSC_SERVE) "$(GSDL_DIR)\src\w32server"
173   $(RSC) /l 0x409 /fo"$(GSDL_DIR)\src\w32server\server.res" /i "$(GSDL_DIR)\src\w32server" \
174 /d "NDEBUG" $(SOURCE)
Note: See TracBrowser for help on using the browser.