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

Last change on this file since 25234 was 22960, checked in by ak19, 14 years ago

Added in DEBUG flags to LDFLAGS where missing

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