1 |
# Makefile for Windows NT and Windows 95/98/2000 |
2 |
|
3 |
# Targets are: |
4 |
|
5 |
# build - build flood |
6 |
# install - install a flood build |
7 |
# clean - remove (most) generated files |
8 |
# |
9 |
# The following install defaults may be customized; |
10 |
# |
11 |
# Option Default |
12 |
# SRCLIB $(MAKEDIR)\..\..\httpd-2.0\srclib |
13 |
# APRPATH $(SRCLIB)\apr |
14 |
# APRUTILPATH $(APRPATH)\..\apr-util |
15 |
# REGEXPATH $(SRCLIB)\pcre |
16 |
# OPENSSLPATH $(SRCLIB)\openssl |
17 |
# |
18 |
# For example; |
19 |
# |
20 |
# nmake /f Makefile.win PORT=80 INSTDIR="d:\Program Files\Apache" installr |
21 |
# |
22 |
# Be aware that certain awk's will not accept backslahed names, |
23 |
# so the server root should be given in forward slashes (quoted), |
24 |
# preferably with the drive designation! |
25 |
|
26 |
default: build |
27 |
|
28 |
!IF "$(SRCLIB)" == "" |
29 |
SRCLIB=$(MAKEDIR)\..\..\httpd-2.0\srclib |
30 |
!MESSAGE Using default SRCLIB path $(SRCLIB) |
31 |
!ENDIF |
32 |
|
33 |
!IF "$(APRPATH)" == "" |
34 |
APRPATH=$(SRCLIB)\apr |
35 |
!MESSAGE Using default APRPATH $(APRPATH) |
36 |
!ENDIF |
37 |
|
38 |
!IF "$(APRUTILPATH)" == "" |
39 |
APRUTILPATH=$(APRPATH)\..\apr-util |
40 |
!MESSAGE Using default APRUTILPATH path $(APRUTILPATH) |
41 |
!ENDIF |
42 |
|
43 |
!IF "$(REGEXPATH)" == "" |
44 |
REGEXPATH=$(SRCLIB)\pcre |
45 |
!MESSAGE Using default REGEXPATH $(REGEXPATH) |
46 |
!ENDIF |
47 |
|
48 |
!IF "$(OPENSSLPATH)" == "" |
49 |
OPENSSLPATH=$(SRCLIB)\openssl |
50 |
!MESSAGE Using default OPENSSLPATH $(OPENSSLPATH) |
51 |
!ENDIF |
52 |
|
53 |
!IF !EXIST("$(APRPATH)") |
54 |
!MESSAGE Please check out or download and unpack the Apache Portability Runtime |
55 |
!MESSAGE sources (apr and apr-util) into your $(INSTDIR)\srclib directory. |
56 |
!MESSAGE flood cannot build without these libraries! |
57 |
!MESSAGE |
58 |
!ERROR Need $(APRPATH) |
59 |
!ENDIF |
60 |
|
61 |
!IF !EXIST("$(APRUTILPATH)") |
62 |
!MESSAGE Please check out or download and unpack the Apache Portability Runtime |
63 |
!MESSAGE sources (apr and apr-util) into your $(INSTDIR)\srclib directory. |
64 |
!MESSAGE flood cannot build without these libraries! |
65 |
!MESSAGE |
66 |
!ERROR Need $(APRUTILPATH) |
67 |
!ENDIF |
68 |
|
69 |
!IF !EXIST("$(REGEXPATH)") |
70 |
!MESSAGE Please check out or download and unpack the pcre regex directory. |
71 |
!MESSAGE One solution is the Apache 2.0 srclib/pcre distribution. |
72 |
!MESSAGE flood cannot build without these libraries! |
73 |
!MESSAGE |
74 |
!ERROR Need $(REGEXPATH) |
75 |
!ENDIF |
76 |
|
77 |
!IF !EXIST("$(OPENSSLPATH)") |
78 |
!IF EXIST("ssl.discovered") |
79 |
[del ssl.discovered] |
80 |
[del config.h] |
81 |
!ENDIF |
82 |
HAVE_SSL=0 |
83 |
!ELSE |
84 |
!IF EXIST("ssl.discovered") |
85 |
[echo $(OPENSSLPATH) > ssl.discovered] |
86 |
[del config.h] |
87 |
!ENDIF |
88 |
!IFDEF DEBUG |
89 |
SSLBIN=out32dll.dbg |
90 |
!ELSE |
91 |
SSLBIN=out32dll |
92 |
!ENDIF |
93 |
HAVE_SSL=1 |
94 |
!ENDIF |
95 |
|
96 |
!IFDEF DEBUG |
97 |
SHORT=D |
98 |
LONG=Debug |
99 |
!ELSE |
100 |
SHORT=R |
101 |
LONG=Release |
102 |
!ENDIF |
103 |
|
104 |
floodenv.bat: Makefile.win |
105 |
echo @echo off>floodenv.bat |
106 |
echo set SRCLIB=$(SRCLIB)>>floodenv.bat |
107 |
echo set APRPATH=$(APRPATH)>>floodenv.bat |
108 |
echo set APRUTILPATH=$(APRUTILPATH)>>floodenv.bat |
109 |
echo set OPENSSLPATH=$(OPENSSLPATH)>>floodenv.bat |
110 |
echo set REGEXPATH=$(REGEXPATH)>>floodenv.bat |
111 |
echo set SSLBIN=$(SSLBIN)>>floodenv.bat |
112 |
|
113 |
regex.h: $(REGEXPATH)\pcreposix.h |
114 |
copy "$(REGEXPATH)\pcreposix.h" regex.h < << |
115 |
Y |
116 |
<< |
117 |
|
118 |
# Yup, we are our own dependency, if this inline script changes |
119 |
config.h: Makefile.win floodenv.bat config.h.in regex.h |
120 |
-awk -f <<script.awk config.h.in > config.h |
121 |
{ |
122 |
sub( /@prngrand@/, "1" ); |
123 |
sub( /@prngrand48@/, "0" ); |
124 |
sub( /@prngrandom@/, "0" ); |
125 |
sub( /@hasstrtoll@/, "0" ); |
126 |
sub( /@hasstrtoq@/, "0" ); |
127 |
sub( /@flood_has_openssl@/, "$(HAVE_SSL)" ); |
128 |
sub( /@flood_has_devrand@/, "0" ); |
129 |
sub( /@CAPATH@/, "certs" ); |
130 |
print $$0; |
131 |
} |
132 |
<< |
133 |
|
134 |
configure: config.h |
135 |
|
136 |
!IFNDEF MAKEOPT |
137 |
# Only default the behavior if MAKEOPT= is omitted |
138 |
!IF "$(MAKE)" == "NMAKE" |
139 |
# Microsoft NMake options |
140 |
MAKEOPT=-nologo |
141 |
!ELSEIF "($MAKE)" == "make" |
142 |
# Borland make options? Not really supported (yet) |
143 |
MAKEOPT=-s -N |
144 |
!ENDIF |
145 |
!ENDIF |
146 |
|
147 |
!IF EXIST("flood.mak") |
148 |
|
149 |
clean: |
150 |
-floodenv.bat |
151 |
$(MAKE) $(MAKEOPT) -f flood.mak CFG="flood - Win32 $(LONG)" RECURSE=0 CLEAN |
152 |
del config.h floodenv.bat regex.h |
153 |
|
154 |
build: config.h |
155 |
floodenv.bat |
156 |
$(MAKE) $(MAKEOPT) -f flood.mak CFG="flood - Win32 $(LONG)" RECURSE=0 |
157 |
|
158 |
!ELSEIF EXIST("flood.sln") |
159 |
|
160 |
clean: |
161 |
-floodenv.bat |
162 |
devenv flood.sln /useenv /clean $(LONG) /project flood |
163 |
del config.h floodenv.bat regex.h |
164 |
|
165 |
build: config.h |
166 |
floodenv.bat |
167 |
devenv flood.sln /useenv /build $(LONG) /project flood |
168 |
|
169 |
!ELSE |
170 |
|
171 |
clean: |
172 |
-floodenv.bat |
173 |
msdev flood.dsw /USEENV /MAKE \ |
174 |
"flood - Win32 $(LONG)" /CLEAN |
175 |
del config.h floodenv.bat regex.h |
176 |
|
177 |
build: config.h |
178 |
floodenv.bat |
179 |
msdev flood.dsw /USEENV /MAKE \ |
180 |
"flood - Win32 $(LONG)" |
181 |
|
182 |
!ENDIF |
183 |
|
184 |
install: |
185 |
echo Y >.y |
186 |
echo A >.a |
187 |
-mkdir "$(INSTDIR)" |
188 |
-mkdir "$(INSTDIR)\bin" |
189 |
-mkdir "$(INSTDIR)\certs" |
190 |
copy CHANGES "$(INSTDIR)\CHANGES.txt" <.y |
191 |
copy CONFIG "$(INSTDIR)\CONFIG.txt" <.y |
192 |
copy DESIGN "$(INSTDIR)\DESIGN.txt" <.y |
193 |
copy LICENSE "$(INSTDIR)\LICENSE.txt" <.y |
194 |
copy $(LONG)\flood.exe "$(INSTDIR)\bin" <.y |
195 |
!IF EXIST("$(OPENSSLPATH)") |
196 |
copy $(OPENSSLPATH)\$(SSLBIN)\libeay32.dll "$(INSTDIR)\bin" <.y |
197 |
copy $(OPENSSLPATH)\$(SSLBIN)\ssleay32.dll "$(INSTDIR)\bin" <.y |
198 |
xcopy $(OPENSSLPATH)\certs "$(INSTDIR)\certs" < .a |
199 |
type << >> "$(INSTDIR)\README.txt" |
200 |
|
201 |
This binary distribution includes cryptographic software written by |
202 |
Eric Young (eay@cryptsoft.com), software written by Tim Hudson |
203 |
(tjh@cryptsoft.com), and software developed by the OpenSSL Project |
204 |
for use in the OpenSSL Toolkit <http://www.openssl.org/>. |
205 |
<< |
206 |
-awk -f <<script.awk < "$(OPENSSLPATH)\LICENSE" >> "$(INSTDIR)\LICENSE.txt" |
207 |
BEGIN { |
208 |
print ""; |
209 |
print "For the libeay32.dll and ssleay32.dll components:"; |
210 |
print ""; |
211 |
while ( getline > 0 ) { |
212 |
print $$0; |
213 |
} |
214 |
} |
215 |
<< |
216 |
copy << + $(OPENSSLPATH)\NEWS "$(INSTDIR)\OPENSSL-NEWS.txt" <.y |
217 |
|
218 |
Apache flood Limited OpenSSL Distribution |
219 |
|
220 |
This binary distribution includes the minimal components of OpenSSL required |
221 |
to support flood (details are listed in OPENSSL-README.txt.) For the complete |
222 |
list of CHANGES to this and later versions of OpenSSL, please refer to the |
223 |
definative source, <http://www.openssl.org/news/changelog.html>, or see the |
224 |
CHANGES file in the full binary or source distribution package |
225 |
from <http://www.openssl.org/>. |
226 |
|
227 |
These OpenSSL binaries were built for distribution from the U.S. without |
228 |
support for the patented encryption methods IDEA, MDC-2 or RC5. |
229 |
|
230 |
-------------------------------------------------------------------------------- |
231 |
<< |
232 |
copy << + $(OPENSSLPATH)\README "$(INSTDIR)\OPENSSL-README.txt" <.y |
233 |
|
234 |
Apache flood Limited OpenSSL Distribution |
235 |
|
236 |
This binary installation of OpenSSL is a limited distribution of the documents |
237 |
OPENSSL-LICENSE.txt, OPENSSL-NEWS.txt and OPENSSL-README.txt, and the binaries |
238 |
|
239 |
libeay32.dll |
240 |
ssleay32.dll |
241 |
|
242 |
These are the minimal libraries and tools required to use flood with HTTPS |
243 |
support for SSL v2/v3 and TLS v1. No library link files, headers or sources |
244 |
are distributed with this binary distribution. Please refer to the |
245 |
<http://www.openssl.org/> site for complete source or binary distributions. |
246 |
|
247 |
These OpenSSL binaries were built for distribution from the U.S. without |
248 |
support for the patented encryption methods IDEA, MDC-2 or RC5. |
249 |
|
250 |
The Apache Projects only support the binary distribution of these files |
251 |
and development of the flood program. We cannot provide support assistance |
252 |
for using or configuring the OpenSSL package or these modules. Please refer |
253 |
all installation and configuration questions to the appropriate forum, |
254 |
such as the user supported lists, <http://httpd.apache.org/userslist.html> |
255 |
the Apache HTTP Server user's list or <http://www.openssl.org/support/> the |
256 |
OpenSSL support page. |
257 |
|
258 |
-------------------------------------------------------------------------------- |
259 |
<< |
260 |
!ENDIF |
261 |
del .a .y |
262 |
|