diff --git a/deps/c-ares/freebsd_amd64/ares_build.h b/deps/c-ares/darwin-x86_64/ares_build.h similarity index 100% rename from deps/c-ares/freebsd_amd64/ares_build.h rename to deps/c-ares/darwin-x86_64/ares_build.h diff --git a/deps/c-ares/mac/ares_config.h b/deps/c-ares/darwin-x86_64/ares_config.h similarity index 100% rename from deps/c-ares/mac/ares_config.h rename to deps/c-ares/darwin-x86_64/ares_config.h diff --git a/deps/c-ares/freebsd_amd64/ares_setup.h b/deps/c-ares/darwin-x86_64/ares_setup.h similarity index 100% rename from deps/c-ares/freebsd_amd64/ares_setup.h rename to deps/c-ares/darwin-x86_64/ares_setup.h diff --git a/deps/c-ares/freebsd_i386/ares_build.h b/deps/c-ares/freebsd-x86/ares_build.h similarity index 100% rename from deps/c-ares/freebsd_i386/ares_build.h rename to deps/c-ares/freebsd-x86/ares_build.h diff --git a/deps/c-ares/freebsd_i386/ares_config.h b/deps/c-ares/freebsd-x86/ares_config.h similarity index 100% rename from deps/c-ares/freebsd_i386/ares_config.h rename to deps/c-ares/freebsd-x86/ares_config.h diff --git a/deps/c-ares/freebsd_i386/ares_setup.h b/deps/c-ares/freebsd-x86/ares_setup.h similarity index 100% rename from deps/c-ares/freebsd_i386/ares_setup.h rename to deps/c-ares/freebsd-x86/ares_setup.h diff --git a/deps/c-ares/mac/ares_build.h b/deps/c-ares/freebsd-x86_64/ares_build.h similarity index 100% rename from deps/c-ares/mac/ares_build.h rename to deps/c-ares/freebsd-x86_64/ares_build.h diff --git a/deps/c-ares/freebsd_amd64/ares_config.h b/deps/c-ares/freebsd-x86_64/ares_config.h similarity index 100% rename from deps/c-ares/freebsd_amd64/ares_config.h rename to deps/c-ares/freebsd-x86_64/ares_config.h diff --git a/deps/c-ares/linux/ares_setup.h b/deps/c-ares/freebsd-x86_64/ares_setup.h similarity index 100% rename from deps/c-ares/linux/ares_setup.h rename to deps/c-ares/freebsd-x86_64/ares_setup.h diff --git a/deps/c-ares/linux/ares_build.h b/deps/c-ares/linux-x86/ares_build.h similarity index 100% rename from deps/c-ares/linux/ares_build.h rename to deps/c-ares/linux-x86/ares_build.h diff --git a/deps/c-ares/linux/ares_config.h b/deps/c-ares/linux-x86/ares_config.h similarity index 100% rename from deps/c-ares/linux/ares_config.h rename to deps/c-ares/linux-x86/ares_config.h diff --git a/deps/c-ares/mac/ares_setup.h b/deps/c-ares/linux-x86/ares_setup.h similarity index 100% rename from deps/c-ares/mac/ares_setup.h rename to deps/c-ares/linux-x86/ares_setup.h diff --git a/deps/c-ares/solaris/ares_build.h b/deps/c-ares/sunos-x86/ares_build.h similarity index 100% rename from deps/c-ares/solaris/ares_build.h rename to deps/c-ares/sunos-x86/ares_build.h diff --git a/deps/c-ares/solaris/ares_config.h b/deps/c-ares/sunos-x86/ares_config.h similarity index 100% rename from deps/c-ares/solaris/ares_config.h rename to deps/c-ares/sunos-x86/ares_config.h diff --git a/deps/c-ares/solaris/ares_setup.h b/deps/c-ares/sunos-x86/ares_setup.h similarity index 100% rename from deps/c-ares/solaris/ares_setup.h rename to deps/c-ares/sunos-x86/ares_setup.h diff --git a/deps/c-ares/wscript b/deps/c-ares/wscript index a54be92fe3..9acc41ecfc 100644 --- a/deps/c-ares/wscript +++ b/deps/c-ares/wscript @@ -19,20 +19,7 @@ def build(bld): cares.source = bld.path.ant_glob('*.c') cares.target = 'cares' cares.name = 'cares' - cares.includes = '.' - - if PLATFORM_IS_DARWIN: - cares.includes += ' ./mac/' - elif PLATFORM_IS_LINUX: - cares.includes += ' ./linux/' - elif PLATFORM_IS_SOLARIS: - cares.includes += ' ./solaris/' - elif PLATFORM_IS_FREEBSD: - if MACHINE_IS_AMD64: - cares.includes += ' ./freebsd_amd64/' - elif MACHINE_IS_I386: - cares.includes += ' ./freebsd_i386/' - + cares.includes = '. ./' + bld.env['DEST_OS'] + '-' + bld.env['DEST_CPU'] cares.install_path = None if bld.env["USE_DEBUG"]: cares.clone("debug"); diff --git a/wscript b/wscript index 176ce8d29e..1b5f10722e 100644 --- a/wscript +++ b/wscript @@ -5,7 +5,6 @@ import sys, os, shutil from Utils import cmd_output from os.path import join, dirname, abspath from logging import fatal -import platform cwd = os.getcwd() VERSION="0.1.33" @@ -16,13 +15,6 @@ import js2c srcdir = '.' blddir = 'build' -PLATFORM_IS_DARWIN = platform.platform().find('Darwin') == 0 -PLATFORM_IS_LINUX = platform.platform().find('Linux') == 0 -PLATFORM_IS_SOLARIS = platform.platform().find('Sun') == 0 -PLATFORM_IS_FREEBSD = platform.platform().find('FreeBSD') == 0 -MACHINE_IS_AMD64 = platform.machine().find('amd64') == 0 -MACHINE_IS_I386 = platform.machine().find('i386') == 0 - def set_options(opt): # the gcc module provides a --debug-level option opt.tool_options('compiler_cxx') @@ -311,6 +303,9 @@ def build_v8(bld): bld.install_files('${PREFIX}/include/node/', 'deps/v8/include/*.h') def build(bld): + print "DEST_OS: " + bld.env['DEST_OS'] + print "DEST_CPU: " + bld.env['DEST_CPU'] + if not bld.env["USE_SYSTEM"]: bld.add_subdirs('deps/libeio deps/libev deps/c-ares') build_udns(bld) @@ -443,17 +438,7 @@ def build(bld): deps/coupling """ - if PLATFORM_IS_DARWIN: - node.includes += ' deps/c-ares/mac/' - elif PLATFORM_IS_LINUX: - node.includes += ' deps/c-ares/linux/' - elif PLATFORM_IS_SOLARIS: - node.includes += ' deps/c-ares/solaris/' - elif PLATFORM_IS_FREEBSD: - if MACHINE_IS_AMD64: - node.includes += ' deps/c-ares/freebsd_amd64/' - elif MACHINE_IS_I386: - node.includes += ' deps/c-ares/freebsd_i386/' + node.includes += ' deps/c-ares/' + bld.env['DEST_OS'] + '-' + bld.env['DEST_CPU'] node.add_objects = 'cares ev eio evcom http_parser coupling'