root/gsdl/trunk/runtime-src/src/w32server/win32.mak @ 16889

Revision 16889, 4.9 KB (checked in by mdewsnip, 12 years ago)

Added "$(VCINSTALLDIR)/include/mfc" to include path for "rc" program when compiling server.rc, so it can find the afxres.h file with Visual Studio 2005.

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