source: main/trunk/greenstone2/runtime-src/src/w32apachectl/win32.mak@ 22948

Last change on this file since 22948 was 19521, checked in by ak19, 15 years ago

Dr Bainbridge updated the Windows makefiles to 1. Take the DEBUG flag so that we can recompile all of GS2 in the Vis C++ 2005 Express Edition command prompt and then use its Debugger on the C code. 2. Now GS2 make clean command cleans up all object and lib files that its make generates.

File size: 3.6 KB
Line 
1###########################################################################
2#
3# win32 makefile -- getgw
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#
27# To compile all these up on their own, just need a .bat file containing:
28#
29# CL /MT starthttpdchild.cpp kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
30#
31# CL /MT starthttpd.cpp kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
32#
33# CL /MT stophttpd.cpp kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
34#
35# See:
36# http://c.ittoolbox.com/groups/technical-functional/cpp-l/error-c2065-_beginthread-undeclared-identifier-how-to-solve-this-239497
37# http://www.gamedev.net/community/forums/topic.asp?topic_id=304779
38# http://www.codeguru.com/forum/showthread.php?t=179647
39# http://support.microsoft.com/kb/138400
40###########################################################################
41
42GSDLHOME = ..\..\..
43
44
45GSDL_VC4 = 0
46LOCAL_LIBRARY = 0
47DEBUG = 0
48DLL = 0
49DLLDEBUG = 0
50
51!IF $(DEBUG)
52CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
53!ELSE
54CXXFLAGS =
55!ENDIF
56
57!IF $(GSDL_VC4)
58CXXFLAGS = $(CXXFLAGS) -GX
59!ELSE
60CXXFLAGS = $(CXXFLAGS) -EHsc
61!ENDIF
62
63CXXFLAGS = $(CXXFLAGS) -MT
64
65CC = cl
66DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
67WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
68 comdlg32.lib advapi32.lib shell32.lib ole32.lib \
69 oleaut32.lib uuid.lib
70
71!IF $(GSDL_VC4)
72DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
73INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
74!ENDIF
75
76!IF $(LOCAL_LIBRARY)
77DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
78!ENDIF
79
80
81COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
82LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
83
84.SUFFIXES:
85.SUFFIXES: .cpp .obj
86.cpp.obj:
87 $(COMPILE) $<
88
89OBJECTS = starthttpdchild.obj starthttpd.obj stophttpd.obj
90EXEC = starthttpdchild.exe starthttpd.exe stophttpd.exe
91
92all: $(EXEC)
93
94install: $(EXEC)
95 if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
96 for %%f in ($(EXEC)) do (copy %%f "$(GSDLHOME)\bin\windows")
97
98clean:
99 del *.obj
100 del $(EXEC)
101
102distclean:
103 del *.obj
104 del $(EXEC)
105 del "$(GSDLHOME)\bin\windows\starthttpdchild.exe"
106 del "$(GSDLHOME)\bin\windows\starthttpd.exe"
107 del "$(GSDLHOME)\bin\windows\stophttpd.exe"
108
109starthttpdchild.exe: starthttpdchild.obj
110 $(LINK) starthttpdchild.obj $(WINLIBS)
111
112starthttpd.exe: starthttpd.obj
113 $(LINK) starthttpd.obj $(WINLIBS)
114
115stophttpd.exe: stophttpd.obj
116 $(LINK) stophttpd.obj $(WINLIBS)
Note: See TracBrowser for help on using the repository browser.