source: gsdl/trunk/runtime-src/src/w32apachectl/win32.mak@ 19345

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

New folder w32apachectl written by Dr Bainbridge to start and stop a Windows apache webserver (httpd.exe). Special start and stop required since launching httpd.exe starts two instances of itself, and getting the PID only terminates one of them (but not the child). Sending control-break only terminates the child which the parent httpd.exe instance then restarts. These starthttpd and stophttpd programs will be used for the GS2 Windows Apache webserver, so that they can be started and stopped from the server.jar code.

File size: 3.4 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
47DLL = 0
48DLLDEBUG = 0
49
50
51!IF $(GSDL_VC4)
52CPPFLAGS = -GX
53!ELSE
54CPPFLAGS = -EHsc
55!ENDIF
56
57CPPFLAGS = $(CPPFLAGS) -MT
58
59CC = cl
60DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
61WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib \
62 comdlg32.lib advapi32.lib shell32.lib ole32.lib \
63 oleaut32.lib uuid.lib
64
65!IF $(GSDL_VC4)
66DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
67INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
68!ENDIF
69
70!IF $(LOCAL_LIBRARY)
71DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
72!ENDIF
73
74
75COMPILE = $(CC) -nologo -c $(CPPFLAGS) $(DEFS) $(INCLUDES)
76LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
77
78.SUFFIXES:
79.SUFFIXES: .cpp .obj
80.cpp.obj:
81 $(COMPILE) $<
82
83OBJECTS = starthttpdchild.obj starthttpd.obj stophttpd.obj
84EXEC = starthttpdchild.exe starthttpd.exe stophttpd.exe
85
86all: $(EXEC)
87
88install: $(EXEC)
89 if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
90 for %%f in ($(EXEC)) do (copy %%f "$(GSDLHOME)\bin\windows")
91
92clean:
93 del *.obj
94 del $(EXEC)
95
96distclean:
97 del *.obj
98 del $(EXEC)
99 del "$(GSDLHOME)\bin\windows\starthttpdchild.exe"
100 del "$(GSDLHOME)\bin\windows\starthttpd.exe"
101 del "$(GSDLHOME)\bin\windows\stophttpd.exe"
102
103starthttpdchild.exe: starthttpdchild.obj
104 $(LINK) starthttpdchild.obj $(WINLIBS)
105
106starthttpd.exe: starthttpd.obj
107 $(LINK) starthttpd.obj $(WINLIBS)
108
109stophttpd.exe: stophttpd.obj
110 $(LINK) stophttpd.obj $(WINLIBS)
Note: See TracBrowser for help on using the repository browser.