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 |
|
---|
42 | GSDLHOME = ..\..\..
|
---|
43 |
|
---|
44 |
|
---|
45 | GSDL_VC4 = 0
|
---|
46 | LOCAL_LIBRARY = 0
|
---|
47 | DEBUG = 0
|
---|
48 | DLL = 0
|
---|
49 | DLLDEBUG = 0
|
---|
50 |
|
---|
51 | !IF $(DEBUG)
|
---|
52 | CXXFLAGS = -DEBUG -Z7 /errorReport:prompt
|
---|
53 | LDFLAGS = -DEBUG -Z7 /errorReport:prompt
|
---|
54 | !ELSE
|
---|
55 | CXXFLAGS =
|
---|
56 | LDFLAGS =
|
---|
57 | !ENDIF
|
---|
58 |
|
---|
59 | !IF $(GSDL_VC4)
|
---|
60 | CXXFLAGS = $(CXXFLAGS) -GX
|
---|
61 | !ELSE
|
---|
62 | CXXFLAGS = $(CXXFLAGS) -EHsc
|
---|
63 | !ENDIF
|
---|
64 |
|
---|
65 | CXXFLAGS = $(CXXFLAGS) -MT
|
---|
66 |
|
---|
67 | CC = cl
|
---|
68 | DEFS = -D__WIN32__ -DHAVE_CONFIG_H -DPARADOCNUM -D_LITTLE_ENDIAN -DSHORT_SUFFIX -D_CRT_SECURE_NO_DEPRECATE
|
---|
69 | WINLIBS = 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)
|
---|
74 | DEFS = $(DEFS) -DGSDL_NAMESPACE_BROKEN -DGSDL_USE_IOS_H -D__STL_NO_NEW_IOSTREAMS
|
---|
75 | INCLUDES = $(INCLUDES) -I"$(COMMON_PACKAGES_DIR)\windows\stlport\stlport"
|
---|
76 | !ENDIF
|
---|
77 |
|
---|
78 | !IF $(LOCAL_LIBRARY)
|
---|
79 | DEFS = $(DEFS) -DGSDL_LOCAL_LIBRARY
|
---|
80 | !ENDIF
|
---|
81 |
|
---|
82 |
|
---|
83 | COMPILE = $(CC) -nologo -c $(CXXFLAGS) $(DEFS) $(INCLUDES)
|
---|
84 | LINK = $(CC) -nologo $(LDFLAGS) -Fe"$@"
|
---|
85 |
|
---|
86 | .SUFFIXES:
|
---|
87 | .SUFFIXES: .cpp .obj
|
---|
88 | .cpp.obj:
|
---|
89 | $(COMPILE) $<
|
---|
90 |
|
---|
91 | OBJECTS = starthttpdchild.obj starthttpd.obj stophttpd.obj
|
---|
92 | EXEC = starthttpdchild.exe starthttpd.exe stophttpd.exe
|
---|
93 |
|
---|
94 | all: $(EXEC)
|
---|
95 |
|
---|
96 | install: $(EXEC)
|
---|
97 | if NOT EXIST "$(GSDLHOME)\bin\windows" mkdir "$(GSDLHOME)\bin\windows"
|
---|
98 | for %%f in ($(EXEC)) do (copy %%f "$(GSDLHOME)\bin\windows")
|
---|
99 |
|
---|
100 | clean:
|
---|
101 | del *.obj
|
---|
102 | del $(EXEC)
|
---|
103 |
|
---|
104 | distclean:
|
---|
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 |
|
---|
111 | starthttpdchild.exe: starthttpdchild.obj
|
---|
112 | $(LINK) starthttpdchild.obj $(WINLIBS)
|
---|
113 |
|
---|
114 | starthttpd.exe: starthttpd.obj
|
---|
115 | $(LINK) starthttpd.obj $(WINLIBS)
|
---|
116 |
|
---|
117 | stophttpd.exe: stophttpd.obj
|
---|
118 | $(LINK) stophttpd.obj $(WINLIBS)
|
---|