1275970Scy# WATCH OUT!  This makefile is a work in progress.             -*- makefile -*-
2275970Scy
3275970Scy!IFDEF OPENSSL_DIR
4275970ScySSL_CFLAGS=/I$(OPENSSL_DIR)\include /DEVENT__HAVE_OPENSSL
5275970ScySSL_OBJS=regress_ssl.obj
6275970ScySSL_LIBS=..\libevent_openssl.lib $(OPENSSL_DIR)\lib\libeay32.lib $(OPENSSL_DIR)\lib\ssleay32.lib gdi32.lib User32.lib
7275970Scy!ELSE
8275970ScySSL_CFLAGS=
9275970ScySSL_OBJS=
10275970ScySSL_LIBS=
11275970Scy!ENDIF
12275970Scy
13275970ScyCFLAGS=/I.. /I../WIN32-Code /I../WIN32-Code/nmake /I../include /I../compat /DHAVE_CONFIG_H /DTINYTEST_LOCAL $(SSL_CFLAGS)
14275970Scy
15275970ScyCFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /nologo
16275970Scy
17275970ScyREGRESS_OBJS=regress.obj regress_buffer.obj regress_http.obj regress_dns.obj \
18275970Scy	regress_testutils.obj \
19275970Scy        regress_rpc.obj regress.gen.obj \
20275970Scy	regress_et.obj regress_bufferevent.obj \
21275970Scy	regress_listener.obj regress_util.obj tinytest.obj \
22275970Scy	regress_main.obj regress_minheap.obj regress_iocp.obj \
23275970Scy	regress_thread.obj regress_finalize.obj $(SSL_OBJS)
24275970Scy
25275970ScyOTHER_OBJS=test-init.obj test-eof.obj test-closed.obj test-weof.obj test-time.obj \
26275970Scy	bench.obj bench_cascade.obj bench_http.obj bench_httpclient.obj \
27275970Scy	test-changelist.obj \
28275970Scy	print-winsock-errors.obj
29275970Scy
30275970ScyPROGRAMS=regress.exe \
31275970Scy	test-init.exe test-eof.exe test-closed.exe test-weof.exe test-time.exe \
32275970Scy	test-changelist.exe \
33275970Scy	print-winsock-errors.exe
34275970Scy
35275970Scy# Disabled for now:
36275970Scy#	bench.exe bench_cascade.exe bench_http.exe bench_httpclient.exe
37275970Scy
38275970Scy
39275970ScyLIBS=..\libevent.lib ws2_32.lib shell32.lib advapi32.lib
40275970Scy
41275970Scyall: $(PROGRAMS)
42275970Scy
43275970Scyregress.exe: $(REGRESS_OBJS)
44275970Scy	$(CC) $(CFLAGS) $(LIBS) $(SSL_LIBS) $(REGRESS_OBJS)
45275970Scy
46275970Scytest-init.exe: test-init.obj
47275970Scy	$(CC) $(CFLAGS) $(LIBS) test-init.obj
48275970Scytest-eof.exe: test-eof.obj
49275970Scy	$(CC) $(CFLAGS) $(LIBS) test-eof.obj
50275970Scytest-closed.exe: test-closed.obj
51275970Scy	$(CC) $(CFLAGS) $(LIBS) test-closed.obj
52275970Scytest-changelist.exe: test-changelist.obj
53275970Scy	$(CC) $(CFLAGS) $(LIBS) test-changelist.obj
54275970Scytest-weof.exe: test-weof.obj
55275970Scy	$(CC) $(CFLAGS) $(LIBS) test-weof.obj
56275970Scytest-time.exe: test-time.obj
57275970Scy	$(CC) $(CFLAGS) $(LIBS) test-time.obj
58275970Scy
59275970Scyprint-winsock-errors.exe: print-winsock-errors.obj
60275970Scy	$(CC) $(CFLAGS) $(LIBS) print-winsock-errors.obj
61275970Scy
62275970Scybench.exe: bench.obj
63275970Scy	$(CC) $(CFLAGS) $(LIBS) bench.obj
64275970Scybench_cascade.exe: bench_cascade.obj
65275970Scy	$(CC) $(CFLAGS) $(LIBS) bench_cascade.obj
66275970Scybench_http.exe: bench_http.obj
67275970Scy	$(CC) $(CFLAGS) $(LIBS) bench_http.obj
68275970Scybench_httpclient.exe: bench_httpclient.obj
69275970Scy	$(CC) $(CFLAGS) $(LIBS) bench_httpclient.obj
70275970Scy
71275970Scyregress.gen.c regress.gen.h: regress.rpc ../event_rpcgen.py
72275970Scy	echo // > regress.gen.c
73275970Scy	echo #define NO_PYTHON_EXISTS > regress.gen.h
74275970Scy	-python ..\event_rpcgen.py regress.rpc
75275970Scy
76275970Scyclean:
77275970Scy	-del $(REGRESS_OBJS)
78275970Scy	-del $(OTHER_OBJS)
79275970Scy	-del $(PROGRAMS)
80