vs2010下用nmake编译libevent/sample中的例子
CFLAGS=/I.. /I../WIN32-Code /I../include /I../compat /DWIN32 /DHAVE_CONFIG_H /DTINYTEST_LOCAL
CFLAGS=$(CFLAGS) /W3 /wd4996 /nologo /Od /MDd /Zi
REGRESS_OBJS=http-server.obj hello-world.obj
PROGRAMS=http-server.exe hello-world.exe
LIBS=..\libevent.lib ..\libevent_core.lib ..\libevent_extras.lib ws2_32.lib shell32.lib advapi32.lib
LINKFLAGS=/link /NODEFAULTLIB:"msvctd.lib"
all: $(PROGRAMS)
http-server.exe: http-server.obj
$(CC) $(CFLAGS) /Tc http-server.c $(LINKFLAGS) $(LIBS) http-server.obj
hello-world.exe: hello-world.obj
$(CC) $(CFLAGS) /Tc hello-world.c $(LINKFLAGS) $(LIBS) hello-world.obj
clean:
-del $(REGRESS_OBJS)
-del http-server.exe
-del hello-world.exe
CFLAGS=$(CFLAGS) /W3 /wd4996 /nologo /Od /MDd /Zi
REGRESS_OBJS=http-server.obj hello-world.obj
PROGRAMS=http-server.exe hello-world.exe
LIBS=..\libevent.lib ..\libevent_core.lib ..\libevent_extras.lib ws2_32.lib shell32.lib advapi32.lib
LINKFLAGS=/link /NODEFAULTLIB:"msvctd.lib"
all: $(PROGRAMS)
http-server.exe: http-server.obj
$(CC) $(CFLAGS) /Tc http-server.c $(LINKFLAGS) $(LIBS) http-server.obj
hello-world.exe: hello-world.obj
$(CC) $(CFLAGS) /Tc hello-world.c $(LINKFLAGS) $(LIBS) hello-world.obj
clean:
-del $(REGRESS_OBJS)
-del http-server.exe
-del hello-world.exe