mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-03 17:26:24 -04:00
Add nmake files to build with MSVC.
Right now, they just make static libraries and unit tests. They probably set lots of options wrong. svn:r1507
This commit is contained in:
parent
25a5e6819d
commit
4ca9efeaef
47
Makefile.nmake
Normal file
47
Makefile.nmake
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# WATCH OUT! This makefile is a work in progress. It is probably missing
|
||||||
|
# tons of important things. DO NOT RELY ON IT TO BUILD A GOOD LIBEVENT.
|
||||||
|
|
||||||
|
# Needed for correctness
|
||||||
|
CFLAGS=/Iinclude /Icompat /IWIN32-Code /DWIN32 /DHAVE_CONFIG_H /I.
|
||||||
|
|
||||||
|
# For optimization and warnings
|
||||||
|
CFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /nologo
|
||||||
|
|
||||||
|
# XXXX have a debug mode
|
||||||
|
|
||||||
|
LIBFLAGS=/nologo
|
||||||
|
|
||||||
|
|
||||||
|
CORE_OBJS=event.obj buffer.obj bufferevent.obj bufferevent_sock.obj \
|
||||||
|
bufferevent_pair.obj listener.obj evmap.obj log.obj evutil.obj \
|
||||||
|
strlcpy.obj signal.obj bufferevent_filter.obj
|
||||||
|
WIN_OBJS=win32select.obj evthread_win32.obj buffer_iocp.obj \
|
||||||
|
event_iocp.obj bufferevent_async.obj
|
||||||
|
EXTRA_OBJS=event_tagging.obj http.obj evdns.obj bufferevent_evdns.obj evrpc.obj
|
||||||
|
|
||||||
|
ALL_OBJS=$(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS)
|
||||||
|
STATIC_LIBS=libevent_core.lib libevent_extras.lib libevent.lib
|
||||||
|
|
||||||
|
|
||||||
|
all: static_libs tests
|
||||||
|
|
||||||
|
static_libs: $(STATIC_LIBS)
|
||||||
|
|
||||||
|
libevent_core.lib: $(CORE_OBJS) $(WIN_OBJS)
|
||||||
|
lib $(LIBFLAGS) $(CORE_OBJS) $(WIN_OBJS) /out:libevent_core.lib
|
||||||
|
|
||||||
|
libevent_extras.lib: $(EXTRA_OBJS)
|
||||||
|
lib $(LIBFLAGS) $(EXTRA_OBJS) /out:libevent_extras.lib
|
||||||
|
|
||||||
|
libevent.lib: $(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS)
|
||||||
|
lib $(LIBFLAGS) $(CORE_OBJS) $(EXTRA_OBJS) $(WIN_OBJS) /out:libevent.lib
|
||||||
|
|
||||||
|
clean:
|
||||||
|
del $(ALL_OBJS)
|
||||||
|
del $(STATIC_LIBS)
|
||||||
|
cd test
|
||||||
|
$(MAKE) /F Makefile.nmake clean
|
||||||
|
|
||||||
|
tests:
|
||||||
|
cd test
|
||||||
|
$(MAKE) /F Makefile.nmake
|
50
test/Makefile.nmake
Normal file
50
test/Makefile.nmake
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
CFLAGS=/I.. /I../include /I../WIN32-Code /I../compat /DWIN32 /DHAVE_CONFIG_H
|
||||||
|
|
||||||
|
CFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /nologo
|
||||||
|
|
||||||
|
REGRESS_OBJS=regress.obj regress_buffer.obj regress_http.obj regress_dns.obj \
|
||||||
|
regress_rpc.obj regress.gen.obj \
|
||||||
|
regress_et.obj regress_bufferevent.obj \
|
||||||
|
regress_listener.obj regress_util.obj tinytest.obj \
|
||||||
|
regress_main.obj regress_minheap.obj regress_iocp.obj
|
||||||
|
|
||||||
|
OTHER_OBJS=test-init.obj test-eof.obj test-weof.obj test-time.obj \
|
||||||
|
bench.obj bench_cascade.obj bench_http.obj bench_httpclient.obj
|
||||||
|
|
||||||
|
PROGRAMS=regress.exe \
|
||||||
|
test-init.exe test-eof.exe test-weof.exe test-time.exe
|
||||||
|
|
||||||
|
# Disabled for now:
|
||||||
|
# bench.exe bench_cascade.exe bench_http.exe bench_httpclient.exe
|
||||||
|
|
||||||
|
|
||||||
|
LIBS=..\libevent.lib ws2_32.lib advapi32.lib
|
||||||
|
|
||||||
|
all: $(PROGRAMS)
|
||||||
|
|
||||||
|
regress.exe: $(REGRESS_OBJS)
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) $(REGRESS_OBJS)
|
||||||
|
|
||||||
|
test-init.exe: test-init.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) test-init.obj
|
||||||
|
test-eof.exe: test-eof.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) test-eof.obj
|
||||||
|
test-weof.exe: test-weof.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) test-weof.obj
|
||||||
|
test-time.exe: test-time.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) test-time.obj
|
||||||
|
|
||||||
|
bench.exe: bench.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) bench.obj
|
||||||
|
bench_cascade.exe: bench_cascade.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) bench_cascade.obj
|
||||||
|
bench_http.exe: bench_http.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) bench_http.obj
|
||||||
|
bench_httpclient.exe: bench_httpclient.obj
|
||||||
|
$(CC) $(CFLAGS) $(LIBS) bench_httpclient.obj
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-del $(REGRESS_OBJS)
|
||||||
|
-del $(OTHER_OBJS)
|
||||||
|
-del regress.exe
|
Loading…
x
Reference in New Issue
Block a user