diff --git a/.gitignore b/.gitignore index 9d142354..dcd7fbe4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,37 +7,5 @@ *.orig *.sdf *.suo -*.vcxproj.filters -*.vcxproj.user -ev/.deps/ -ev/.libs/ -ev/Makefile -ev/config.h -ev/config.log -ev/config.status -ev/libtool -ev/stamp-h1 -ev/autom4te.cache -/msvs/ipch/ -/build/ -test/run-tests -test/run-benchmarks -test/run-tests.exe -test/run-benchmarks.exe -test/run-benchmarks.dSYM/ -test/run-tests.dSYM/ - - -c-ares/.deps/ -c-ares/.libs/ -c-ares/Makefile -c-ares/acountry -c-ares/adig -c-ares/ahost -c-ares/ares_config.h -c-ares/config.log -c-ares/config.status -c-ares/libcares.pc -c-ares/libtool -c-ares/stamp-h1 -c-ares/stamp-h2 +/out/ +/build/gyp diff --git a/Makefile b/Makefile index cbbf635d..8487a14a 100644 --- a/Makefile +++ b/Makefile @@ -1,119 +1,24 @@ -# Copyright Joyent, Inc. and other Node contributors. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. +BUILDTYPE ?= Release -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') +all: out/Makefile + $(MAKE) -C out BUILDTYPE=$(BUILDTYPE) -ifdef MSVC -uname_S := MINGW -endif +out/Makefile: build/gyp + build/gyp_uv -f make -CPPFLAGS += -Iinclude +build/gyp: + svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp -CARES_OBJS = -CARES_OBJS += src/ares/ares__close_sockets.o -CARES_OBJS += src/ares/ares__get_hostent.o -CARES_OBJS += src/ares/ares__read_line.o -CARES_OBJS += src/ares/ares__timeval.o -CARES_OBJS += src/ares/ares_cancel.o -CARES_OBJS += src/ares/ares_data.o -CARES_OBJS += src/ares/ares_destroy.o -CARES_OBJS += src/ares/ares_expand_name.o -CARES_OBJS += src/ares/ares_expand_string.o -CARES_OBJS += src/ares/ares_fds.o -CARES_OBJS += src/ares/ares_free_hostent.o -CARES_OBJS += src/ares/ares_free_string.o -CARES_OBJS += src/ares/ares_gethostbyaddr.o -CARES_OBJS += src/ares/ares_gethostbyname.o -CARES_OBJS += src/ares/ares_getnameinfo.o -CARES_OBJS += src/ares/ares_getopt.o -CARES_OBJS += src/ares/ares_getsock.o -CARES_OBJS += src/ares/ares_init.o -CARES_OBJS += src/ares/ares_library_init.o -CARES_OBJS += src/ares/ares_llist.o -CARES_OBJS += src/ares/ares_mkquery.o -CARES_OBJS += src/ares/ares_nowarn.o -CARES_OBJS += src/ares/ares_options.o -CARES_OBJS += src/ares/ares_parse_a_reply.o -CARES_OBJS += src/ares/ares_parse_aaaa_reply.o -CARES_OBJS += src/ares/ares_parse_mx_reply.o -CARES_OBJS += src/ares/ares_parse_ns_reply.o -CARES_OBJS += src/ares/ares_parse_ptr_reply.o -CARES_OBJS += src/ares/ares_parse_srv_reply.o -CARES_OBJS += src/ares/ares_parse_txt_reply.o -CARES_OBJS += src/ares/ares_process.o -CARES_OBJS += src/ares/ares_query.o -CARES_OBJS += src/ares/ares_search.o -CARES_OBJS += src/ares/ares_send.o -CARES_OBJS += src/ares/ares_strcasecmp.o -CARES_OBJS += src/ares/ares_strdup.o -CARES_OBJS += src/ares/ares_strerror.o -CARES_OBJS += src/ares/ares_timeout.o -CARES_OBJS += src/ares/ares_version.o -CARES_OBJS += src/ares/ares_writev.o -CARES_OBJS += src/ares/bitncmp.o -CARES_OBJS += src/ares/inet_net_pton.o -CARES_OBJS += src/ares/inet_ntop.o +clean: + rm -rf out -ifneq (,$(findstring MINGW,$(uname_S))) -include config-mingw.mk -else -include config-unix.mk -endif +distclean: + rm -rf out -TESTS=test/echo-server.c test/test-*.c -BENCHMARKS=test/echo-server.c test/dns-server.c test/benchmark-*.c +test: all + ./out/$(BUILDTYPE)/run-tests -all: uv.a test/run-tests test/run-benchmarks +bench: all + ./out/$(BUILDTYPE)/run-benchmarks -$(CARES_OBJS): %.o: %.c - $(CC) -o $*.o -c $(CFLAGS) $(CPPFLAGS) $< -DHAVE_CONFIG_H - -test/run-tests$(E): test/*.h test/run-tests.c $(RUNNER_SRC) test/runner-unix.c $(TESTS) uv.a - $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-tests test/run-tests.c \ - test/runner.c $(RUNNER_SRC) $(TESTS) uv.a $(RUNNER_LIBS) - -test/run-benchmarks$(E): test/*.h test/run-benchmarks.c test/runner.c $(RUNNER_SRC) $(BENCHMARKS) uv.a - $(CC) $(CPPFLAGS) $(RUNNER_CFLAGS) $(RUNNER_LINKFLAGS) -o test/run-benchmarks test/run-benchmarks.c \ - test/runner.c $(RUNNER_SRC) $(BENCHMARKS) uv.a $(RUNNER_LIBS) - -test/echo.o: test/echo.c test/echo.h - $(CC) $(CPPFLAGS) $(CFLAGS) -c test/echo.c -o test/echo.o - - -.PHONY: clean clean-platform distclean distclean-platform test bench - - -test: test/run-tests$(E) - test/run-tests - -#test-%: test/run-tests$(E) -# test/run-tests $(@:test-%=%) - -bench: test/run-benchmarks$(E) - test/run-benchmarks - -#bench-%: test/run-benchmarks$(E) -# test/run-benchmarks $(@:bench-%=%) - -clean: clean-platform - $(RM) -f src/*.o *.a test/run-tests$(E) test/run-benchmarks$(E) - -distclean: distclean-platform - $(RM) -f src/*.o *.a test/run-tests$(E) test/run-benchmarks$(E) +.PHONY: all clean distclean test bench diff --git a/README b/README index 4e2c2cd2..326a346c 100644 --- a/README +++ b/README @@ -4,12 +4,25 @@ all platform differences in this library. http://nodejs.org/ -(This was previously called liboio) += Build Instructions -Supported Platforms: +The build system requires python and subversion. + +On Unix systems just type + + make + +On Windows you can generate the MSVS solution files by running + + create-msvs-files.bat + +Open build/all.sln afterwards. + + += Supported Platforms Microsoft Windows operating systems since Windows XP sp2. It can be built -with either Visual Studio or MinGW. +with either Visual Studio. Linux 2.6 and MacOS using the GCC toolchain. diff --git a/build/all.gyp b/build/all.gyp new file mode 100644 index 00000000..101f8d44 --- /dev/null +++ b/build/all.gyp @@ -0,0 +1,222 @@ +{ + 'target_defaults': { + 'configurations': { + 'Debug': { + 'defines': [ 'DEBUG', '_DEBUG' ] + }, + 'Release': { + 'defines': [ 'NDEBUG' ] + } + } + }, + 'targets': [ + { + 'target_name': 'uv', + 'type': 'static_library', + 'include_dirs': [ '../include' ], + 'direct_dependent_settings': { + 'include_dirs': [ '../include' ], + }, + 'defines': [ + 'HAVE_CONFIG_H' + ], + 'sources': [ + '../src/uv-common.c', + '../src/ares/ares__close_sockets.c', + '../src/ares/ares__get_hostent.c', + '../src/ares/ares__read_line.c', + '../src/ares/ares__timeval.c', + '../src/ares/ares_cancel.c', + '../src/ares/ares_data.c', + '../src/ares/ares_destroy.c', + '../src/ares/ares_expand_name.c', + '../src/ares/ares_expand_string.c', + '../src/ares/ares_fds.c', + '../src/ares/ares_free_hostent.c', + '../src/ares/ares_free_string.c', + '../src/ares/ares_gethostbyaddr.c', + '../src/ares/ares_gethostbyname.c', + '../src/ares/ares_getnameinfo.c', + '../src/ares/ares_getopt.c', + '../src/ares/ares_getsock.c', + '../src/ares/ares_init.c', + '../src/ares/ares_library_init.c', + '../src/ares/ares_llist.c', + '../src/ares/ares_mkquery.c', + '../src/ares/ares_nowarn.c', + '../src/ares/ares_options.c', + '../src/ares/ares_parse_a_reply.c', + '../src/ares/ares_parse_aaaa_reply.c', + '../src/ares/ares_parse_mx_reply.c', + '../src/ares/ares_parse_ns_reply.c', + '../src/ares/ares_parse_ptr_reply.c', + '../src/ares/ares_parse_srv_reply.c', + '../src/ares/ares_parse_txt_reply.c', + '../src/ares/ares_process.c', + '../src/ares/ares_query.c', + '../src/ares/ares_search.c', + '../src/ares/ares_send.c', + '../src/ares/ares_strcasecmp.c', + '../src/ares/ares_strdup.c', + '../src/ares/ares_strerror.c', + '../src/ares/ares_timeout.c', + '../src/ares/ares_version.c', + '../src/ares/ares_writev.c', + '../src/ares/bitncmp.c', + '../src/ares/inet_net_pton.c', + '../src/ares/inet_ntop.c', + ], + 'conditions': [ + [ 'OS=="win"', { + 'include_dirs': [ + '../src/ares/config_win32' + ], + 'sources': [ '../src/ares/windows_port.c' ], + 'defines': [ + '_WIN32_WINNT=0x0502', + 'EIO_STACKSIZE=262144', + '_GNU_SOURCE', + ], + 'sources': [ + '../src/win/async.c', + '../src/win/cares.c', + '../src/win/core.c', + '../src/win/error.c', + '../src/win/getaddrinfo.c', + '../src/win/handle.c', + '../src/win/loop-watcher.c', + '../src/win/pipe.c', + '../src/win/process.c', + '../src/win/req.c', + '../src/win/stdio.c', + '../src/win/stream.c', + '../src/win/tcp.c', + '../src/win/timer.c', + '../src/win/util.c', + ] + }, { # Not Windows i.e. POSIX + 'cflags': [ + '-g', + '--std=gnu89', + '-pedantic', + '-Wall', + '-Wextra', + '-Wno-unused-parameter' + ], + 'sources': [ + '../src/uv-eio.c', + '../src/eio/eio.c', + '../src/uv-unix.c', + '../src/ev/ev.c', + ], + 'include_dirs': [ + '../src/ev' + ], + 'defines': [ + '_LARGEFILE_SOURCE', + '_FILE_OFFSET_BITS=64', + '_GNU_SOURCE', + 'EIO_STACKSIZE=262144' + ], + 'libraries': [ '-lm' ] + }], + [ 'OS=="mac"', { + 'include_dirs': [ '../src/ares/config_darwin' ], + 'sources': [ '../src/uv-darwin.c' ], + 'direct_dependent_settings': { + 'libraries': [ '-framework CoreServices' ], + }, + 'defines': [ + 'EV_CONFIG_H="config_darwin.h"', + 'EIO_CONFIG_H="config_darwin.h"', + ] + }], + [ 'OS=="linux"', { + 'include_dirs': [ '../src/ares/config_linux' ], + 'sources': [ '../src/uv-linux.c' ], + 'defines': [ + 'EV_CONFIG_H="config_linux.h"', + 'EIO_CONFIG_H="config_linux.h"', + ], + 'direct_dependent_settings': { + 'libraries': [ '-lrt' ], + }, + }], + # TODO add OS=='sun' + ] + }, + + { + 'target_name': 'run-tests', + 'type': 'executable', + 'dependencies': [ 'uv' ], + 'sources': [ + '../test/runner.c', + '../test/run-tests.c', + '../test/test-async.c', + '../test/echo-server.c', + '../test/test-callback-stack.c', + '../test/test-connection-fail.c', + '../test/test-delayed-accept.c', + '../test/test-fail-always.c', + '../test/test-get-currentexe.c', + '../test/test-getaddrinfo.c', + '../test/test-gethostbyname.c', + '../test/test-getsockname.c', + '../test/test-hrtime.c', + '../test/test-idle.c', + '../test/test-loop-handles.c', + '../test/test-pass-always.c', + '../test/test-ping-pong.c', + '../test/test-pipe-bind-error.c', + '../test/test-ref.c', + '../test/test-shutdown-eof.c', + '../test/test-spawn.c', + '../test/test-tcp-bind-error.c', + '../test/test-tcp-bind6-error.c', + '../test/test-tcp-writealot.c', + '../test/test-timer-again.c', + '../test/test-timer.c', + ], + 'conditions': [ + [ 'OS=="win"', { + 'sources': [ '../test/runner-win.c' ], + 'libraries': [ 'ws2_32.lib' ] + }, { # POSIX + 'defines': [ '_GNU_SOURCE' ], + 'ldflags': [ '-pthread' ], + 'sources': [ '../test/runner-unix.c' ] + }] + ] + }, + + { + 'target_name': 'run-benchmarks', + 'type': 'executable', + 'dependencies': [ 'uv' ], + 'sources': [ + '../test/runner.c', + '../test/run-benchmarks.c', + '../test/echo-server.c', + '../test/dns-server.c', + '../test/benchmark-ares.c', + '../test/benchmark-getaddrinfo.c', + '../test/benchmark-ping-pongs.c', + '../test/benchmark-pump.c', + '../test/benchmark-sizes.c', + '../test/benchmark-spawn.c' + ], + 'conditions': [ + [ 'OS=="win"', { + 'sources': [ '../test/runner-win.c' ], + 'libraries': [ 'ws2_32.lib' ] + }, { # POSIX + 'defines': [ '_GNU_SOURCE' ], + 'ldflags': [ '-pthread' ], + 'sources': [ '../test/runner-unix.c' ] + }] + ] + } + ] +} + diff --git a/build/gyp_uv b/build/gyp_uv new file mode 100755 index 00000000..e7496973 --- /dev/null +++ b/build/gyp_uv @@ -0,0 +1,42 @@ +#!/usr/bin/python +import glob +import os +import shlex +import sys + +script_dir = os.path.dirname(__file__) +uv_root = os.path.normpath(os.path.join(script_dir, os.pardir)) +print("uv_root " + uv_root) + +sys.path.insert(0, os.path.join(uv_root, 'build', 'gyp', 'pylib')) +import gyp + +# Directory within which we want all generated files (including Makefiles) +# to be written. +output_dir = os.path.join(uv_root, 'out') + + +def run_gyp(args): + rc = gyp.main(args) + if rc != 0: + print 'Error running GYP' + sys.exit(rc) + +if __name__ == '__main__': + args = sys.argv[1:] + + args.append(os.path.join(script_dir, 'all.gyp')) + + args.append('--depth=' + uv_root) + + # There's a bug with windows which doesn't allow this feature. + if sys.platform != 'win32': + + # Tell gyp to write the Makefiles into output_dir + args.extend(['--generator-output', output_dir]) + + # Tell make to write its output into the same dir + args.extend(['-Goutput_dir=' + output_dir]) + + gyp_args = list(args) + run_gyp(gyp_args) diff --git a/config-mingw.mk b/config-mingw.mk deleted file mode 100644 index abd244e3..00000000 --- a/config-mingw.mk +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright Joyent, Inc. and other Node contributors. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. - -# Use make -f Makefile.gcc PREFIX=i686-w64-mingw32- -# for cross compilation -CC = $(PREFIX)gcc -AR = $(PREFIX)ar -E=.exe - -CFLAGS=$(CPPFLAGS) -g --std=gnu89 -D_WIN32_WINNT=0x0501 -Isrc/ares/config_win32 -LINKFLAGS=-lm - -CARES_OBJS += src/ares/windows_port.o -WIN_SRCS=$(wildcard src/win/*.c) -WIN_OBJS=$(WIN_SRCS:.c=.o) - -RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE # Need _GNU_SOURCE for strdup? -RUNNER_LINKFLAGS=$(LINKFLAGS) -RUNNER_LIBS=-lws2_32 -RUNNER_SRC=test/runner-win.c - -uv.a: $(WIN_OBJS) src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS) - $(AR) rcs uv.a src/win/*.o src/uv-common.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS) - -src/win/%.o: src/win/%.c src/win/internal.h - $(CC) $(CFLAGS) -o $@ -c $< - -src/uv-common.o: src/uv-common.c include/uv.h include/uv-win.h - $(CC) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o - -EIO_CPPFLAGS += $(CPPFLAGS) -EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\" -EIO_CPPFLAGS += -DEIO_STACKSIZE=65536 -EIO_CPPFLAGS += -D_GNU_SOURCE - -src/eio/eio.o: src/eio/eio.c - $(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/eio/eio.c -o src/eio/eio.o - -src/uv-eio.o: src/uv-eio.c - $(CC) $(CPPFLAGS) -Isrc/eio/ $(CFLAGS) -c src/uv-eio.c -o src/uv-eio.o - -clean-platform: - -rm -f src/ares/*.o - -rm -f src/eio/*.o - -rm -f src/win/*.o - -distclean-platform: - -rm -f src/ares/*.o - -rm -f src/eio/*.o - -rm -f src/win/*.o diff --git a/config-unix.mk b/config-unix.mk deleted file mode 100644 index 57761091..00000000 --- a/config-unix.mk +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright Joyent, Inc. and other Node contributors. All rights reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. - -CC = $(PREFIX)gcc -AR = $(PREFIX)ar -E= -CSTDFLAG=--std=c89 -pedantic -Wall -Wextra -Wno-unused-parameter -CFLAGS=-g -CPPFLAGS += -Isrc/ev -LINKFLAGS=-lm - -CPPFLAGS += -D_LARGEFILE_SOURCE -CPPFLAGS += -D_FILE_OFFSET_BITS=64 - -ifeq (SunOS,$(uname_S)) -EV_CONFIG=config_sunos.h -EIO_CONFIG=config_sunos.h -CPPFLAGS += -Isrc/ares/config_sunos -D__EXTENSIONS__ -LINKFLAGS+=-lsocket -lnsl -UV_OS_FILE=uv-sunos.c -endif - -ifeq (Darwin,$(uname_S)) -EV_CONFIG=config_darwin.h -EIO_CONFIG=config_darwin.h -CPPFLAGS += -Isrc/ares/config_darwin -LINKFLAGS+=-framework CoreServices -UV_OS_FILE=uv-darwin.c -endif - -ifeq (Linux,$(uname_S)) -EV_CONFIG=config_linux.h -EIO_CONFIG=config_linux.h -CSTDFLAG += -D_XOPEN_SOURCE=600 -CPPFLAGS += -Isrc/ares/config_linux -LINKFLAGS+=-lrt -UV_OS_FILE=uv-linux.c -endif - -ifeq (FreeBSD,$(uname_S)) -EV_CONFIG=config_freebsd.h -EIO_CONFIG=config_freebsd.h -CPPFLAGS += -Isrc/ares/config_freebsd -LINKFLAGS+= -UV_OS_FILE=uv-freebsd.c -endif - -ifneq (,$(findstring CYGWIN,$(uname_S))) -EV_CONFIG=config_cygwin.h -EIO_CONFIG=config_cygwin.h -# We drop the --std=c89, it hides CLOCK_MONOTONIC on cygwin -CSTDFLAG = -D_GNU_SOURCE -CPPFLAGS += -Isrc/ares/config_cygwin -LINKFLAGS+= -UV_OS_FILE=uv-cygwin.c -endif - -# Need _GNU_SOURCE for strdup? -RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE - -RUNNER_LINKFLAGS=$(LINKFLAGS) -pthread -RUNNER_LIBS= -RUNNER_SRC=test/runner-unix.c - -uv.a: src/uv-unix.o src/uv-common.o src/uv-platform.o src/ev/ev.o src/uv-eio.o src/eio/eio.o $(CARES_OBJS) - $(AR) rcs uv.a src/uv-unix.o src/uv-platform.o src/uv-common.o src/uv-eio.o src/ev/ev.o \ - src/eio/eio.o $(CARES_OBJS) - -src/uv-platform.o: src/$(UV_OS_FILE) include/uv.h include/uv-unix.h - $(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c src/$(UV_OS_FILE) -o src/uv-platform.o - -src/uv-unix.o: src/uv-unix.c include/uv.h include/uv-unix.h - $(CC) $(CSTDFLAG) $(CPPFLAGS) -Ieio $(CFLAGS) -c src/uv-unix.c -o src/uv-unix.o - -src/uv-common.o: src/uv-common.c include/uv.h include/uv-unix.h - $(CC) $(CSTDFLAG) $(CPPFLAGS) $(CFLAGS) -c src/uv-common.c -o src/uv-common.o - -src/ev/ev.o: src/ev/ev.c - $(CC) $(CPPFLAGS) $(CFLAGS) -c src/ev/ev.c -o src/ev/ev.o -DEV_CONFIG_H=\"$(EV_CONFIG)\" - - -EIO_CPPFLAGS += $(CPPFLAGS) -EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\" -EIO_CPPFLAGS += -DEIO_STACKSIZE=262144 -EIO_CPPFLAGS += -D_GNU_SOURCE - -src/eio/eio.o: src/eio/eio.c - $(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c src/eio/eio.c -o src/eio/eio.o - -src/uv-eio.o: src/uv-eio.c - $(CC) $(CPPFLAGS) -Isrc/eio/ $(CSTDFLAG) $(CFLAGS) -c src/uv-eio.c -o src/uv-eio.o - - -clean-platform: - -rm -f src/ares/*.o - -rm -f src/ev/*.o - -rm -f src/eio/*.o - -rm -rf test/run-tests.dSYM run-benchmarks.dSYM - -distclean-platform: - -rm -f src/ares/*.o - -rm -f src/ev/*.o - -rm -f src/eio/*.o - -rm -rf test/run-tests.dSYM run-benchmarks.dSYM diff --git a/create-msvs-files.bat b/create-msvs-files.bat new file mode 100644 index 00000000..954ca8e0 --- /dev/null +++ b/create-msvs-files.bat @@ -0,0 +1,14 @@ +@REM Hello World + +cd %~dp0 + +IF EXIST %~dp0build\gyp GOTO WINDIR + + +svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp + +:WINDIR + +@python build\gyp_uv + + diff --git a/include/uv-win.h b/include/uv-win.h index 622bbeab..49d6f511 100644 --- a/include/uv-win.h +++ b/include/uv-win.h @@ -20,7 +20,7 @@ */ #ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0501 +# define _WIN32_WINNT 0x0502 #endif #include diff --git a/msvs/c-ares.vcxproj b/msvs/c-ares.vcxproj deleted file mode 100644 index 0b23fade..00000000 --- a/msvs/c-ares.vcxproj +++ /dev/null @@ -1,189 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Win32Proj - - - - StaticLibrary - true - - - StaticLibrary - true - - - StaticLibrary - false - - - StaticLibrary - false - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - - WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - - - WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - - - MultiThreaded - ..\include;..\src\ares\config_win32 - WIN32;HAVE_CONFIG_H;_LIB;%(PreprocessorDefinitions) - true - true - - - true - - - - - MultiThreaded - ..\include;..\src\ares\config_win32 - WIN32;HAVE_CONFIG_H;_LIB;%(PreprocessorDefinitions) - true - true - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/msvs/libuv-benchmark.vcxproj b/msvs/libuv-benchmark.vcxproj deleted file mode 100644 index f6df7169..00000000 --- a/msvs/libuv-benchmark.vcxproj +++ /dev/null @@ -1,171 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Win32Proj - - - - Application - true - - - Application - true - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - MachineX86 - true - Console - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - true - Console - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - Level3 - ProgramDatabase - ..\include;..\src\ares\config_win32 - true - true - - - MachineX86 - true - Console - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - UseLinkTimeCodeGeneration - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - Level3 - ProgramDatabase - ..\include;..\src\ares\config_win32 - true - true - - - true - Console - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - UseLinkTimeCodeGeneration - - - - - - - - - - - - - - - - - - - - - - - - - {301fe650-cd34-14e5-6b63-42e383fa02bc} - - - - - - \ No newline at end of file diff --git a/msvs/libuv-test.vcxproj b/msvs/libuv-test.vcxproj deleted file mode 100644 index 44b138bd..00000000 --- a/msvs/libuv-test.vcxproj +++ /dev/null @@ -1,187 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Win32Proj - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744} - - - - Application - true - - - Application - true - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - MachineX86 - true - Console - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - true - Console - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - Level3 - ProgramDatabase - ..\include;..\src\ares\config_win32 - true - true - - - MachineX86 - true - Console - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - UseLinkTimeCodeGeneration - - - - - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - Level3 - ProgramDatabase - ..\include;..\src\ares\config_win32 - true - true - - - true - Console - true - true - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;%(AdditionalDependencies) - UseLinkTimeCodeGeneration - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {301fe650-cd34-14e5-6b63-42e383fa02bc} - - - - - - \ No newline at end of file diff --git a/msvs/libuv.sln b/msvs/libuv.sln deleted file mode 100644 index a4eca0a6..00000000 --- a/msvs/libuv.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuv", "libuv.vcxproj", "{301FE650-CD34-14E5-6B63-42E383FA02BC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuv-test", "libuv-test.vcxproj", "{1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuv-benchmark", "libuv-benchmark.vcxproj", "{6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c-ares", "c-ares.vcxproj", "{2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Debug|Win32.ActiveCfg = Debug|Win32 - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Debug|Win32.Build.0 = Debug|Win32 - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Debug|x64.ActiveCfg = Debug|x64 - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Debug|x64.Build.0 = Debug|x64 - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Release|Win32.ActiveCfg = Release|Win32 - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Release|Win32.Build.0 = Release|Win32 - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Release|x64.ActiveCfg = Release|x64 - {301FE650-CD34-14E5-6B63-42E383FA02BC}.Release|x64.Build.0 = Release|x64 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Debug|Win32.ActiveCfg = Debug|Win32 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Debug|Win32.Build.0 = Debug|Win32 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Debug|x64.ActiveCfg = Debug|x64 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Debug|x64.Build.0 = Debug|x64 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Release|Win32.ActiveCfg = Release|Win32 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Release|Win32.Build.0 = Release|Win32 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Release|x64.ActiveCfg = Release|x64 - {1D7C3F6C-A4AF-DD73-2D20-B2FC919B3744}.Release|x64.Build.0 = Release|x64 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Debug|Win32.ActiveCfg = Debug|Win32 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Debug|Win32.Build.0 = Debug|Win32 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Debug|x64.ActiveCfg = Debug|x64 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Debug|x64.Build.0 = Debug|x64 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Release|Win32.ActiveCfg = Release|Win32 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Release|Win32.Build.0 = Release|Win32 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Release|x64.ActiveCfg = Release|x64 - {6CCBDAFD-7A11-133D-357B-E2D2F4C621E4}.Release|x64.Build.0 = Release|x64 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|Win32.ActiveCfg = Debug|Win32 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|Win32.Build.0 = Debug|Win32 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|x64.ActiveCfg = Debug|x64 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Debug|x64.Build.0 = Debug|x64 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|Win32.ActiveCfg = Release|Win32 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|Win32.Build.0 = Release|Win32 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|x64.ActiveCfg = Release|x64 - {2B6A4644-EBA9-DFB5-AF35-6C56EDF05C7F}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/msvs/libuv.vcxproj b/msvs/libuv.vcxproj deleted file mode 100644 index 9d97bf84..00000000 --- a/msvs/libuv.vcxproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Win32Proj - {301FE650-CD34-14E5-6B63-42E383FA02BC} - - - - StaticLibrary - true - - - StaticLibrary - true - - - StaticLibrary - false - - - StaticLibrary - false - - - - - - - - - - - - - - - - - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - $(SolutionDir)..\build\$(Platform)\$(Configuration)\ - - - - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - - - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDebug - Level3 - ProgramDatabase - Disabled - ..\include;..\src\ares\config_win32 - - - - - MultiThreaded - ..\include;..\src\ares\config_win32 - true - true - - - true - - - - - MultiThreaded - ..\include;..\src\ares\config_win32 - true - true - - - true - - - - - {2b6a4644-eba9-dfb5-af35-6c56edf05c7f} - true - true - false - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -