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

Revision 15541, 4.5 KB (checked in by mdewsnip, 12 years ago)

Big tidy up of win32.mak file.

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