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

Revision 15580, 4.6 KB (checked in by mdewsnip, 11 years ago)

Hopefully the last of the makefile tidy ups.

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