xref: /freebsd/contrib/libevent/test/Makefile.nmake (revision 02e9120893770924227138ba49df1edb3896112a)
1# WATCH OUT!  This makefile is a work in progress.             -*- makefile -*-
2
3!IFDEF OPENSSL_DIR
4SSL_CFLAGS=/I$(OPENSSL_DIR)\include /DEVENT__HAVE_OPENSSL
5SSL_OBJS=regress_ssl.obj
6SSL_LIBS=..\libevent_openssl.lib $(OPENSSL_DIR)\lib\libeay32.lib $(OPENSSL_DIR)\lib\ssleay32.lib gdi32.lib User32.lib
7!ELSE
8SSL_CFLAGS=
9SSL_OBJS=
10SSL_LIBS=
11!ENDIF
12
13CFLAGS=/I.. /I../WIN32-Code /I../WIN32-Code/nmake /I../include /I../compat /DHAVE_CONFIG_H /DTINYTEST_LOCAL $(SSL_CFLAGS)
14
15CFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /nologo
16
17REGRESS_OBJS=regress.obj regress_buffer.obj regress_http.obj regress_dns.obj \
18	regress_testutils.obj \
19        regress_rpc.obj regress.gen.obj \
20	regress_et.obj regress_bufferevent.obj \
21	regress_listener.obj regress_util.obj tinytest.obj \
22	regress_main.obj regress_minheap.obj regress_iocp.obj \
23	regress_thread.obj regress_finalize.obj $(SSL_OBJS)
24
25OTHER_OBJS=test-init.obj test-eof.obj test-closed.obj test-weof.obj test-time.obj \
26	bench.obj bench_cascade.obj bench_http.obj bench_httpclient.obj \
27	test-changelist.obj \
28	print-winsock-errors.obj
29
30PROGRAMS=regress.exe \
31	test-init.exe test-eof.exe test-closed.exe test-weof.exe test-time.exe \
32	test-changelist.exe \
33	print-winsock-errors.exe
34
35# Disabled for now:
36#	bench.exe bench_cascade.exe bench_http.exe bench_httpclient.exe
37
38
39LIBS=..\libevent.lib ws2_32.lib shell32.lib advapi32.lib
40
41all: $(PROGRAMS)
42
43regress.exe: $(REGRESS_OBJS)
44	$(CC) $(CFLAGS) $(LIBS) $(SSL_LIBS) $(REGRESS_OBJS)
45
46test-init.exe: test-init.obj
47	$(CC) $(CFLAGS) $(LIBS) test-init.obj
48test-eof.exe: test-eof.obj
49	$(CC) $(CFLAGS) $(LIBS) test-eof.obj
50test-closed.exe: test-closed.obj
51	$(CC) $(CFLAGS) $(LIBS) test-closed.obj
52test-changelist.exe: test-changelist.obj
53	$(CC) $(CFLAGS) $(LIBS) test-changelist.obj
54test-weof.exe: test-weof.obj
55	$(CC) $(CFLAGS) $(LIBS) test-weof.obj
56test-time.exe: test-time.obj
57	$(CC) $(CFLAGS) $(LIBS) test-time.obj
58
59print-winsock-errors.exe: print-winsock-errors.obj
60	$(CC) $(CFLAGS) $(LIBS) print-winsock-errors.obj
61
62bench.exe: bench.obj
63	$(CC) $(CFLAGS) $(LIBS) bench.obj
64bench_cascade.exe: bench_cascade.obj
65	$(CC) $(CFLAGS) $(LIBS) bench_cascade.obj
66bench_http.exe: bench_http.obj
67	$(CC) $(CFLAGS) $(LIBS) bench_http.obj
68bench_httpclient.exe: bench_httpclient.obj
69	$(CC) $(CFLAGS) $(LIBS) bench_httpclient.obj
70
71regress.gen.c regress.gen.h: regress.rpc ../event_rpcgen.py
72	echo // > regress.gen.c
73	echo #define NO_PYTHON_EXISTS > regress.gen.h
74	-python ..\event_rpcgen.py regress.rpc
75
76clean:
77	-del $(REGRESS_OBJS)
78	-del $(OTHER_OBJS)
79	-del $(PROGRAMS)
80