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