pigpio library

parent 7d730247
Showing with 5047 additions and 2735 deletions
......@@ -41,9 +41,9 @@ all_deps :=
CC.target ?= $(CC)
CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
CFLAGS.target ?= $(CFLAGS)
CXX.target ?= $(CXX)
CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
CXXFLAGS.target ?= $(CXXFLAGS) $(CPPFLAGS)
LINK.target ?= $(LINK)
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
......@@ -54,9 +54,9 @@ LINK ?= $(CXX.target)
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
CC.host ?= gcc
CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
CFLAGS.host ?=
CXX.host ?= g++
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
CXXFLAGS.host ?=
LINK.host ?= $(CXX.host)
LDFLAGS.host ?=
AR.host ?= ar
......@@ -126,52 +126,46 @@ cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $
quiet_cmd_cxx = CXX($(TOOLSET)) $@
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_objc = CXX($(TOOLSET)) $@
cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_objcxx = CXX($(TOOLSET)) $@
cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# Commands for precompiled header files.
quiet_cmd_pch_c = CXX($(TOOLSET)) $@
cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_m = CXX($(TOOLSET)) $@
cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# gyp-mac-tool is written next to the root Makefile by gyp.
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
# already.
quiet_cmd_mac_tool = MACTOOL $(4) $<
cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
quiet_cmd_infoplist = INFOPLIST $@
cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
quiet_cmd_touch = TOUCH $@
cmd_touch = touch $@
quiet_cmd_copy = COPY $@
# send stderr to /dev/null to ignore messages when linking directories.
cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
quiet_cmd_alink = LIBTOOL-STATIC $@
cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
quiet_cmd_alink = AR($(TOOLSET)) $@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
# 2) loadable_module, which is generating a module intended for dlopen().
#
# They differ only slightly:
# In the former case, we want to package all dependent code into the .so.
# In the latter case, we want to package just the API exposed by the
# outermost module.
# This means shared_library uses --whole-archive, while loadable_module doesn't.
# (Note that --whole-archive is incompatible with the --start-group used in
# normal linking.)
# Other shared-object link notes:
# - Set SONAME to the library filename so our binaries don't reference
# the local, absolute paths used on the link command-line.
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
# Define an escape_quotes function to escape single quotes.
......@@ -236,7 +230,7 @@ define do_cmd
$(if $(or $(command_changed),$(prereq_changed)),
@$(call exact_echo, $($(quiet)cmd_$(1)))
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
$(if $(findstring flock,$(word 2,$(cmd_$1))),
$(if $(findstring flock,$(word 1,$(cmd_$1))),
@$(cmd_$(1))
@echo " $(quiet_cmd_$(1)): Finished",
@$(cmd_$(1))
......@@ -274,10 +268,6 @@ $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
......@@ -292,10 +282,6 @@ $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
......@@ -309,10 +295,6 @@ $(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
......@@ -326,8 +308,8 @@ ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
endif
quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/scollado/proyecto-micro/node_modules/epoll/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/scollado/.node-gyp/6.11.3/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/scollado/.node-gyp/6.11.3" "-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/scollado/.node-gyp/6.11.3/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/scollado/proyecto-micro/node_modules/epoll" "-Dnode_engine=v8" binding.gyp
Makefile: $(srcdir)/../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../.node-gyp/6.11.3/include/node/common.gypi
cmd_regen_makefile = cd $(srcdir); /usr/share/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/pi/proyecto-micro/node_modules/epoll/build/config.gypi -I/usr/share/node-gyp/addon.gypi -I/usr/include/nodejs/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/usr/include/nodejs" "-Dnode_gyp_dir=/usr/share/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/home/pi/proyecto-micro/node_modules/epoll" binding.gyp
Makefile: $(srcdir)/../../../../../usr/include/nodejs/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../usr/share/node-gyp/addon.gypi
$(call do_cmd,regen_makefile)
# "all" is a concatenation of the "all" targets from all the included
......
cmd_Release/epoll.node := c++ -bundle -undefined dynamic_lookup -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./Release -o Release/epoll.node Release/obj.target/epoll/src/epoll.o
cmd_Release/epoll.node := ln -f "Release/obj.target/epoll.node" "Release/epoll.node" 2>/dev/null || (rm -rf "Release/epoll.node" && cp -af "Release/obj.target/epoll.node" "Release/epoll.node")
cmd_Release/obj.target/epoll.node := g++ -shared -pthread -rdynamic -Wl,-soname=epoll.node -o Release/obj.target/epoll.node -Wl,--start-group Release/obj.target/epoll/src/epoll.o -Wl,--end-group
cmd_Release/obj.target/epoll/src/epoll.o := c++ '-DNODE_GYP_MODULE_NAME=epoll' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/epoll/src/epoll.o.d.raw -c -o Release/obj.target/epoll/src/epoll.o ../src/epoll.cc
Release/obj.target/epoll/src/epoll.o: ../src/epoll.cc
cmd_Release/obj.target/epoll/src/epoll.o := g++ '-DNODE_GYP_MODULE_NAME=epoll' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -I../../nan -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-deprecated-declarations -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/epoll/src/epoll.o.d.raw -c -o Release/obj.target/epoll/src/epoll.o ../src/epoll.cc
Release/obj.target/epoll/src/epoll.o: ../src/epoll.cc \
/usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h \
/usr/include/nodejs/deps/v8/include/v8.h \
/usr/include/nodejs/deps/v8/include/v8-version.h \
/usr/include/nodejs/deps/v8/include/v8config.h \
/usr/include/nodejs/src/node.h /usr/include/nodejs/src/node_version.h \
/usr/include/nodejs/src/node_object_wrap.h \
/usr/include/nodejs/src/node_version.h ../../nan/nan.h \
/usr/include/nodejs/src/node_buffer.h /usr/include/nodejs/src/node.h \
../../nan/nan_callbacks.h ../../nan/nan_callbacks_12_inl.h \
../../nan/nan_maybe_43_inl.h ../../nan/nan_converters.h \
../../nan/nan_converters_43_inl.h ../../nan/nan_new.h \
../../nan/nan_implementation_12_inl.h ../../nan/nan_persistent_12_inl.h \
../../nan/nan_weak.h ../../nan/nan_object_wrap.h ../../nan/nan_private.h \
../../nan/nan_typedarray_contents.h ../../nan/nan_json.h ../src/epoll.h
../src/epoll.cc:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
/usr/include/nodejs/deps/v8/include/v8.h:
/usr/include/nodejs/deps/v8/include/v8-version.h:
/usr/include/nodejs/deps/v8/include/v8config.h:
/usr/include/nodejs/src/node.h:
/usr/include/nodejs/src/node_version.h:
/usr/include/nodejs/src/node_object_wrap.h:
/usr/include/nodejs/src/node_version.h:
../../nan/nan.h:
/usr/include/nodejs/src/node_buffer.h:
/usr/include/nodejs/src/node.h:
../../nan/nan_callbacks.h:
../../nan/nan_callbacks_12_inl.h:
../../nan/nan_maybe_43_inl.h:
../../nan/nan_converters.h:
../../nan/nan_converters_43_inl.h:
../../nan/nan_new.h:
../../nan/nan_implementation_12_inl.h:
../../nan/nan_persistent_12_inl.h:
../../nan/nan_weak.h:
../../nan/nan_object_wrap.h:
../../nan/nan_private.h:
../../nan/nan_typedarray_contents.h:
../../nan/nan_json.h:
../src/epoll.h:
......@@ -8,37 +8,31 @@
"libraries": []
},
"variables": {
"arm_float_abi": "hard",
"arm_fpu": "vfp",
"arm_thumb": 0,
"arm_version": "6",
"asan": 0,
"coverage": "false",
"debug_devtools": "node",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_data_file": "icudt58l.dat",
"icu_data_in": "../../deps/icu-small/source/data/in/icudt58l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_locales": "en,root",
"icu_path": "deps/icu-small",
"icu_small": "true",
"icu_ver_major": "58",
"llvm_version": 0,
"host_arch": "arm",
"icu_gyp_path": "tools/icu/icu-system.gyp",
"icu_small": "false",
"node_byteorder": "little",
"node_enable_d8": "false",
"node_enable_v8_vtunejit": "false",
"node_install_npm": "true",
"node_module_version": 48,
"node_no_browser_globals": "false",
"node_prefix": "/usr/local",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_install_npm": "false",
"node_module_version": 46,
"node_prefix": "/usr",
"node_release_urlbase": "",
"node_shared": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_shared_libuv": "true",
"node_shared_openssl": "true",
"node_shared_zlib": "true",
"node_tag": "",
"node_use_bundled_v8": "true",
"node_use_dtrace": "true",
"node_use_dtrace": "false",
"node_use_etw": "false",
"node_use_lttng": "false",
"node_use_openssl": "true",
......@@ -46,130 +40,101 @@
"node_use_v8_platform": "true",
"openssl_fips": "",
"openssl_no_asm": 0,
"shlib_suffix": "48.dylib",
"target_arch": "x64",
"shlib_suffix": "so.46",
"target_arch": "arm",
"uv_parent_path": "/deps/uv/",
"uv_use_dtrace": "true",
"uv_use_dtrace": "false",
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_inspector": "true",
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 0,
"v8_random_seed": 0,
"v8_use_snapshot": "true",
"want_separate_host_toolset": 0,
"xcode_version": "7.0",
"nodedir": "/Users/scollado/.node-gyp/6.11.3",
"nodedir": "/usr/include/nodejs",
"copy_dev_lib": "true",
"standalone_static_library": 1,
"dry_run": "",
"legacy_bundling": "",
"save_dev": "",
"browser": "",
"commit_hooks": "true",
"only": "",
"viewer": "man",
"also": "",
"rollback": "true",
"usage": "",
"globalignorefile": "/usr/local/etc/npmignore",
"init_author_url": "",
"maxsockets": "50",
"shell": "/bin/bash",
"metrics_registry": "https://registry.npmjs.org/",
"parseable": "",
"shrinkwrap": "true",
"init_license": "ISC",
"timing": "",
"if_present": "",
"cache_max": "Infinity",
"init_author_email": "",
"cache_lock_stale": "60000",
"sign_git_tag": "",
"cert": "",
"git_tag_version": "true",
"local_address": "",
"long": "",
"fetch_retries": "2",
"registry": "https://registry.npmjs.org/",
"key": "",
"message": "%s",
"versions": "",
"globalconfig": "/usr/local/etc/npmrc",
"user_agent": "npm/1.4.21 node/v4.8.2 linux arm",
"always_auth": "",
"logs_max": "10",
"prefer_online": "",
"cache_lock_retries": "10",
"global_style": "",
"heading": "npm",
"fetch_retry_mintimeout": "10000",
"offline": "",
"read_only": "",
"searchlimit": "20",
"access": "",
"json": "",
"allow_same_version": "",
"bin_links": "true",
"key": "",
"description": "true",
"engine_strict": "",
"https_proxy": "",
"init_module": "/Users/scollado/.npm-init.js",
"userconfig": "/Users/scollado/.npmrc",
"cidr": "",
"node_version": "6.11.3",
"fetch_retries": "2",
"heading": "npm",
"user": "",
"auth_type": "legacy",
"editor": "vi",
"ignore_prepublish": "",
"save": "true",
"script_shell": "",
"tag": "latest",
"global": "",
"progress": "true",
"ham_it_up": "",
"optional": "true",
"searchstaleness": "900",
"bin_links": "true",
"force": "",
"save_prod": "",
"searchopts": "",
"cache_min": "10",
"init_license": "ISC",
"editor": "vi",
"rollback": "true",
"cache_max": "Infinity",
"userconfig": "/home/pi/.npmrc",
"engine_strict": "",
"init_author_name": "",
"init_author_url": "",
"tmp": "/tmp",
"depth": "Infinity",
"save_dev": "",
"usage": "",
"https_proxy": "",
"onload_script": "",
"rebuild_bundle": "true",
"sso_poll_frequency": "500",
"unicode": "true",
"save_bundle": "",
"shell": "/bin/bash",
"prefix": "/usr/local",
"registry": "https://registry.npmjs.org/",
"__DO_NOT_MODIFY_THIS_FILE___use__etc_npmrc_instead_": "true",
"browser": "",
"cache_lock_wait": "10000",
"save_optional": "",
"searchopts": "",
"versions": "",
"cache": "/home/pi/.npm",
"ignore_scripts": "",
"searchsort": "name",
"version": "",
"local_address": "",
"viewer": "man",
"color": "true",
"fetch_retry_mintimeout": "10000",
"umask": "18",
"fetch_retry_maxtimeout": "60000",
"message": "%s",
"ca": "",
"save_prefix": "^",
"scripts_prepend_node_path": "warn-only",
"sso_type": "oauth",
"strict_ssl": "true",
"tag_version_prefix": "v",
"dev": "",
"cert": "",
"global": "",
"link": "",
"save": "",
"unicode": "true",
"long": "",
"production": "",
"unsafe_perm": "true",
"node_version": "4.8.2",
"tag": "latest",
"git_tag_version": "true",
"shrinkwrap": "true",
"fetch_retry_factor": "10",
"group": "20",
"npat": "",
"proprietary_attribs": "true",
"save_exact": "",
"cache_lock_stale": "60000",
"prefer_offline": "",
"version": "",
"cache_min": "10",
"otp": "",
"cache": "/Users/scollado/.npm",
"strict_ssl": "true",
"username": "",
"globalconfig": "/etc/npmrc",
"dev": "",
"init_module": "/home/pi/.npm-init.js",
"parseable": "",
"globalignorefile": "/etc/npmignore",
"cache_lock_retries": "10",
"save_prefix": "^",
"group": "1000",
"init_author_email": "",
"searchexclude": "",
"color": "true",
"package_lock": "true",
"save_optional": "",
"user_agent": "npm/5.5.1 node/v6.11.3 darwin x64",
"ignore_scripts": "",
"cache_lock_wait": "10000",
"production": "",
"save_bundle": "",
"send_metrics": "",
"init_version": "1.0.0",
"umask": "0022",
"scope": "",
"git": "git",
"init_author_name": "",
"onload_script": "",
"tmp": "/var/folders/sf/4jq4y1ys2gn1nsjs0r5f_bbc0000gn/T",
"unsafe_perm": "true",
"prefix": "/usr/local",
"link": ""
"optional": "true",
"email": "",
"json": "",
"spin": "true"
}
}
......@@ -7,7 +7,6 @@ DEFS_Debug := \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_DARWIN_USE_64_BIT_INODE=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DBUILDING_NODE_EXTENSION' \
......@@ -16,38 +15,30 @@ DEFS_Debug := \
# Flags passed to all source files.
CFLAGS_Debug := \
-O0 \
-gdwarf-2 \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-fPIC \
-pthread \
-Wall \
-Wendif-labels \
-W \
-Wno-unused-parameter
-Wextra \
-Wno-unused-parameter \
-Wno-unused-local-typedefs \
-Wno-deprecated-declarations \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug := \
-fno-strict-aliasing
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-std=gnu++0x \
-fno-rtti \
-fno-exceptions \
-fno-threadsafe-statics \
-fno-strict-aliasing
# Flags passed to only ObjC files.
CFLAGS_OBJC_Debug :=
# Flags passed to only ObjC++ files.
CFLAGS_OBJCC_Debug :=
-std=gnu++0x
INCS_Debug := \
-I/Users/scollado/.node-gyp/6.11.3/include/node \
-I/Users/scollado/.node-gyp/6.11.3/src \
-I/Users/scollado/.node-gyp/6.11.3/deps/uv/include \
-I/Users/scollado/.node-gyp/6.11.3/deps/v8/include \
-I/usr/include/nodejs/include/node \
-I/usr/include/nodejs/src \
-I/usr/include/nodejs/deps/uv/include \
-I/usr/include/nodejs/deps/v8/include \
-I$(srcdir)/../nan
DEFS_Release := \
......@@ -55,45 +46,38 @@ DEFS_Release := \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_DARWIN_USE_64_BIT_INODE=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DBUILDING_NODE_EXTENSION'
# Flags passed to all source files.
CFLAGS_Release := \
-Os \
-gdwarf-2 \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-fPIC \
-pthread \
-Wall \
-Wendif-labels \
-W \
-Wno-unused-parameter
-Wextra \
-Wno-unused-parameter \
-Wno-unused-local-typedefs \
-Wno-deprecated-declarations \
-O3 \
-ffunction-sections \
-fdata-sections \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release := \
-fno-strict-aliasing
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-std=gnu++0x \
-fno-rtti \
-fno-exceptions \
-fno-threadsafe-statics \
-fno-strict-aliasing
# Flags passed to only ObjC files.
CFLAGS_OBJC_Release :=
# Flags passed to only ObjC++ files.
CFLAGS_OBJCC_Release :=
-std=gnu++0x
INCS_Release := \
-I/Users/scollado/.node-gyp/6.11.3/include/node \
-I/Users/scollado/.node-gyp/6.11.3/src \
-I/Users/scollado/.node-gyp/6.11.3/deps/uv/include \
-I/Users/scollado/.node-gyp/6.11.3/deps/v8/include \
-I/usr/include/nodejs/include/node \
-I/usr/include/nodejs/src \
-I/usr/include/nodejs/deps/uv/include \
-I/usr/include/nodejs/deps/v8/include \
-I$(srcdir)/../nan
OBJS := \
......@@ -107,8 +91,6 @@ all_deps += $(OBJS)
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
......@@ -126,48 +108,35 @@ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-L$(builddir)
LIBTOOLFLAGS_Debug := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first
-pthread \
-rdynamic
LDFLAGS_Release := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-L$(builddir)
LIBTOOLFLAGS_Release := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first
-pthread \
-rdynamic
LIBS :=
$(builddir)/epoll.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(builddir)/epoll.node: LIBS := $(LIBS)
$(builddir)/epoll.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))
$(builddir)/epoll.node: TOOLSET := $(TOOLSET)
$(builddir)/epoll.node: $(OBJS) FORCE_DO_CMD
$(obj).target/epoll.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/epoll.node: LIBS := $(LIBS)
$(obj).target/epoll.node: TOOLSET := $(TOOLSET)
$(obj).target/epoll.node: $(OBJS) FORCE_DO_CMD
$(call do_cmd,solink_module)
all_deps += $(builddir)/epoll.node
all_deps += $(obj).target/epoll.node
# Add target alias
.PHONY: epoll
epoll: $(builddir)/epoll.node
# Copy this to the executable output path.
$(builddir)/epoll.node: TOOLSET := $(TOOLSET)
$(builddir)/epoll.node: $(obj).target/epoll.node FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/epoll.node
# Short alias for building this executable.
.PHONY: epoll.node
epoll.node: $(builddir)/epoll.node
epoll.node: $(obj).target/epoll.node $(builddir)/epoll.node
# Add executable to "all" target.
.PHONY: all
......
#!/usr/bin/env python
# Generated by gyp. Do not edit.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
"""
import fcntl
import fnmatch
import glob
import json
import os
import plistlib
import re
import shutil
import string
import subprocess
import sys
import tempfile
def main(args):
executor = MacTool()
exit_code = executor.Dispatch(args)
if exit_code is not None:
sys.exit(exit_code)
class MacTool(object):
"""This class performs all the Mac tooling steps. The methods can either be
executed directly, or dispatched from an argument list."""
def Dispatch(self, args):
"""Dispatches a string command to a method."""
if len(args) < 1:
raise Exception("Not enough arguments")
method = "Exec%s" % self._CommandifyName(args[0])
return getattr(self, method)(*args[1:])
def _CommandifyName(self, name_string):
"""Transforms a tool name like copy-info-plist to CopyInfoPlist"""
return name_string.title().replace('-', '')
def ExecCopyBundleResource(self, source, dest, convert_to_binary):
"""Copies a resource file to the bundle/Resources directory, performing any
necessary compilation on each resource."""
extension = os.path.splitext(source)[1].lower()
if os.path.isdir(source):
# Copy tree.
# TODO(thakis): This copies file attributes like mtime, while the
# single-file branch below doesn't. This should probably be changed to
# be consistent with the single-file branch.
if os.path.exists(dest):
shutil.rmtree(dest)
shutil.copytree(source, dest)
elif extension == '.xib':
return self._CopyXIBFile(source, dest)
elif extension == '.storyboard':
return self._CopyXIBFile(source, dest)
elif extension == '.strings':
self._CopyStringsFile(source, dest, convert_to_binary)
else:
shutil.copy(source, dest)
def _CopyXIBFile(self, source, dest):
"""Compiles a XIB file with ibtool into a binary plist in the bundle."""
# ibtool sometimes crashes with relative paths. See crbug.com/314728.
base = os.path.dirname(os.path.realpath(__file__))
if os.path.relpath(source):
source = os.path.join(base, source)
if os.path.relpath(dest):
dest = os.path.join(base, dest)
args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices',
'--output-format', 'human-readable-text', '--compile', dest, source]
ibtool_section_re = re.compile(r'/\*.*\*/')
ibtool_re = re.compile(r'.*note:.*is clipping its content')
ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
current_section_header = None
for line in ibtoolout.stdout:
if ibtool_section_re.match(line):
current_section_header = line
elif not ibtool_re.match(line):
if current_section_header:
sys.stdout.write(current_section_header)
current_section_header = None
sys.stdout.write(line)
return ibtoolout.returncode
def _ConvertToBinary(self, dest):
subprocess.check_call([
'xcrun', 'plutil', '-convert', 'binary1', '-o', dest, dest])
def _CopyStringsFile(self, source, dest, convert_to_binary):
"""Copies a .strings file using iconv to reconvert the input into UTF-16."""
input_code = self._DetectInputEncoding(source) or "UTF-8"
# Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call
# CFPropertyListCreateFromXMLData() behind the scenes; at least it prints
# CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
# semicolon in dictionary.
# on invalid files. Do the same kind of validation.
import CoreFoundation
s = open(source, 'rb').read()
d = CoreFoundation.CFDataCreate(None, s, len(s))
_, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None)
if error:
return
fp = open(dest, 'wb')
fp.write(s.decode(input_code).encode('UTF-16'))
fp.close()
if convert_to_binary == 'True':
self._ConvertToBinary(dest)
def _DetectInputEncoding(self, file_name):
"""Reads the first few bytes from file_name and tries to guess the text
encoding. Returns None as a guess if it can't detect it."""
fp = open(file_name, 'rb')
try:
header = fp.read(3)
except e:
fp.close()
return None
fp.close()
if header.startswith("\xFE\xFF"):
return "UTF-16"
elif header.startswith("\xFF\xFE"):
return "UTF-16"
elif header.startswith("\xEF\xBB\xBF"):
return "UTF-8"
else:
return None
def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys):
"""Copies the |source| Info.plist to the destination directory |dest|."""
# Read the source Info.plist into memory.
fd = open(source, 'r')
lines = fd.read()
fd.close()
# Insert synthesized key/value pairs (e.g. BuildMachineOSBuild).
plist = plistlib.readPlistFromString(lines)
if keys:
plist = dict(plist.items() + json.loads(keys[0]).items())
lines = plistlib.writePlistToString(plist)
# Go through all the environment variables and replace them as variables in
# the file.
IDENT_RE = re.compile(r'[/\s]')
for key in os.environ:
if key.startswith('_'):
continue
evar = '${%s}' % key
evalue = os.environ[key]
lines = string.replace(lines, evar, evalue)
# Xcode supports various suffices on environment variables, which are
# all undocumented. :rfc1034identifier is used in the standard project
# template these days, and :identifier was used earlier. They are used to
# convert non-url characters into things that look like valid urls --
# except that the replacement character for :identifier, '_' isn't valid
# in a URL either -- oops, hence :rfc1034identifier was born.
evar = '${%s:identifier}' % key
evalue = IDENT_RE.sub('_', os.environ[key])
lines = string.replace(lines, evar, evalue)
evar = '${%s:rfc1034identifier}' % key
evalue = IDENT_RE.sub('-', os.environ[key])
lines = string.replace(lines, evar, evalue)
# Remove any keys with values that haven't been replaced.
lines = lines.split('\n')
for i in range(len(lines)):
if lines[i].strip().startswith("<string>${"):
lines[i] = None
lines[i - 1] = None
lines = '\n'.join(filter(lambda x: x is not None, lines))
# Write out the file with variables replaced.
fd = open(dest, 'w')
fd.write(lines)
fd.close()
# Now write out PkgInfo file now that the Info.plist file has been
# "compiled".
self._WritePkgInfo(dest)
if convert_to_binary == 'True':
self._ConvertToBinary(dest)
def _WritePkgInfo(self, info_plist):
"""This writes the PkgInfo file from the data stored in Info.plist."""
plist = plistlib.readPlist(info_plist)
if not plist:
return
# Only create PkgInfo for executable types.
package_type = plist['CFBundlePackageType']
if package_type != 'APPL':
return
# The format of PkgInfo is eight characters, representing the bundle type
# and bundle signature, each four characters. If that is missing, four
# '?' characters are used instead.
signature_code = plist.get('CFBundleSignature', '????')
if len(signature_code) != 4: # Wrong length resets everything, too.
signature_code = '?' * 4
dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo')
fp = open(dest, 'w')
fp.write('%s%s' % (package_type, signature_code))
fp.close()
def ExecFlock(self, lockfile, *cmd_list):
"""Emulates the most basic behavior of Linux's flock(1)."""
# Rely on exception handling to report errors.
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
fcntl.flock(fd, fcntl.LOCK_EX)
return subprocess.call(cmd_list)
def ExecFilterLibtool(self, *cmd_list):
"""Calls libtool and filters out '/path/to/libtool: file: foo.o has no
symbols'."""
libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$')
libtool_re5 = re.compile(
r'^.*libtool: warning for library: ' +
r'.* the table of contents is empty ' +
r'\(no object file members in the library define global symbols\)$')
env = os.environ.copy()
# Ref:
# http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c
# The problem with this flag is that it resets the file mtime on the file to
# epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone.
env['ZERO_AR_DATE'] = '1'
libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env)
_, err = libtoolout.communicate()
for line in err.splitlines():
if not libtool_re.match(line) and not libtool_re5.match(line):
print >>sys.stderr, line
# Unconditionally touch the output .a file on the command line if present
# and the command succeeded. A bit hacky.
if not libtoolout.returncode:
for i in range(len(cmd_list) - 1):
if cmd_list[i] == "-o" and cmd_list[i+1].endswith('.a'):
os.utime(cmd_list[i+1], None)
break
return libtoolout.returncode
def ExecPackageFramework(self, framework, version):
"""Takes a path to Something.framework and the Current version of that and
sets up all the symlinks."""
# Find the name of the binary based on the part before the ".framework".
binary = os.path.basename(framework).split('.')[0]
CURRENT = 'Current'
RESOURCES = 'Resources'
VERSIONS = 'Versions'
if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)):
# Binary-less frameworks don't seem to contain symlinks (see e.g.
# chromium's out/Debug/org.chromium.Chromium.manifest/ bundle).
return
# Move into the framework directory to set the symlinks correctly.
pwd = os.getcwd()
os.chdir(framework)
# Set up the Current version.
self._Relink(version, os.path.join(VERSIONS, CURRENT))
# Set up the root symlinks.
self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary)
self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES)
# Back to where we were before!
os.chdir(pwd)
def _Relink(self, dest, link):
"""Creates a symlink to |dest| named |link|. If |link| already exists,
it is overwritten."""
if os.path.lexists(link):
os.remove(link)
os.symlink(dest, link)
def ExecCompileXcassets(self, keys, *inputs):
"""Compiles multiple .xcassets files into a single .car file.
This invokes 'actool' to compile all the inputs .xcassets files. The
|keys| arguments is a json-encoded dictionary of extra arguments to
pass to 'actool' when the asset catalogs contains an application icon
or a launch image.
Note that 'actool' does not create the Assets.car file if the asset
catalogs does not contains imageset.
"""
command_line = [
'xcrun', 'actool', '--output-format', 'human-readable-text',
'--compress-pngs', '--notices', '--warnings', '--errors',
]
is_iphone_target = 'IPHONEOS_DEPLOYMENT_TARGET' in os.environ
if is_iphone_target:
platform = os.environ['CONFIGURATION'].split('-')[-1]
if platform not in ('iphoneos', 'iphonesimulator'):
platform = 'iphonesimulator'
command_line.extend([
'--platform', platform, '--target-device', 'iphone',
'--target-device', 'ipad', '--minimum-deployment-target',
os.environ['IPHONEOS_DEPLOYMENT_TARGET'], '--compile',
os.path.abspath(os.environ['CONTENTS_FOLDER_PATH']),
])
else:
command_line.extend([
'--platform', 'macosx', '--target-device', 'mac',
'--minimum-deployment-target', os.environ['MACOSX_DEPLOYMENT_TARGET'],
'--compile',
os.path.abspath(os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH']),
])
if keys:
keys = json.loads(keys)
for key, value in keys.iteritems():
arg_name = '--' + key
if isinstance(value, bool):
if value:
command_line.append(arg_name)
elif isinstance(value, list):
for v in value:
command_line.append(arg_name)
command_line.append(str(v))
else:
command_line.append(arg_name)
command_line.append(str(value))
# Note: actool crashes if inputs path are relative, so use os.path.abspath
# to get absolute path name for inputs.
command_line.extend(map(os.path.abspath, inputs))
subprocess.check_call(command_line)
def ExecMergeInfoPlist(self, output, *inputs):
"""Merge multiple .plist files into a single .plist file."""
merged_plist = {}
for path in inputs:
plist = self._LoadPlistMaybeBinary(path)
self._MergePlist(merged_plist, plist)
plistlib.writePlist(merged_plist, output)
def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning):
"""Code sign a bundle.
This function tries to code sign an iOS bundle, following the same
algorithm as Xcode:
1. copy ResourceRules.plist from the user or the SDK into the bundle,
2. pick the provisioning profile that best match the bundle identifier,
and copy it into the bundle as embedded.mobileprovision,
3. copy Entitlements.plist from user or SDK next to the bundle,
4. code sign the bundle.
"""
resource_rules_path = self._InstallResourceRules(resource_rules)
substitutions, overrides = self._InstallProvisioningProfile(
provisioning, self._GetCFBundleIdentifier())
entitlements_path = self._InstallEntitlements(
entitlements, substitutions, overrides)
subprocess.check_call([
'codesign', '--force', '--sign', key, '--resource-rules',
resource_rules_path, '--entitlements', entitlements_path,
os.path.join(
os.environ['TARGET_BUILD_DIR'],
os.environ['FULL_PRODUCT_NAME'])])
def _InstallResourceRules(self, resource_rules):
"""Installs ResourceRules.plist from user or SDK into the bundle.
Args:
resource_rules: string, optional, path to the ResourceRules.plist file
to use, default to "${SDKROOT}/ResourceRules.plist"
Returns:
Path to the copy of ResourceRules.plist into the bundle.
"""
source_path = resource_rules
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['CONTENTS_FOLDER_PATH'],
'ResourceRules.plist')
if not source_path:
source_path = os.path.join(
os.environ['SDKROOT'], 'ResourceRules.plist')
shutil.copy2(source_path, target_path)
return target_path
def _InstallProvisioningProfile(self, profile, bundle_identifier):
"""Installs embedded.mobileprovision into the bundle.
Args:
profile: string, optional, short name of the .mobileprovision file
to use, if empty or the file is missing, the best file installed
will be used
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
Returns:
A tuple containing two dictionary: variables substitutions and values
to overrides when generating the entitlements file.
"""
source_path, provisioning_data, team_id = self._FindProvisioningProfile(
profile, bundle_identifier)
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['CONTENTS_FOLDER_PATH'],
'embedded.mobileprovision')
shutil.copy2(source_path, target_path)
substitutions = self._GetSubstitutions(bundle_identifier, team_id + '.')
return substitutions, provisioning_data['Entitlements']
def _FindProvisioningProfile(self, profile, bundle_identifier):
"""Finds the .mobileprovision file to use for signing the bundle.
Checks all the installed provisioning profiles (or if the user specified
the PROVISIONING_PROFILE variable, only consult it) and select the most
specific that correspond to the bundle identifier.
Args:
profile: string, optional, short name of the .mobileprovision file
to use, if empty or the file is missing, the best file installed
will be used
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
Returns:
A tuple of the path to the selected provisioning profile, the data of
the embedded plist in the provisioning profile and the team identifier
to use for code signing.
Raises:
SystemExit: if no .mobileprovision can be used to sign the bundle.
"""
profiles_dir = os.path.join(
os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles')
if not os.path.isdir(profiles_dir):
print >>sys.stderr, (
'cannot find mobile provisioning for %s' % bundle_identifier)
sys.exit(1)
provisioning_profiles = None
if profile:
profile_path = os.path.join(profiles_dir, profile + '.mobileprovision')
if os.path.exists(profile_path):
provisioning_profiles = [profile_path]
if not provisioning_profiles:
provisioning_profiles = glob.glob(
os.path.join(profiles_dir, '*.mobileprovision'))
valid_provisioning_profiles = {}
for profile_path in provisioning_profiles:
profile_data = self._LoadProvisioningProfile(profile_path)
app_id_pattern = profile_data.get(
'Entitlements', {}).get('application-identifier', '')
for team_identifier in profile_data.get('TeamIdentifier', []):
app_id = '%s.%s' % (team_identifier, bundle_identifier)
if fnmatch.fnmatch(app_id, app_id_pattern):
valid_provisioning_profiles[app_id_pattern] = (
profile_path, profile_data, team_identifier)
if not valid_provisioning_profiles:
print >>sys.stderr, (
'cannot find mobile provisioning for %s' % bundle_identifier)
sys.exit(1)
# If the user has multiple provisioning profiles installed that can be
# used for ${bundle_identifier}, pick the most specific one (ie. the
# provisioning profile whose pattern is the longest).
selected_key = max(valid_provisioning_profiles, key=lambda v: len(v))
return valid_provisioning_profiles[selected_key]
def _LoadProvisioningProfile(self, profile_path):
"""Extracts the plist embedded in a provisioning profile.
Args:
profile_path: string, path to the .mobileprovision file
Returns:
Content of the plist embedded in the provisioning profile as a dictionary.
"""
with tempfile.NamedTemporaryFile() as temp:
subprocess.check_call([
'security', 'cms', '-D', '-i', profile_path, '-o', temp.name])
return self._LoadPlistMaybeBinary(temp.name)
def _MergePlist(self, merged_plist, plist):
"""Merge |plist| into |merged_plist|."""
for key, value in plist.iteritems():
if isinstance(value, dict):
merged_value = merged_plist.get(key, {})
if isinstance(merged_value, dict):
self._MergePlist(merged_value, value)
merged_plist[key] = merged_value
else:
merged_plist[key] = value
else:
merged_plist[key] = value
def _LoadPlistMaybeBinary(self, plist_path):
"""Loads into a memory a plist possibly encoded in binary format.
This is a wrapper around plistlib.readPlist that tries to convert the
plist to the XML format if it can't be parsed (assuming that it is in
the binary format).
Args:
plist_path: string, path to a plist file, in XML or binary format
Returns:
Content of the plist as a dictionary.
"""
try:
# First, try to read the file using plistlib that only supports XML,
# and if an exception is raised, convert a temporary copy to XML and
# load that copy.
return plistlib.readPlist(plist_path)
except:
pass
with tempfile.NamedTemporaryFile() as temp:
shutil.copy2(plist_path, temp.name)
subprocess.check_call(['plutil', '-convert', 'xml1', temp.name])
return plistlib.readPlist(temp.name)
def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix):
"""Constructs a dictionary of variable substitutions for Entitlements.plist.
Args:
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
app_identifier_prefix: string, value for AppIdentifierPrefix
Returns:
Dictionary of substitutions to apply when generating Entitlements.plist.
"""
return {
'CFBundleIdentifier': bundle_identifier,
'AppIdentifierPrefix': app_identifier_prefix,
}
def _GetCFBundleIdentifier(self):
"""Extracts CFBundleIdentifier value from Info.plist in the bundle.
Returns:
Value of CFBundleIdentifier in the Info.plist located in the bundle.
"""
info_plist_path = os.path.join(
os.environ['TARGET_BUILD_DIR'],
os.environ['INFOPLIST_PATH'])
info_plist_data = self._LoadPlistMaybeBinary(info_plist_path)
return info_plist_data['CFBundleIdentifier']
def _InstallEntitlements(self, entitlements, substitutions, overrides):
"""Generates and install the ${BundleName}.xcent entitlements file.
Expands variables "$(variable)" pattern in the source entitlements file,
add extra entitlements defined in the .mobileprovision file and the copy
the generated plist to "${BundlePath}.xcent".
Args:
entitlements: string, optional, path to the Entitlements.plist template
to use, defaults to "${SDKROOT}/Entitlements.plist"
substitutions: dictionary, variable substitutions
overrides: dictionary, values to add to the entitlements
Returns:
Path to the generated entitlements file.
"""
source_path = entitlements
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['PRODUCT_NAME'] + '.xcent')
if not source_path:
source_path = os.path.join(
os.environ['SDKROOT'],
'Entitlements.plist')
shutil.copy2(source_path, target_path)
data = self._LoadPlistMaybeBinary(target_path)
data = self._ExpandVariables(data, substitutions)
if overrides:
for key in overrides:
if key not in data:
data[key] = overrides[key]
plistlib.writePlist(data, target_path)
return target_path
def _ExpandVariables(self, data, substitutions):
"""Expands variables "$(variable)" in data.
Args:
data: object, can be either string, list or dictionary
substitutions: dictionary, variable substitutions to perform
Returns:
Copy of data where each references to "$(variable)" has been replaced
by the corresponding value found in substitutions, or left intact if
the key was not found.
"""
if isinstance(data, str):
for key, value in substitutions.iteritems():
data = data.replace('$(%s)' % key, value)
return data
if isinstance(data, list):
return [self._ExpandVariables(v, substitutions) for v in data]
if isinstance(data, dict):
return {k: self._ExpandVariables(data[k], substitutions) for k in data}
return data
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
0.6.3 / Nov 04 2017
===================
* suppress deprecated-declaration warnings
* document node 9 support
0.6.2 / Sep 18 2017
===================
* document necessity for root privileges
* update dependencies (bindings@1.3.0, nan@2.7.0)
* allow initialize to be called after terminate has been called [#34](https://github.com/fivdi/pigpio/issues/34)
0.6.1 / Jul 15 2017
===================
* improve documentation
0.6.0 / Jun 10 2017
===================
* allow socket port number to be configured with configureSocketPort
0.5.1 / Apr 13 2017
===================
* fix test script
0.5.0 / Apr 13 2017
===================
* hardwareRevision API
* nan v2.6.2
0.4.0 / Sep 24 2016
===================
* example: measure distance with a HC-SR04 ultrasonic sensor
* initialize and terminate added to public API
* nan v2.4.0
* document initialize and terminate
0.3.4 / May 15 2016
===================
* installation instructions updated
0.3.3 / May 04 2016
===================
* nan v2.3.2
0.3.2 / Feb 21 2016
===================
* notifier-leak-check now functions correctly
* notifier example
0.3.1 / Feb 21 2016
===================
* document notification streams
* documentation tweaks
* notifier-leak-check added
0.3.0 / Feb 14 2016
===================
* upgrade to nan v2.2.0
* alerts
0.2.0 / Dec 13 2015
===================
* trigger pulse generation
* banked gpio
0.1.3 / Dec 05 2015
===================
* prevent Nan::ErrnoException related segmentation faults in v0.10.29
0.1.2 / Dec 05 2015
===================
* include errno.h for node v0.10.29
0.1.1 / Nov 28 2015
===================
* document dependency on V41 or higher of the pigpio C library
0.1.0 / Nov 28 2015
===================
* export Gpio constructor as exports.Gpio
* high precision notifications with Notifier
* hardware pwm support
* renamed analogWrite to pwmWrite
* clock configuration with configureClock
* notification pipe size set to 1048576
* notification stress test
0.0.8 / Nov 08 2015
===================
* allow PWM range control with pwmRange, getPwmRange, getPwmRealRange
* allow pwm frequency control with pwmFrequency, and getPwmFrequency
* pwm tests
* pinMode renamed to mode
* getPinMode renamed to getMode
0.0.7 / Nov 03 2015
===================
* fixed version in package.json (v0.0.5 -> v0.0.7)
* v0.0.6 was never published on npm
0.0.6 / Nov 03 2015
===================
* constants MIN_GPIO, MAX_GPIO, and MAX_USER_GPIO added
* mode tests
* multiple interrupt sources test
* allow access to PWM duty cycle with getPwmDutyCycle
* allow access to servo pulse width with getServoPulseWidth
* servo control test
0.0.5 / Nov 03 2015
===================
* documentation improved
* tick argument for interrupt event removed
* fixed getPinMode bug
* gpio-info example
0.0.4 / Nov 02 2015
===================
* documentation, tests, and examples improved
* gpio argument for interrupt event removed
* simple servo example
0.0.3 / Nov 01 2015
===================
* enableInterrupt timeout argument made optional
* interrupt timeout integration tests
0.0.2 / Nov 01 2015
===================
* integration tests
* documentation
0.0.1 / Oct 31 2015
===================
* interrupt support with gpioSetISRFunc
* throw errors when pigpio c interface returns errors
* export Gpio constructor rather than pigpio c interface
* simple examples
0.0.0 / Oct 14 2015
===================
* minimalistic pigpio api
The MIT License (MIT)
Copyright (c) 2015 fivdi
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.
# pigpio
A wrapper for the [pigpio C library](https://github.com/joan2937/pigpio) to
enable fast GPIO, PWM, servo control, state change notification and interrupt
handling with **Node.js** on the Raspberry Pi Zero, 1, 2 or 3.
pigpio supports Node.js versions 0.10, 0.12, 4, 5, 6, 7, 8 and 9.
## Contents
* [Features](https://github.com/fivdi/pigpio#features)
* [Installation](https://github.com/fivdi/pigpio#installation)
* [Usage](https://github.com/fivdi/pigpio#usage)
* [Pulse an LED with PWM](https://github.com/fivdi/pigpio#pulse-an-led-with-pwm)
* [Buttons and interrupt handling](https://github.com/fivdi/pigpio#buttons-and-interrupt-handling)
* [Servo control](https://github.com/fivdi/pigpio#servo-control)
* [Measure distance with a HC-SR04 ultrasonic sensor](https://github.com/fivdi/pigpio#measure-distance-with-a-hc-sr04-ultrasonic-sensor)
* [Determine the width of a pulse with alerts](https://github.com/fivdi/pigpio#determine-the-width-of-a-pulse-with-alerts)
* [API documentation](https://github.com/fivdi/pigpio#api-documentation)
* [Performance](https://github.com/fivdi/pigpio#performance)
* [Limitations](https://github.com/fivdi/pigpio#limitations)
* [Related packages](https://github.com/fivdi/pigpio#related-packages)
## Features
* Digital IO
* Up to 2.1 million digital reads per second <sup>*)</sup>
* Up to 2.3 million digital writes per second <sup>*)</sup>
* PWM on any of GPIOs 0 through 31
* Multiple frequencies and duty cycle ranges supported
* Servo control on any of GPIOs 0 through 31
* Jitter free
* Alerts when any of GPIOs 0 through 31 change state
* The time of the state change is available accurate to a few microseconds
* Notification streams for monitoring state changes on any of GPIOs 0 through 31 concurrently
* The time of the state changes are available accurate to a few microseconds
* Low latency interrupt handlers
* Handle up to 20000 interrupts per second <sup>*)</sup>
* Read or write up to 32 GPIOs as one operation with banked GPIO
* Trigger pulse generation
* Pull up/down resistor configuration
*) On a Raspberry Pi 3 Model B V1.2 running at 1.2 GHz ([Performance](https://github.com/fivdi/pigpio#performance))
## Installation
#### Step 1 - Install the pigpio C library
The pigpio Node.js package requires the pigpio C library V41 or higher.
Raspbian Jessie 2016-05-10 or newer comes with the pigpio C library
pre-installed so it need not be manually installed.
Raspbian Jessie Lite 2016-05-10 or newer does not come with the pigpio C
library pre-installed so it must be manually installed with the following
commands:
```
sudo apt-get update
sudo apt-get install pigpio
```
The pigpio C library contains a number of utilities. One of these utilities
is pigpiod which launches the pigpio C library as a daemon. This utility
should not be used as the pigpio Node.js package uses the C library directly.
Installation instructions for the pigpio C library on versions of Raspbian
prior to 2016-05-10 can be found
[here](http://abyz.co.uk/rpi/pigpio/download.html).
#### Step 2 - Install the pigpio Node.js package
```
npm install pigpio
```
If you're using Node.js v4 or higher and seeing lots of compile errors when
installing pigpio, it's very likely that gcc/g++ 4.8 or higher are not
installed. See
[Node.js v4 and native addons](https://github.com/fivdi/onoff/wiki/Node.js-v4-and-native-addons)
for details.
If you're using Node.js v0.10.29 and seeing a compile error saying that
`‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’` see
[Node.js v0.10.29 and native addons on the Raspberry Pi](https://github.com/fivdi/onoff/wiki/Node.js-v0.10.29-and-native-addons-on-the-Raspberry-Pi).
## Usage
Assume there's an LED connected to GPIO17 (pin 11) and a momentary push button
connected to GPIO4 (pin 7).
<img src="https://raw.githubusercontent.com/fivdi/pigpio/master/example/led-button.png">
#### Pulse an LED with PWM
Use PWM to pulse the LED connected to GPIO17 from fully off to fully on
continuously.
```js
var Gpio = require('pigpio').Gpio,
led = new Gpio(17, {mode: Gpio.OUTPUT}),
dutyCycle = 0;
setInterval(function () {
led.pwmWrite(dutyCycle);
dutyCycle += 5;
if (dutyCycle > 255) {
dutyCycle = 0;
}
}, 20);
```
#### Buttons and interrupt handling
Turn the LED connected to GPIO17 on when the momentary push button connected to
GPIO4 is pressed. Turn the LED off when the button is released.
```js
var Gpio = require('pigpio').Gpio,
button = new Gpio(4, {
mode: Gpio.INPUT,
pullUpDown: Gpio.PUD_DOWN,
edge: Gpio.EITHER_EDGE
}),
led = new Gpio(17, {mode: Gpio.OUTPUT});
button.on('interrupt', function (level) {
led.digitalWrite(level);
});
```
#### Servo control
Continuously move a servo connected to GPIO10 clockwise and anti-clockwise.
<img src="https://raw.githubusercontent.com/fivdi/pigpio/master/example/servo.png">
```js
var Gpio = require('pigpio').Gpio,
motor = new Gpio(10, {mode: Gpio.OUTPUT}),
pulseWidth = 1000,
increment = 100;
setInterval(function () {
motor.servoWrite(pulseWidth);
pulseWidth += increment;
if (pulseWidth >= 2000) {
increment = -100;
} else if (pulseWidth <= 1000) {
increment = 100;
}
}, 1000);
```
#### Measure distance with a HC-SR04 ultrasonic sensor
The `trigger` function can be used to generate a pulse on a GPIO and alerts can
be used to determine the time of a GPIO state change accurate to a few
microseconds. These two features can be combined to measure distance using a
HC-SR04 ultrasonic sensor.
<img src="https://raw.githubusercontent.com/fivdi/pigpio/master/example/distance-hc-sr04.png">
```js
var Gpio = require('pigpio').Gpio,
trigger = new Gpio(23, {mode: Gpio.OUTPUT}),
echo = new Gpio(24, {mode: Gpio.INPUT, alert: true});
// The number of microseconds it takes sound to travel 1cm at 20 degrees celcius
var MICROSECDONDS_PER_CM = 1e6/34321;
trigger.digitalWrite(0); // Make sure trigger is low
(function () {
var startTick;
echo.on('alert', function (level, tick) {
var endTick,
diff;
if (level == 1) {
startTick = tick;
} else {
endTick = tick;
diff = (endTick >> 0) - (startTick >> 0); // Unsigned 32 bit arithmetic
console.log(diff / 2 / MICROSECDONDS_PER_CM);
}
});
}());
// Trigger a distance measurement once per second
setInterval(function () {
trigger.trigger(10, 1); // Set trigger high for 10 microseconds
}, 1000);
```
#### Determine the width of a pulse with alerts
Alerts can be used to determine the time of a GPIO state change accurate to a
few microseconds. Typically, alerts will be used for GPIO inputs but they can
also be used for outputs. In this example, the `trigger` method is used to
pulse the LED connected to GPIO17 on for 15 microseconds once per second.
Alerts are used to measure the length of the pulse.
```js
// Assumption: the LED is off when the program is started
var Gpio = require('pigpio').Gpio,
led = new Gpio(17, {
mode: Gpio.OUTPUT,
alert: true
});
(function () {
var startTick;
// Use alerts to determine how long the LED was turned on
led.on('alert', function (level, tick) {
var endTick,
diff;
if (level == 1) {
startTick = tick;
} else {
endTick = tick;
diff = (endTick >> 0) - (startTick >> 0); // Unsigned 32 bit arithmetic
console.log(diff);
}
});
}());
// Turn the LED on for 15 microseconds once per second
setInterval(function () {
led.trigger(15, 1);
}, 1000);
```
Here's an example of the typical output to the console:
```
15
15
15
15
15
15
20
15
15
15
15
```
## API documentation
### Classes
- [Gpio](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md) - General Purpose Input Output
- [GpioBank](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md) - Banked General Purpose Input Output
- [Notifier](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md) - Notification Stream
### Configuring pigpio
- [Configuration](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md) - pigpio configuration
## Performance
Three of the pigpio tests are used to monitor performance:
* digital-read-performance.js - determine max. no. of digitalRead ops per second
* digital-write-performance.js - determine max. no. of digitalWrite ops per second
* isr-performance.js - determine max. no. of interrupts per second
The average of ten runs of these tests are shown in the table below.
Name | Pi 2 | Pi 3
:--- | :--- | :---
Pi Model | Raspberry Pi 2 Model B V1.1 | Raspberry Pi 3 Model B V1.2
OS | Raspbian Jessie 2016-02-09 | Raspbian Jessie 2016-02-26
Kernel | 4.1.17-v7+ | 4.1.18-v7+
Node.js | v5.6.0 armv7l | v5.7.0 armv7l
pigpio | v0.3.0 | v0.3.2
pigpio C library | V45 | V47
Reads per second | 1,232,588 | 2,129,221
Writes per second | 1,323,039 | 2,336,157
Interrupts per second | 8,881 | 20,533
## Limitations
* The pigpio Node.js package is a wrapper for the
[pigpio C library](https://github.com/joan2937/pigpio). A limitation of the
pigpio C library is that it can only be used by a single running process.
* The pigpio C library and therefore the pigpio Node.js package requires
root/sudo privileges to access hardware peripherals.
## Related packages
- [onoff](https://github.com/fivdi/onoff) - GPIO access and interrupt detection
- [i2c-bus](https://github.com/fivdi/i2c-bus) - I2C serial bus access
- [spi-device](https://github.com/fivdi/spi-device) - SPI serial bus access
- [mcp-spi-adc](https://github.com/fivdi/mcp-spi-adc) - Analog to digital conversion with the MCP3002/4/8, MCP3202/4/8 and MCP3304
- [pigpio-mock](https://github.com/deepsyx/pigpio-mock) - A pigpio mock library for development on your local machine
{
"targets": [{
"target_name": "pigpio",
"conditions": [[
"OS == \"linux\"", {
"cflags": [
"-Wno-unused-local-typedefs",
"-Wno-deprecated-declarations"
]
}]
],
"include_dirs" : [
"<!(node -e \"require('nan')\")"
],
"sources": [
"./src/pigpio.cc"
],
"link_settings": {
"libraries": [
"-lpigpio"
]
}
}]
}
# We borrow heavily from the kernel build setup, though we are simpler since
# we don't have Kconfig tweaking settings on us.
# The implicit make rules have it looking for RCS files, among other things.
# We instead explicitly write all the rules we care about.
# It's even quicker (saves ~200ms) to pass -r on the command line.
MAKEFLAGS=-r
# The source directory tree.
srcdir := ..
abs_srcdir := $(abspath $(srcdir))
# The name of the builddir.
builddir_name ?= .
# The V=1 flag on command line makes us verbosely print command lines.
ifdef V
quiet=
else
quiet=quiet_
endif
# Specify BUILDTYPE=Release on the command line for a release build.
BUILDTYPE ?= Release
# Directory all our build output goes into.
# Note that this must be two directories beneath src/ for unit tests to pass,
# as they reach into the src/ directory for data with relative paths.
builddir ?= $(builddir_name)/$(BUILDTYPE)
abs_builddir := $(abspath $(builddir))
depsdir := $(builddir)/.deps
# Object output directory.
obj := $(builddir)/obj
abs_obj := $(abspath $(obj))
# We build up a list of every single one of the targets so we can slurp in the
# generated dependency rule Makefiles in one pass.
all_deps :=
CC.target ?= $(CC)
CFLAGS.target ?= $(CFLAGS)
CXX.target ?= $(CXX)
CXXFLAGS.target ?= $(CXXFLAGS) $(CPPFLAGS)
LINK.target ?= $(LINK)
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
# C++ apps need to be linked with g++.
LINK ?= $(CXX.target)
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
CC.host ?= gcc
CFLAGS.host ?=
CXX.host ?= g++
CXXFLAGS.host ?=
LINK.host ?= $(CXX.host)
LDFLAGS.host ?=
AR.host ?= ar
# Define a dir function that can handle spaces.
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
# "leading spaces cannot appear in the text of the first argument as written.
# These characters can be put into the argument value by variable substitution."
empty :=
space := $(empty) $(empty)
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
replace_spaces = $(subst $(space),?,$1)
unreplace_spaces = $(subst ?,$(space),$1)
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
# Flags to make gcc output dependency info. Note that you need to be
# careful here to use the flags that ccache and distcc can understand.
# We write to a dep file on the side first and then rename at the end
# so we can't end up with a broken dep file.
depfile = $(depsdir)/$(call replace_spaces,$@).d
DEPFLAGS = -MMD -MF $(depfile).raw
# We have to fixup the deps output in a few ways.
# (1) the file output should mention the proper .o file.
# ccache or distcc lose the path to the target, so we convert a rule of
# the form:
# foobar.o: DEP1 DEP2
# into
# path/to/foobar.o: DEP1 DEP2
# (2) we want missing files not to cause us to fail to build.
# We want to rewrite
# foobar.o: DEP1 DEP2 \
# DEP3
# to
# DEP1:
# DEP2:
# DEP3:
# so if the files are missing, they're just considered phony rules.
# We have to do some pretty insane escaping to get those backslashes
# and dollar signs past make, the shell, and sed at the same time.
# Doesn't work with spaces, but that's fine: .d files have spaces in
# their names replaced with other characters.
define fixup_dep
# The depfile may not exist if the input file didn't have any #includes.
touch $(depfile).raw
# Fixup path as in (1).
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
# Add extra rules as in (2).
# We remove slashes and replace spaces with new lines;
# remove blank lines;
# delete the first line and append a colon to the remaining lines.
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
grep -v '^$$' |\
sed -e 1d -e 's|$$|:|' \
>> $(depfile)
rm $(depfile).raw
endef
# Command definitions:
# - cmd_foo is the actual command to run;
# - quiet_cmd_foo is the brief-output summary of the command.
quiet_cmd_cc = CC($(TOOLSET)) $@
cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_cxx = CXX($(TOOLSET)) $@
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_touch = TOUCH $@
cmd_touch = touch $@
quiet_cmd_copy = COPY $@
# send stderr to /dev/null to ignore messages when linking directories.
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
quiet_cmd_alink = AR($(TOOLSET)) $@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
# 2) loadable_module, which is generating a module intended for dlopen().
#
# They differ only slightly:
# In the former case, we want to package all dependent code into the .so.
# In the latter case, we want to package just the API exposed by the
# outermost module.
# This means shared_library uses --whole-archive, while loadable_module doesn't.
# (Note that --whole-archive is incompatible with the --start-group used in
# normal linking.)
# Other shared-object link notes:
# - Set SONAME to the library filename so our binaries don't reference
# the local, absolute paths used on the link command-line.
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
# Define an escape_quotes function to escape single quotes.
# This allows us to handle quotes properly as long as we always use
# use single quotes and escape_quotes.
escape_quotes = $(subst ','\'',$(1))
# This comment is here just to include a ' to unconfuse syntax highlighting.
# Define an escape_vars function to escape '$' variable syntax.
# This allows us to read/write command lines with shell variables (e.g.
# $LD_LIBRARY_PATH), without triggering make substitution.
escape_vars = $(subst $$,$$$$,$(1))
# Helper that expands to a shell command to echo a string exactly as it is in
# make. This uses printf instead of echo because printf's behaviour with respect
# to escape sequences is more portable than echo's across different shells
# (e.g., dash, bash).
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
# Helper to compare the command we're about to run against the command
# we logged the last time we ran the command. Produces an empty
# string (false) when the commands match.
# Tricky point: Make has no string-equality test function.
# The kernel uses the following, but it seems like it would have false
# positives, where one string reordered its arguments.
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
# $(filter-out $(cmd_$@), $(cmd_$(1))))
# We instead substitute each for the empty string into the other, and
# say they're equal if both substitutions produce the empty string.
# .d files contain ? instead of spaces, take that into account.
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
# Helper that is non-empty when a prerequisite changes.
# Normally make does this implicitly, but we force rules to always run
# so we can check their command lines.
# $? -- new prerequisites
# $| -- order-only dependencies
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
# Helper that executes all postbuilds until one fails.
define do_postbuilds
@E=0;\
for p in $(POSTBUILDS); do\
eval $$p;\
E=$$?;\
if [ $$E -ne 0 ]; then\
break;\
fi;\
done;\
if [ $$E -ne 0 ]; then\
rm -rf "$@";\
exit $$E;\
fi
endef
# do_cmd: run a command via the above cmd_foo names, if necessary.
# Should always run for a given target to handle command-line changes.
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
# Third argument, if non-zero, makes it do POSTBUILDS processing.
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
# spaces already and dirx strips the ? characters.
define do_cmd
$(if $(or $(command_changed),$(prereq_changed)),
@$(call exact_echo, $($(quiet)cmd_$(1)))
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
$(if $(findstring flock,$(word 1,$(cmd_$1))),
@$(cmd_$(1))
@echo " $(quiet_cmd_$(1)): Finished",
@$(cmd_$(1))
)
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
@$(if $(2),$(fixup_dep))
$(if $(and $(3), $(POSTBUILDS)),
$(call do_postbuilds)
)
)
endef
# Declare the "all" target first so it is the default,
# even though we don't have the deps yet.
.PHONY: all
all:
# make looks for ways to re-generate included makefiles, but in our case, we
# don't have a direct way. Explicitly telling make that it has nothing to do
# for them makes it go faster.
%.d: ;
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
# do_cmd.
.PHONY: FORCE_DO_CMD
FORCE_DO_CMD:
TOOLSET := target
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
@$(call do_cmd,cc,1)
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
$(findstring $(join ^,$(prefix)),\
$(join ^,pigpio.target.mk)))),)
include pigpio.target.mk
endif
quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /usr/share/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/pi/proyecto-micro/node_modules/pigpio/build/config.gypi -I/usr/share/node-gyp/addon.gypi -I/usr/include/nodejs/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/usr/include/nodejs" "-Dnode_gyp_dir=/usr/share/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/home/pi/proyecto-micro/node_modules/pigpio" binding.gyp
Makefile: $(srcdir)/../../../../../usr/include/nodejs/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../usr/share/node-gyp/addon.gypi
$(call do_cmd,regen_makefile)
# "all" is a concatenation of the "all" targets from all the included
# sub-makefiles. This is just here to clarify.
all:
# Add in dependency-tracking rules. $(all_deps) is the list of every single
# target in our tree. Only consider the ones with .d (dependency) info:
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
ifneq ($(d_files),)
include $(d_files)
endif
cmd_Release/obj.target/pigpio.node := g++ -shared -pthread -rdynamic -Wl,-soname=pigpio.node -o Release/obj.target/pigpio.node -Wl,--start-group Release/obj.target/pigpio/src/pigpio.o -Wl,--end-group -lpigpio
cmd_Release/obj.target/pigpio/src/pigpio.o := g++ '-DNODE_GYP_MODULE_NAME=pigpio' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -I../../nan -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-deprecated-declarations -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/pigpio/src/pigpio.o.d.raw -c -o Release/obj.target/pigpio/src/pigpio.o ../src/pigpio.cc
Release/obj.target/pigpio/src/pigpio.o: ../src/pigpio.cc ../../nan/nan.h \
/usr/include/nodejs/src/node_version.h \
/usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h \
/usr/include/nodejs/src/node.h /usr/include/nodejs/deps/v8/include/v8.h \
/usr/include/nodejs/deps/v8/include/v8-version.h \
/usr/include/nodejs/deps/v8/include/v8config.h \
/usr/include/nodejs/src/node_version.h \
/usr/include/nodejs/src/node_buffer.h /usr/include/nodejs/src/node.h \
/usr/include/nodejs/src/node_object_wrap.h ../../nan/nan_callbacks.h \
../../nan/nan_callbacks_12_inl.h ../../nan/nan_maybe_43_inl.h \
../../nan/nan_converters.h ../../nan/nan_converters_43_inl.h \
../../nan/nan_new.h ../../nan/nan_implementation_12_inl.h \
../../nan/nan_persistent_12_inl.h ../../nan/nan_weak.h \
../../nan/nan_object_wrap.h ../../nan/nan_private.h \
../../nan/nan_typedarray_contents.h ../../nan/nan_json.h
../src/pigpio.cc:
../../nan/nan.h:
/usr/include/nodejs/src/node_version.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
/usr/include/nodejs/src/node.h:
/usr/include/nodejs/deps/v8/include/v8.h:
/usr/include/nodejs/deps/v8/include/v8-version.h:
/usr/include/nodejs/deps/v8/include/v8config.h:
/usr/include/nodejs/src/node_version.h:
/usr/include/nodejs/src/node_buffer.h:
/usr/include/nodejs/src/node.h:
/usr/include/nodejs/src/node_object_wrap.h:
../../nan/nan_callbacks.h:
../../nan/nan_callbacks_12_inl.h:
../../nan/nan_maybe_43_inl.h:
../../nan/nan_converters.h:
../../nan/nan_converters_43_inl.h:
../../nan/nan_new.h:
../../nan/nan_implementation_12_inl.h:
../../nan/nan_persistent_12_inl.h:
../../nan/nan_weak.h:
../../nan/nan_object_wrap.h:
../../nan/nan_private.h:
../../nan/nan_typedarray_contents.h:
../../nan/nan_json.h:
cmd_Release/pigpio.node := ln -f "Release/obj.target/pigpio.node" "Release/pigpio.node" 2>/dev/null || (rm -rf "Release/pigpio.node" && cp -af "Release/obj.target/pigpio.node" "Release/pigpio.node")
# This file is generated by gyp; do not edit.
export builddir_name ?= ./build/.
.PHONY: all
all:
$(MAKE) pigpio
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"arm_float_abi": "hard",
"arm_fpu": "vfp",
"arm_thumb": 0,
"arm_version": "6",
"asan": 0,
"coverage": "false",
"force_dynamic_crt": 0,
"host_arch": "arm",
"icu_gyp_path": "tools/icu/icu-system.gyp",
"icu_small": "false",
"node_byteorder": "little",
"node_enable_d8": "false",
"node_enable_v8_vtunejit": "false",
"node_install_npm": "false",
"node_module_version": 46,
"node_prefix": "/usr",
"node_release_urlbase": "",
"node_shared": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "true",
"node_shared_openssl": "true",
"node_shared_zlib": "true",
"node_tag": "",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "false",
"node_use_lttng": "false",
"node_use_openssl": "true",
"node_use_perfctr": "false",
"node_use_v8_platform": "true",
"openssl_fips": "",
"openssl_no_asm": 0,
"shlib_suffix": "so.46",
"target_arch": "arm",
"uv_parent_path": "/deps/uv/",
"uv_use_dtrace": "false",
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 0,
"v8_random_seed": 0,
"v8_use_snapshot": "true",
"want_separate_host_toolset": 0,
"nodedir": "/usr/include/nodejs",
"copy_dev_lib": "true",
"standalone_static_library": 1,
"cache_lock_stale": "60000",
"sign_git_tag": "",
"user_agent": "npm/1.4.21 node/v4.8.2 linux arm",
"always_auth": "",
"bin_links": "true",
"key": "",
"description": "true",
"fetch_retries": "2",
"heading": "npm",
"user": "",
"force": "",
"cache_min": "10",
"init_license": "ISC",
"editor": "vi",
"rollback": "true",
"cache_max": "Infinity",
"userconfig": "/home/pi/.npmrc",
"engine_strict": "",
"init_author_name": "",
"init_author_url": "",
"tmp": "/tmp",
"depth": "Infinity",
"save_dev": "",
"usage": "",
"https_proxy": "",
"onload_script": "",
"rebuild_bundle": "true",
"save_bundle": "",
"shell": "/bin/bash",
"prefix": "/usr/local",
"registry": "https://registry.npmjs.org/",
"__DO_NOT_MODIFY_THIS_FILE___use__etc_npmrc_instead_": "true",
"browser": "",
"cache_lock_wait": "10000",
"save_optional": "",
"searchopts": "",
"versions": "",
"cache": "/home/pi/.npm",
"ignore_scripts": "",
"searchsort": "name",
"version": "",
"local_address": "",
"viewer": "man",
"color": "true",
"fetch_retry_mintimeout": "10000",
"umask": "18",
"fetch_retry_maxtimeout": "60000",
"message": "%s",
"ca": "",
"cert": "",
"global": "",
"link": "",
"save": "",
"unicode": "true",
"long": "",
"production": "",
"unsafe_perm": "true",
"node_version": "4.8.2",
"tag": "latest",
"git_tag_version": "true",
"shrinkwrap": "true",
"fetch_retry_factor": "10",
"npat": "",
"proprietary_attribs": "true",
"save_exact": "",
"strict_ssl": "true",
"username": "",
"globalconfig": "/etc/npmrc",
"dev": "",
"init_module": "/home/pi/.npm-init.js",
"parseable": "",
"globalignorefile": "/etc/npmignore",
"cache_lock_retries": "10",
"save_prefix": "^",
"group": "1000",
"init_author_email": "",
"searchexclude": "",
"git": "git",
"optional": "true",
"email": "",
"json": "",
"spin": "true"
}
}
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := pigpio
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=pigpio' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DBUILDING_NODE_EXTENSION' \
'-DDEBUG' \
'-D_DEBUG'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-Wno-unused-local-typedefs \
-Wno-deprecated-declarations \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-fno-rtti \
-fno-exceptions \
-std=gnu++0x
INCS_Debug := \
-I/usr/include/nodejs/include/node \
-I/usr/include/nodejs/src \
-I/usr/include/nodejs/deps/uv/include \
-I/usr/include/nodejs/deps/v8/include \
-I$(srcdir)/../nan
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=pigpio' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DBUILDING_NODE_EXTENSION'
# Flags passed to all source files.
CFLAGS_Release := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-Wno-unused-local-typedefs \
-Wno-deprecated-declarations \
-O3 \
-ffunction-sections \
-fdata-sections \
-fno-omit-frame-pointer
# Flags passed to only C files.
CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-fno-rtti \
-fno-exceptions \
-std=gnu++0x
INCS_Release := \
-I/usr/include/nodejs/include/node \
-I/usr/include/nodejs/src \
-I/usr/include/nodejs/deps/uv/include \
-I/usr/include/nodejs/deps/v8/include \
-I$(srcdir)/../nan
OBJS := \
$(obj).target/$(TARGET)/src/pigpio.o
# Add to the list of files we specially track dependencies for.
all_deps += $(OBJS)
# CFLAGS et al overrides must be target-local.
# See "Target-specific Variable Values" in the GNU Make manual.
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
# Try building from generated source, too.
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD
@$(call do_cmd,cxx,1)
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-pthread \
-rdynamic
LDFLAGS_Release := \
-pthread \
-rdynamic
LIBS := \
-lpigpio
$(obj).target/pigpio.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/pigpio.node: LIBS := $(LIBS)
$(obj).target/pigpio.node: TOOLSET := $(TOOLSET)
$(obj).target/pigpio.node: $(OBJS) FORCE_DO_CMD
$(call do_cmd,solink_module)
all_deps += $(obj).target/pigpio.node
# Add target alias
.PHONY: pigpio
pigpio: $(builddir)/pigpio.node
# Copy this to the executable output path.
$(builddir)/pigpio.node: TOOLSET := $(TOOLSET)
$(builddir)/pigpio.node: $(obj).target/pigpio.node FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/pigpio.node
# Short alias for building this executable.
.PHONY: pigpio.node
pigpio.node: $(obj).target/pigpio.node $(builddir)/pigpio.node
# Add executable to "all" target.
.PHONY: all
all: $(builddir)/pigpio.node
## Configuration
The configuration functions can be used to control aspects of pigpio such as
C library initialization, C library termination and the sample rate for
alerts. Many applications will not need to use the configuration functions as
the default behavior will suffice.
#### Functions
- [hardwareRevision()](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#hardwarerevision)
- [initialize()](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#initialize)
- [terminate()](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#terminate)
- [configureClock(microseconds, peripheral)](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#configureclockmicroseconds-peripheral)
- [configureSocketPort(port)](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#configuresocketportport)
#### Constants
- [CLOCK_PWM](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#clock_pwm)
- [CLOCK_PCM](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#clock_pcm)
### Functions
#### hardwareRevision()
Returns the Raspberry Pi hardware revision as an unsigned integer. Returns 0
if the hardware revision can not be determined.
The following program can be used to print the hardware revision of a
Raspberry Pi in HEX.
```js
var pigpio = require('pigpio');
console.log('Hardware Revision: ' + pigpio.hardwareRevision().toString(16));
```
For further details related to Raspberry Pi hardware revisions see
[here](http://elinux.org/RPi_HardwareHistory) and
[here](https://github.com/joan2937/pigpio#gpio).
#### initialize()
Initialize the pigpio C library.
In most applications it will not be necessary to call the `initialize` and
`terminate` functions directly as they are indirectly called automatically.
There is however an exception to this rule. If a Node.js application uses
[signal events](https://nodejs.org/dist/latest/docs/api/process.html#process_signal_events),
initialization and termination of the pigpio C library can no longer be
handled automatically in all cases. Linux only allows one signal event handler
to be registered for a signal. When the pigpio C library is initialized, it
registers signal event handlers for all signal events. These signal event
handlers are used by the pigpio C library to terminate the pigpio C library.
If a Node.js application registers it own signal event handlers before the
pigpio C library is initialized, the event handlers registered by the Node.js
code will be deregistered and replaced with those registered by the pigpio C
library initialization code.
To resolve this issue the `initialize` and `terminate` functions can be used.
The `initialize` function should be called before the Node.js application
registers any signal event handlers. The signal event handlers should call the
`terminate` function to terminate the pigpio package.
As an example, let's say we want to implement a simple program that blinks an
LED once per second. If the user terminates the program by hitting ctrl+c we
would like to turn the LED off before the program terminates.
The following program might look like it should do what we would like it to do
but unfortunately it doesn't. The `SIGINT` handler is not executed when the
user hits ctrl+c.
```js
var Gpio = require('pigpio').Gpio,
led,
iv;
process.on('SIGINT', function () {
led.digitalWrite(0);
clearInterval(iv);
console.log('Terminating...');
});
led = new Gpio(17, {mode: Gpio.OUTPUT}); // pigpio C library automatically initialized here
iv = setInterval(function () {
led.digitalWrite(led.digitalRead() ^ 1);
}, 1000);
```
The program registers a `SIGINT` handler and then creates a `Gpio` object. The
pigpio C library is automatically initialized when the `Gpio` object is
created. Unfortunately this automatically initialization occurs after the
`SIGINT` handler is registered and it registers a new `SIGINT` handler which
in turn deregisters the `SIGINT` handler registered by the JavaScript code.
To resolve this issue the pigpio `initialize` and `terminate` functions can be
used.
```js
var pigpio = require('pigpio'),
Gpio = pigpio.Gpio,
led,
iv;
pigpio.initialize(); // pigpio C library initialized here
process.on('SIGINT', function () {
led.digitalWrite(0);
pigpio.terminate(); // pigpio C library terminated here
clearInterval(iv);
console.log('Terminating...');
});
led = new Gpio(17, {mode: Gpio.OUTPUT});
iv = setInterval(function () {
led.digitalWrite(led.digitalRead() ^ 1);
}, 1000);
```
#### terminate()
Terminate the pigpio C library. See
[initialize()](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#initialize).
After `terminate` has been called any pigpio objects created up to that point
can no longer be used.
#### configureClock(microseconds, peripheral)
- microseconds - an unsigned integer specifying the sample rate in microseconds (1, 2, 4, 5, 8, or 10)
- peripheral - an unsigned integer specifying the peripheral for timing (CLOCK_PWM or CLOCK_PCM)
Under the covers, pigpio uses the DMA and PWM or PCM peripherals to control
and schedule PWM and servo pulse lengths. pigpio can also detect GPIO state
changes. A fundamental parameter when performing these activities is the
sample rate. The sample rate is a global setting and the same sample rate is
used for all GPIOs.
The sample rate can be set to 1, 2, 4, 5, 8, or 10 microseconds.
The number of samples per second and approximate CPU % for each sample rate
is given by the following table:
Sample rate (us) | Samples per second | CPU % |
---: | ---: | ---: |
1 | 1000000 | 25 |
2 | 500000 | 16 |
4 | 250000 | 11 |
5 | 200000 | 10 |
8 | 125000 | 15 |
10 | 100000 | 14 |
The `configureClock` function can be used to configure the sample rate and
timing peripheral.
If `configureClock` is never called, the sample rate will default to 5
microseconds timed by the PCM peripheral.
If `configureClock` is called, it must be called before creating `Gpio` objects.
For example:
```js
var pigpio = require('pigpio'),
Gpio = pigpio.Gpio,
led;
// Call configureClock before creating Gpio objects
pigpio.configureClock(1, pigpio.CLOCK_PCM);
led = new Gpio(17, {mode: Gpio.OUTPUT});
```
#### configureSocketPort(port)
- port - an unsigned integer specifying the pigpio socket port number.
Configures pigpio to use the specified socket port.
The default setting is to use port 8888.
If `configureSocketPort` is called, it must be called before creating `Gpio`
objects. For example:
```js
var pigpio = require('pigpio'),
Gpio = pigpio.Gpio,
led;
// Call configureSocketPort before creating Gpio objects
pigpio.configureSocketPort(8889);
led = new Gpio(17, {mode: Gpio.OUTPUT});
```
### Constants
#### CLOCK_PWM
PWM clock.
#### CLOCK_PCM
PCM clock.
## Class Gpio - General Purpose Input Output
#### Methods
- Constructor
- [Gpio(gpio[, options])](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#gpiogpio-options)
- Mode
- [mode(mode)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#modemode)
- [getMode()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#getmode)
- Pull-Type
- [pullUpDown(pud)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#pullupdownpud)
- Digital IO
- [digitalRead()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#digitalread)
- [digitalWrite(level)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#digitalwritelevel)
- [trigger(pulseLen, level)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#triggerpulselen-level)
- PWM
- [pwmWrite(dutyCycle)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#pwmwritedutycycle)
- [hardwarePwmWrite(frequency, dutyCycle)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#hardwarepwmwritefrequency-dutycycle)
- [getPwmDutyCycle()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#getpwmdutycycle)
- [pwmRange(range)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#pwmrangerange)
- [getPwmRange()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#getpwmrange)
- [getPwmRealRange()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#getpwmrealrange)
- [pwmFrequency(frequency)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#pwmfrequencyfrequency)
- [getPwmFrequency()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#getpwmfrequency)
- Servo Control
- [servoWrite(pulseWidth)](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#servowritepulsewidth)
- [getServoPulseWidth()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#getservopulsewidth)
- Interrupts
- [enableInterrupt(edge[, timeout])](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#enableinterruptedge-timeout)
- [disableInterrupt()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#disableinterrupt)
- Alerts
- [enableAlert()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#enablealert)
- [disableAlert()](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#disablealert)
#### Events
- [Event: 'alert'](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#event-alert)
- [Event: 'interrupt'](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#event-interrupt)
#### Constants
- [INPUT](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#input)
- [OUTPUT](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#output)
- [ALT0](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#alt0)
- [ALT1](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#alt1)
- [ALT2](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#alt2)
- [ALT3](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#alt3)
- [ALT4](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#alt4)
- [ALT5](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#alt5)
- [PUD_OFF](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#pud_off)
- [PUD_DOWN](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#pud_down)
- [PUD_UP](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#pud_up)
- [RISING_EDGE](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#rising_edge)
- [FALLING_EDGE](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#falling_edge)
- [EITHER_EDGE](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#either_edge)
- [TIMEOUT](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#timeout-2)
- [MIN_GPIO](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#min_gpio)
- [MAX_GPIO](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#max_gpio)
- [MAX_USER_GPIO](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#max_user_gpio)
### Methods
#### Gpio(gpio[, options])
- gpio - an unsigned integer specifying the GPIO number
- options - object (optional)
Returns a new Gpio object for accessing a GPIO. The optional options object can
be used to configure the mode, pull type, interrupting edge(s), interrupt
timeout, and alerts for the GPIO.
A Gpio object is an EventEmitter.
GPIOs on Linux are identified by unsigned integers. These are the numbers that
should be passed to the Gpio constructor. For example, pin 7 on the Raspberry
Pi P1 expansion header corresponds to GPIO4 in Raspbian Linux. 4 is therefore
the number to pass to the Gpio constructor when using pin 7 on the P1 expansion
header.
The following options are supported:
- mode - INPUT, OUTPUT, ALT0, ALT1, ALT2, ALT3, ALT4, or ALT5 (optional, no default)
- pullUpDown - PUD_OFF, PUD_DOWN, or PUD_UP (optional, no default)
- edge - interrupt edge for inputs. RISING_EDGE, FALLING_EDGE, or EITHER_EDGE (optional, no default)
- timeout - interrupt timeout in milliseconds (optional, defaults to 0 meaning no timeout if edge specified)
- alert - boolean specifying whether or not alert events are emitted when the GPIO changes state (optional, default false)
If no mode option is specified, the GPIO will be left in it's current mode. If
pullUpDown is not not specified, the pull-type for the GPIO will not be
modified. This makes it possible to implement programs that do things like
print information about the current mode and logic level for all GPIOs, for
example:
```js
var Gpio = require('pigpio').Gpio,
gpio,
gpioNo;
for (gpioNo = Gpio.MIN_GPIO; gpioNo <= Gpio.MAX_GPIO; gpioNo += 1) {
gpio = new Gpio(gpioNo);
console.log('GPIO ' + gpioNo + ':' +
' mode=' + gpio.getMode() +
' level=' + gpio.digitalRead()
);
}
```
If an interrupt edge is specified, the Gpio will emit an 'interrupt' event each
time an interrupt is detected. Interrupt events are low latency events and will
be emitted as quickly as possible. The level argument passed to the interrupt
event listener is the level read at the time the process was informed of the
interrupt. The level may not be the same as the expected edge as interrupts
happening in rapid succession may be missed by the kernel.
Interrupts can have an optional timeout. The level argument passed to the
interrupt event listener will be TIMEOUT (2) if the optional interrupt timeout
expires.
If alerts are enabled, the Gpio will emit an 'alert' event each time the GPIO
state changes. The logic level and time of the state change accurate to a few
microseconds are passed to the alert event listener. GPIOs are sampled at a
rate set when the library is started. The default sample rate is 5 microseconds
but it can be set 1, 2, 4, 5, 8, or 10 microseconds with the
[configureClock](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#configureclockmicroseconds-peripheral)
function. State changes shorter that the sample rate may be missed.
Alert events are emitted nominally 1000 times per second and there will be one
alert event for each state change detected. i.e. There will be alert events for
all state changes but there will be a latency.
#### mode(mode)
- mode - INPUT, OUTPUT, ALT0, ALT1, ALT2, ALT3, ALT4, or ALT5
Sets the GPIO mode. Returns this.
#### getMode()
Returns the GPIO mode.
#### pullUpDown(pud)
- pud - PUD_OFF, PUD_DOWN, or PUD_UP
Sets or clears the resistor pull type for the GPIO. Returns this.
#### digitalRead()
Returns the GPIO level, 0 or 1.
#### digitalWrite(level)
- level - 0 or 1
Sets the GPIO level to 0 or 1. If PWM or servo pulses are active on the GPIO
they are switched off. Returns this.
#### trigger(pulseLen, level)
- pulseLen - pulse length in microseconds (1 - 100)
- level - 0 or 1
Sends a trigger pulse to the GPIO. The GPIO is set to level for pulseLen
microseconds and then reset to not level.
#### pwmWrite(dutyCycle)
- dutyCycle - an unsigned integer >= 0 (off) and <= range (fully on). range defaults to 255.
Starts PWM on the GPIO. Returns this.
Uses DMA to control and schedule the pulse lengths and duty cycles. pwmRange
can be used to change the default range of 255.
#### hardwarePwmWrite(frequency, dutyCycle)
- frequency - an unsigned integer >= 0 and <= 125000000
- dutyCycle - an unsigned integer >= 0 (off) and <= 1000000 (fully on).
Starts hardware PWM on the GPIO at the specified frequency and dutyCycle.
Frequencies above 30MHz are unlikely to work. Returns this.
The actual number of steps bteween off and fully on is the integral part of 250
million divided by frequency.
The actual frequency set is 250 million / steps.
There will only be a million steps for a frequency of 250. Lower frequencies
will have more steps and higher frequencies will have fewer steps. duytCycle is
automatically scaled to take this into account.
All models of the Raspberry Pi support hardware PWM on GPIO18.
#### getPwmDutyCycle()
Returns the PWM duty cycle setting on the GPIO.
#### pwmRange(range)
- range - an unsigned integer in the range 25 through 40000
Selects the duty cycle range to be used for the GPIO. Subsequent calls to
pwmWrite will use a duty cycle between 0 (off) and range (fully on).
If PWM is currently active on the GPIO its duty cycle will be scaled to reflect
the new range.
The real range, the number of steps between fully off and fully on for each
frequency ans sample rate, is given in the following table.
1us | 2us | 4us | 5us | 8us | 10us | Real Range |
---: | ---: | ---: | ---: | ---: | ---: | ---: |
40000 | 20000 | 10000 | 8000 | 5000 | 4000 |25 |
20000 | 10000 | 5000 | 4000 | 2500 | 2000 | 50 |
10000 | 5000 | 2500 | 2000 | 1250 | 1000 | 100 |
8000 | 4000 | 2000 | 1600 | 1000 | 800 | 125 |
5000 | 2500 | 1250 | 1000 | 625 | 500 | 200 |
4000 | 2000 | 1000 | 800 | 500 | 400 | 250 |
2500 | 1250 | 625 | 500 | 313 | 250 | 400 |
2000 | 1000 | 500 | 400 | 250 | 200 | 500 |
1600 | 800 | 400 | 320 | 200 | 160 | 625 |
1250 | 625 | 313 | 250 | 156 | 125 | 800 |
1000 | 500 | 250 | 200 | 125 | 100 | 1000 |
800 | 400 | 200 | 160 | 100 | 80 | 1250 |
500 | 250 | 125 | 100 | 63 | 50 | 2000 |
400 | 200 | 100 | 80 | 50 | 40 | 2500 |
250 | 125 | 63 | 50 | 31 | 25 | 4000 |
200 | 100 | 50 | 40 | 25 | 20 | 5000 |
100 | 50 | 25 | 20 | 13 | 10 | 10000 |
50 | 25 | 13 | 10 | 6 | 5 | 20000 |
The real value set by pwmWrite is (dutyCycle * real range) / range.
#### getPwmRange()
Returns the duty cycle range used for the GPIO.
If hardware PWM is active on the GPIO the reported range will be 1000000.
#### getPwmRealRange()
Returns the real range used for the GPIO.
If hardware PWM is active on the GPIO the reported real range will be
approximately 250M divided by the set PWM frequency.
#### pwmFrequency(frequency)
- frequency - an unsigned integer >= 0
Sets the frequency in hertz to be used for the GPIO. Returns this.
Each GPIO can be independently set to one of 18 different PWM frequencies.
The selectable frequencies depend upon the sample rate which may be 1, 2, 4, 5,
8, or 10 microseconds (default 5). The sample rate can be set with the
[configureClock](https://github.com/fivdi/pigpio/blob/master/doc/configuration.md#configureclockmicroseconds-peripheral)
function.
If PWM is currently active on the GPIO it will be switched off and then back on
at the new frequency.
The frequencies in hertz for each sample rate are:
1us | 2us | 4us | 5us | 8us | 10us |
---: | ---: | ---: | ---: | ---: | ---: |
40000 | 20000 | 10000 | 8000 | 5000 | 4000 |
20000 | 10000 | 5000 | 4000 | 2500 | 2000 |
10000 | 5000 | 2500 | 2000 | 1250 | 1000 |
8000 | 4000 | 2000 | 1600 | 1000 | 800 |
5000 | 2500 | 1250 | 1000 | 625 | 500 |
4000 | 2000 | 1000 | 800 | 500 | 400 |
2500 | 1250 | 625 | 500 | 313 | 250 |
2000 | 1000 | 500 | 400 | 250 | 200 |
1600 | 800 | 400 | 320 | 200 | 160 |
1250 | 625 | 313 | 250 | 156 | 125 |
1000 | 500 | 250 | 200 | 125 | 100 |
800 | 400 | 200 | 160 | 100 | 80 |
500 | 250 | 125 | 100 | 63 | 50 |
400 | 200 | 100 | 80 | 50 | 40 |
250 | 125 | 63 | 50 | 31 | 25 |
200 | 100 | 50 | 40 | 25 | 20 |
100 | 50 | 25 | 20 | 13 | 10 |
50 | 25 | 13 | 10 | 6 | 5 |
#### getPwmFrequency()
Returns the frequency (in hertz) used for the GPIO. The default frequency is
800Hz.
If hardware PWM is active on the GPIO the reported frequency will be that set
by hardwarePwmWrite.
#### servoWrite(pulseWidth)
- pulseWidth - pulse width in microseconds, an unsigned integer, 0 or a number in the range 500 through 2500
Starts servo pulses at 50Hz on the GPIO, 0 (off), 500 (most anti-clockwise) to
2500 (most clockwise). Returns this.
#### getServoPulseWidth()
Returns the servo pulse width setting on the GPIO.
#### enableInterrupt(edge[, timeout])
- edge - RISING_EDGE, FALLING_EDGE, or EITHER_EDGE
- timeout - interrupt timeout in milliseconds (optional, defaults to 0 meaning no timeout)
Enables interrupts for the GPIO. Returns this.
Interrupts can have an optional timeout. The level argument passed to the
interrupt event listener will be TIMEOUT (2) if the optional interrupt timeout
expires.
#### disableInterrupt()
Disables interrupts for the GPIO. Returns this.
#### enableAlert()
Enables alerts for the GPIO. Returns this.
An alert event will be emitted every time the GPIO changes state.
#### disableAlert()
Disables aterts for the GPIO. Returns this.
### Events
#### Event: 'alert'
- level - the GPIO level when the state change occurred, 0 or 1
- tick - the time stamp of the state change, an unsigned 32 bit integer
tick is the number of microseconds since system boot and it should be accurate
to a few microseconds.
As tick is an unsigned 32 bit quantity it wraps around after 2^32 microseconds,
which is approximately 1 hour 12 minutes.
It's not necessary to worry about wrap around when subtracting one tick from
another tick if the JavaScript sign propagating right shift operator `>>` is used.
For example, the following code which simply subtracts `startTick` from `endTick`
prints -4294967294 which isn't the difference we're looking for:
```
var startTick = 0xffffffff; // 2^32-1 or 4294967295, the max unsigned 32 bit integer
var endTick = 1;
console.log(endTick - startTick); // prints -4294967294 which isn't what we want
```
However, the following code which right shifts both `startTick` and `endTick` 0
bits to the right before subtracting prints 2 which is the difference we're
looking for:
```
var startTick = 0xffffffff; // 2^32-1 or 4294967295, the max unsigned 32 bit integer
var endTick = 1;
console.log((endTick >> 0) - (startTick >> 0)); // prints 2 which is what we want
```
#### Event: 'interrupt'
- level - the GPIO level when the interrupt occurred, 0, 1, or TIMEOUT (2)
Emitted on interrupts.
Interrupts can have an optional timeout. The level argument passed to the
interrupt event listener will be TIMEOUT (2) if the optional interrupt timeout
expires.
### Constants
#### INPUT
Indicates that the GPIO is an input.
#### OUTPUT
Indicates that the GPIO is an output.
#### ALT0
Indicates that the GPIO is in alternative mode 0.
#### ALT1
Indicates that the GPIO is in alternative mode 1.
#### ALT2
Indicates that the GPIO is in alternative mode 2.
#### ALT3
Indicates that the GPIO is in alternative mode 3.
#### ALT4
Indicates that the GPIO is in alternative mode 4.
#### ALT5
Indicates that the GPIO is in alternative mode 5.
#### PUD_OFF
Niether the pull-up nor the pull-down resistor should be enabled.
#### PUD_DOWN
Enable pull-down resistor.
#### PUD_UP
Enable pull-up resistor.
#### RISING_EDGE
Indicates that the GPIO fires interrupts on rising edges.
#### FALLING_EDGE
Indicates that the GPIO fires interrupts on falling edges.
#### EITHER_EDGE
Indicates that the GPIO fires interrupts on both rising and falling edges.
#### TIMEOUT (2)
The level argument passed to an interrupt event listener when an interrupt
timeout expires.
#### MIN_GPIO
The smallest GPIO number.
#### MAX_GPIO
The largest GPIO number.
#### MAX_USER_GPIO
The largest user GPIO number.
## Class GpioBank - Banked General Purpose Input Output
There are 54 GPIOs named GPIO0 through GPIO53.
They are split into two banks. Bank 1 consists of GPIO0 through GPIO31. Bank 2
consists of GPIO32 through GPIO53.
All the GPIOs which are safe for the user to read and write are in bank 1. Not
all GPIOs in bank 1 are safe though, it depends on the board type.
A GpioBank object can be used to read or write up to 32 GPIOs as one operation.
#### Methods
- [GpioBank(bank)](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md#gpiobankbank)
- [read()](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md#read)
- [set(bits)](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md#setbits)
- [clear(bits)](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md#clearbits)
- [bank()](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md#bank)
#### Constants
- [BANK1](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md#bank1)
- [BANK2](https://github.com/fivdi/pigpio/blob/master/doc/gpiobank.md#bank2)
### Methods
#### GpioBank(bank)
- bank - BANK1 or BANK2 (optional, defaults to BANK1)
Returns a new GpioBank object for accessing up to 32 GPIOs as one operation.
#### read()
Returns the current level of all GPIOs in the bank.
#### set(bits)
bits - a bit mask of the the GPIOs to set to 1
For each GPIO in the bank, sets the GPIO level to 1 if the corresponding bit in
bits is set. Returns this.
#### clear(bits)
bits - a bit mask of the the GPIOs to clear or set to 0
For each GPIO in the bank, sets the GPIO level to 0 if the corresponding bit in
bits is set. Returns this.
#### bank()
Returns the bank identifier (BANK1 or BANK2.)
### Constants
#### BANK1
Identifies bank 1.
#### BANK2
Identifies bank 2.
## Class Notifier - Notification Stream
A Notifier contains a stream which provides notifications about state changes
on any of GPIOs 0 through 31 concurrently. Each notification read from the
stream contains information about the logic levels of the GPIOs and the time of
the state changes accurate to a few microseconds. It's possible to handle in
excess of 100000 notifications per second.
#### Methods
- [Notifier([options])](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md#notifieroptions)
- [start(bits)](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md#startbits)
- [stop()](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md#stop)
- [close()](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md#close)
- [stream()](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md#stream)
#### Constants
- [NOTIFICATION_LENGTH](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md#notification_length)
- [PI_NTFY_FLAGS_ALIVE](https://github.com/fivdi/pigpio/blob/master/doc/notifier.md#pi_ntfy_flags_alive)
### Methods
#### Notifier([options])
- options - object (optional)
Returns a new Notifier object that contains a stream which provides
notifications about state changes on any of GPIOs 0 through 31 concurrently.
Each notification read from the stream contains information about the logic
levels of the GPIOs and the time of the state changes accurate to a few
microseconds. The optional options object can be used to configure which GPIOs
notifications should be provided for.
The following options are supported:
- bits - a bit mask indicating the GPIOs of interest, bit0 corresponds to
GPIO0, bit1 corresponds to GPIO1, ..., bit31 corresponds to GPIO31. If a bit
is set, the corresponding GPIO will be monitored for state changes. (optional,
no default)
If bits are specified, notifications will be started. If no bits are specified,
the `start` method can be used to start notifications at a later point in time.
Each notification in the stream occupies 12 bytes and has the following
structure:
- seqno - UInt16, little-endian
- seqno starts at 0 and increments by one for each notification. It wraps
around after 2^16 notifications.
- flags - UInt16, little-endian
- One flag is defined. If bit 6 is set (PI_NTFY_FLAGS_ALIVE) this indicates
a keep alive signal on the stream and is sent once a minute in the absence
of other notification activity.
- tick - UInt32, little-endian
- The number of microseconds since system boot. It wraps around after 1h12m.
See [Event: 'alert'](https://github.com/fivdi/pigpio/blob/master/doc/gpio.md#event-alert)
for further information about unsigned 32 bit arithmetic in JavaScript.
- level - UInt32, little-endian
- Indicates the level of each GPIO. If bit x is set then GPIOx is high.
#### start(bits)
- bits - a bit mask indicating the GPIOs of interest, bit0 corresponds to
GPIO0, bit1 corresponds to GPIO1, ..., bit31 corresponds to GPIO31. If a bit
is set, the corresponding GPIO will be monitored for state changes.
Starts notifications for the GPIOs specified in the bit mask. Returns this.
#### stop()
Stops notifications. Notifications can be restarted with the `start` method.
Returns this.
#### close()
Stops notifications and releases resources. Returns undefined.
#### stream()
Returns the notification stream which is a `Readable` stream.
### Constants
#### NOTIFICATION_LENGTH
The number of bytes occupied by a notification in the notification stream.
#### PI_NTFY_FLAGS_ALIVE
Indicates a keep alive signal on the stream and is sent once a minute in the
absence of other notification activity.
'use strict';
// Assumption: the LED is off when the program is started
var Gpio = require('../').Gpio,
led = new Gpio(17, {
mode: Gpio.OUTPUT,
alert: true
});
(function () {
var startTick;
// Use alerts to determine how long the LED was turned on
led.on('alert', function (level, tick) {
var endTick,
diff;
if (level == 1) {
startTick = tick;
} else {
endTick = tick;
diff = (endTick >> 0) - (startTick >> 0); // Unsigned 32 bit arithmetic
console.log(diff);
}
});
}());
// Turn the LED on for 15 microseconds once per second
setInterval(function () {
led.trigger(15, 1);
}, 1000);
'use strict';
var Gpio = require('../').Gpio,
led = new Gpio(17, {mode: Gpio.OUTPUT});
setInterval(function () {
led.digitalWrite(led.digitalRead() ^ 1);
}, 100);
'use strict';
var Gpio = require('../').Gpio,
trigger = new Gpio(23, {mode: Gpio.OUTPUT}),
echo = new Gpio(24, {mode: Gpio.INPUT, alert: true});
// The number of microseconds it takes sound to travel 1cm at 20 degrees celcius
var MICROSECDONDS_PER_CM = 1e6/34321;
trigger.digitalWrite(0); // Make sure trigger is low
(function () {
var startTick;
echo.on('alert', function (level, tick) {
var endTick,
diff;
if (level == 1) {
startTick = tick;
} else {
endTick = tick;
diff = (endTick >> 0) - (startTick >> 0); // Unsigned 32 bit arithmetic
console.log(diff / 2 / MICROSECDONDS_PER_CM);
}
});
}());
// Trigger a distance measurement once per second
setInterval(function () {
trigger.trigger(10, 1); // Set trigger high for 10 microseconds
}, 1000);
'use strict';
var Gpio = require('../').Gpio,
gpio,
gpioNo;
for (gpioNo = Gpio.MIN_GPIO; gpioNo <= Gpio.MAX_GPIO; gpioNo += 1) {
gpio = new Gpio(gpioNo);
console.log('GPIO ' + gpioNo + ':' +
' mode=' + gpio.getMode() +
' level=' + gpio.digitalRead()
);
}
'use strict';
var Gpio = require('../').Gpio,
button = new Gpio(4, {
mode: Gpio.INPUT,
pullUpDown: Gpio.PUD_DOWN,
edge: Gpio.EITHER_EDGE
}),
led = new Gpio(17, {mode: Gpio.OUTPUT});
button.on('interrupt', function (level) {
led.digitalWrite(level);
});
'use strict';
var Gpio = require('../').Gpio,
led = new Gpio(17, {mode: Gpio.OUTPUT}),
dutyCycle = 0;
setInterval(function () {
led.pwmWrite(dutyCycle);
dutyCycle += 5;
if (dutyCycle > 255) {
dutyCycle = 0;
}
}, 20);
'use strict';
var Gpio = require('../').Gpio,
motor = new Gpio(10, {mode: Gpio.OUTPUT}),
pulseWidth = 1000,
increment = 100;
setInterval(function () {
motor.servoWrite(pulseWidth);
pulseWidth += increment;
if (pulseWidth >= 2000) {
increment = -100;
} else if (pulseWidth <= 1000) {
increment = 100;
}
}, 1000);
{
"name": "pigpio",
"version": "0.6.3",
"description": "Fast GPIO, PWM, servo control, state change notification, and interrupt handling on the Raspberry Pi",
"main": "pigpio.js",
"directories": {
"example": "example",
"test": "test"
},
"scripts": {
"test": "echo \"Tests can only be run manually from the command line.\" && exit 1",
"install": "node-gyp rebuild"
},
"repository": {
"type": "git",
"url": "git+https://github.com/fivdi/pigpio.git"
},
"engines": {
"node": ">=0.10.0"
},
"dependencies": {
"bindings": "~1.3.0",
"nan": "~2.7.0"
},
"keywords": [
"gpio",
"pwm",
"servo",
"interrupt",
"raspberry",
"pi"
],
"author": {
"name": "fivdi"
},
"license": "MIT",
"gypfile": true,
"gitHead": "9c73af1af9625016dc030e172eb8008be0b77842",
"bugs": {
"url": "https://github.com/fivdi/pigpio/issues"
},
"homepage": "https://github.com/fivdi/pigpio#readme",
"_id": "pigpio@0.6.3",
"_npmVersion": "5.5.1",
"_nodeVersion": "9.0.0",
"_npmUser": {
"name": "fivdi",
"email": "bdscooke@gmail.com"
},
"maintainers": [
{
"name": "fivdi",
"email": "bdscooke@gmail.com"
}
],
"dist": {
"integrity": "sha512-DSuknJwp7OQAbeISO/tKoPqnN9O+GCGNP5Ued+Dpq47o75lCPoH+eNMmkHomYJbGKqmcIuBtKwNVh2rNVg1uqQ==",
"shasum": "366aa262efbd5681f95dc2ae8d793fcf43212ed3",
"tarball": "https://registry.npmjs.org/pigpio/-/pigpio-0.6.3.tgz"
},
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/pigpio-0.6.3.tgz_1509789341197_0.6510892033111304"
},
"_shasum": "366aa262efbd5681f95dc2ae8d793fcf43212ed3",
"_from": "pigpio@",
"_resolved": "https://registry.npmjs.org/pigpio/-/pigpio-0.6.3.tgz"
}
'use strict';
var EventEmitter = require('events').EventEmitter,
fs = require('fs'),
pigpio = require('bindings')('pigpio.node'),
util = require('util'),
initialized = false;
function initializePigpio() {
if (!initialized) {
pigpio.gpioInitialise();
initialized = true;
}
}
/* ------------------------------------------------------------------------ */
/* Gpio */
/* ------------------------------------------------------------------------ */
function Gpio(gpio, options) {
if (!(this instanceof Gpio)) {
return new Gpio(gpio, options);
}
initializePigpio();
options = options || {};
this.gpio = +gpio;
if (typeof options.mode === 'number') {
this.mode(options.mode);
}
if (typeof options.pullUpDown === 'number') {
this.pullUpDown(options.pullUpDown);
}
if (typeof options.edge === 'number') {
this.enableInterrupt(options.edge,
typeof options.timeout === 'number' ? options.timeout : 0
);
}
if (typeof options.alert === "boolean" && options.alert) {
this.enableAlert();
}
EventEmitter.call(this);
}
util.inherits(Gpio, EventEmitter);
module.exports.Gpio = Gpio;
Gpio.prototype.mode = function (mode) {
// What happens if the mode is INPUT, there is an ISR, and the mode is
// changed to OUTPUT (or anything else for that matter)?
pigpio.gpioSetMode(this.gpio, +mode);
return this;
};
Gpio.prototype.getMode = function () {
return pigpio.gpioGetMode(this.gpio);
};
Gpio.prototype.pullUpDown = function (pud) {
pigpio.gpioSetPullUpDown(this.gpio, +pud);
return this;
};
Gpio.prototype.digitalRead = function () {
return pigpio.gpioRead(this.gpio);
};
Gpio.prototype.digitalWrite = function (level) {
pigpio.gpioWrite(this.gpio, +level);
return this;
};
Gpio.prototype.trigger = function (pulseLen, level) {
pigpio.gpioTrigger(this.gpio, +pulseLen, +level);
return this;
};
Gpio.prototype.pwmWrite = function (dutyCycle) {
pigpio.gpioPWM(this.gpio, +dutyCycle);
return this;
};
Gpio.prototype.analogWrite = Gpio.prototype.pwmWrite;
Gpio.prototype.hardwarePwmWrite = function (frequency, dutyCycle) {
pigpio.gpioHardwarePWM(this.gpio, +frequency, +dutyCycle);
return this;
};
Gpio.prototype.getPwmDutyCycle = function () {
return pigpio.gpioGetPWMdutycycle(this.gpio);
};
Gpio.prototype.pwmRange = function (range) {
pigpio.gpioSetPWMrange(this.gpio, +range);
return this;
};
Gpio.prototype.getPwmRange = function () {
return pigpio.gpioGetPWMrange(this.gpio);
};
Gpio.prototype.getPwmRealRange = function () {
return pigpio.gpioGetPWMrealRange(this.gpio);
};
Gpio.prototype.pwmFrequency = function (frequency) {
pigpio.gpioSetPWMfrequency(this.gpio, +frequency);
return this;
};
Gpio.prototype.getPwmFrequency = function () {
return pigpio.gpioGetPWMfrequency(this.gpio);
};
Gpio.prototype.servoWrite = function (pulseWidth) {
pigpio.gpioServo(this.gpio, +pulseWidth);
return this;
};
Gpio.prototype.getServoPulseWidth = function () {
return pigpio.gpioGetServoPulsewidth(this.gpio);
};
Gpio.prototype.enableInterrupt = function (edge, timeout) {
var handler = function (gpio, level, tick) {
this.emit('interrupt', level);
}.bind(this);
timeout = timeout || 0;
pigpio.gpioSetISRFunc(this.gpio, +edge, +timeout, handler);
return this;
};
Gpio.prototype.disableInterrupt = function () {
pigpio.gpioSetISRFunc(this.gpio, Gpio.EITHER_EDGE, 0);
return this;
};
Gpio.prototype.enableAlert = function () {
var handler = function (gpio, level, tick) {
this.emit('alert', level, tick);
}.bind(this);
pigpio.gpioSetAlertFunc(this.gpio, handler);
return this;
};
Gpio.prototype.disableAlert = function () {
pigpio.gpioSetAlertFunc(this.gpio);
return this;
};
/* mode */
Gpio.INPUT = 0; // PI_INPUT
Gpio.OUTPUT = 1; //PI_OUTPUT;
Gpio.ALT0 = 4; // PI_ALT0;
Gpio.ALT1 = 5; // PI_ALT1;
Gpio.ALT2 = 6; // PI_ALT2;
Gpio.ALT3 = 7; // PI_ALT3;
Gpio.ALT4 = 3; // PI_ALT4;
Gpio.ALT5 = 2; // PI_ALT5;
/* pud */
Gpio.PUD_OFF = 0; // PI_PUD_OFF;
Gpio.PUD_DOWN = 1; // PI_PUD_DOWN;
Gpio.PUD_UP = 2; // PI_PUD_UP;
/* isr */
Gpio.RISING_EDGE = 0; // RISING_EDGE;
Gpio.FALLING_EDGE = 1; // FALLING_EDGE;
Gpio.EITHER_EDGE = 2; // EITHER_EDGE;
/* timeout */
Gpio.TIMEOUT = 2; // PI_TIMEOUT;
/* gpio numbers */
Gpio.MIN_GPIO = 0; // PI_MIN_GPIO;
Gpio.MAX_GPIO = 53; // PI_MAX_GPIO;
Gpio.MAX_USER_GPIO = 31; // PI_MAX_USER_GPIO;
/* ------------------------------------------------------------------------ */
/* GpioBank */
/* ------------------------------------------------------------------------ */
function GpioBank(bank) {
if (!(this instanceof GpioBank)) {
return new GpioBank(bank);
}
initializePigpio();
this.bankNo = +bank || GpioBank.BANK1;
}
module.exports.GpioBank = GpioBank;
GpioBank.prototype.read = function () {
if (this.bankNo === GpioBank.BANK1) {
return pigpio.GpioReadBits_0_31();
} else if (this.bankNo === GpioBank.BANK2) {
return pigpio.GpioReadBits_32_53();
}
};
GpioBank.prototype.set = function (bits) {
if (this.bankNo === GpioBank.BANK1) {
pigpio.GpioWriteBitsSet_0_31(+bits);
} else if (this.bankNo === GpioBank.BANK2) {
pigpio.GpioWriteBitsSet_32_53(+bits);
}
return this;
};
GpioBank.prototype.clear = function (bits) {
if (this.bankNo === GpioBank.BANK1) {
pigpio.GpioWriteBitsClear_0_31(+bits);
} else if (this.bankNo === GpioBank.BANK2) {
pigpio.GpioWriteBitsClear_32_53(+bits);
}
return this;
};
GpioBank.prototype.bank = function () {
return this.bankNo;
};
GpioBank.BANK1 = 1;
GpioBank.BANK2 = 2;
/* ------------------------------------------------------------------------ */
/* Notifier */
/* ------------------------------------------------------------------------ */
var NOTIFICATION_PIPE_PATH_PREFIX = '/dev/pigpio';
function Notifier(options) {
if (!(this instanceof Notifier)) {
return new Notifier(options);
}
initializePigpio();
options = options || {};
this.handle = pigpio.gpioNotifyOpenWithSize(1048576);
// set highWaterMark to a multiple of NOTIFICATION_LENGTH to avoid 'data'
// events being emitted with buffers containing partial notifications.
this.notificationStream =
fs.createReadStream(NOTIFICATION_PIPE_PATH_PREFIX + this.handle, {
highWaterMark: Notifier.NOTIFICATION_LENGTH * 5000
});
if (typeof options.bits === 'number') {
this.start(options.bits);
}
}
module.exports.Notifier = Notifier;
Notifier.prototype.start = function (bits) {
pigpio.gpioNotifyBegin(this.handle, +bits);
return this;
};
Notifier.prototype.stop = function () {
pigpio.gpioNotifyPause(this.handle);
return this;
};
Notifier.prototype.close = function () {
pigpio.gpioNotifyClose(this.handle);
};
Notifier.prototype.stream = function () {
return this.notificationStream;
};
Notifier.NOTIFICATION_LENGTH = 12;
Notifier.PI_NTFY_FLAGS_ALIVE = 1 << 6;
/* ------------------------------------------------------------------------ */
/* Configuration */
/* ------------------------------------------------------------------------ */
module.exports.hardwareRevision = function () {
return pigpio.gpioHardwareRevision();
};
module.exports.initialize = function () {
initializePigpio();
};
module.exports.terminate = function () {
pigpio.gpioTerminate();
initialized = false;
};
module.exports.configureClock = function (microseconds, peripheral) {
pigpio.gpioCfgClock(+microseconds, +peripheral);
};
module.exports.configureSocketPort = function (port) {
pigpio.gpioCfgSocketPort(+port);
};
module.exports.CLOCK_PWM = 0; // PI_CLOCK_PWM;
module.exports.CLOCK_PCM = 1; // PI_CLOCK_PCM;
#include <errno.h>
#include <pigpio.h>
#include <nan.h>
#if NODE_VERSION_AT_LEAST(0, 11, 13)
static void gpioISREventLoopHandler(uv_async_t* handle);
static void gpioAlertEventLoopHandler(uv_async_t* handle);
#else
static void gpioISREventLoopHandler(uv_async_t* handle, int status);
static void gpioAlertEventLoopHandler(uv_async_t* handle, int status);
#endif
// TODO errors returned by uv calls are ignored
/* ------------------------------------------------------------------------ */
/* Gpio */
/* ------------------------------------------------------------------------ */
class GpioCallback_t {
public:
GpioCallback_t() : callback_(0) {
}
virtual ~GpioCallback_t() {
if (callback_) {
uv_unref((uv_handle_t *) &async_);
delete callback_;
}
uv_close((uv_handle_t *) &async_, 0);
callback_ = 0;
}
void AsyncSend() {
uv_async_send(&async_);
}
void SetCallback(Nan::Callback *callback) {
if (callback_) {
uv_unref((uv_handle_t *) &async_);
delete callback_;
}
callback_ = callback;
if (callback_) {
uv_ref((uv_handle_t *) &async_);
}
}
Nan::Callback *Callback() {
return callback_;
}
protected:
uv_async_t async_;
private:
Nan::Callback *callback_;
};
class GpioISR_t : public GpioCallback_t {
public:
GpioISR_t() : GpioCallback_t() {
uv_async_init(uv_default_loop(), &async_, gpioISREventLoopHandler);
// Prevent async from keeping event loop alive, for the time being.
uv_unref((uv_handle_t *) &async_);
}
};
class GpioAlert_t : public GpioCallback_t {
public:
GpioAlert_t() : GpioCallback_t() {
uv_async_init(uv_default_loop(), &async_, gpioAlertEventLoopHandler);
// Prevent async from keeping event loop alive, for the time being.
uv_unref((uv_handle_t *) &async_);
}
};
static GpioISR_t gpioISR_g[PI_MAX_USER_GPIO + 1];
static GpioAlert_t gpioAlert_g[PI_MAX_USER_GPIO + 1];
static int gpio_g;
static int level_g;
static uint32_t tick_g;
static uv_sem_t sem_g;
void ThrowPigpioError(int err, const char *pigpiocall) {
char buf[128];
snprintf(buf, sizeof(buf), "pigpio error %d in %s", err, pigpiocall);
Nan::ThrowError(buf);
}
NAN_METHOD(gpioHardwareRevision) {
info.GetReturnValue().Set(gpioHardwareRevision());
}
NAN_METHOD(gpioInitialise) {
int rc = gpioInitialise();
if (rc < 0) {
return ThrowPigpioError(rc, "gpioInitialise");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioTerminate) {
gpioTerminate();
}
NAN_METHOD(gpioSetMode) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetMode", ""));
}
unsigned gpio = info[0]->Uint32Value();
unsigned mode = info[1]->Uint32Value();
int rc = gpioSetMode(gpio, mode);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioSetMode");
}
}
NAN_METHOD(gpioGetMode) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioGetMode", ""));
}
unsigned gpio = info[0]->Uint32Value();
int rc = gpioGetMode(gpio);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioGetMode");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioSetPullUpDown) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetPullUpDown", ""));
}
unsigned gpio = info[0]->Uint32Value();
unsigned pud = info[1]->Uint32Value();
int rc = gpioSetPullUpDown(gpio, pud);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioSetPullUpDown");
}
}
NAN_METHOD(gpioRead) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioRead", ""));
}
unsigned gpio = info[0]->Uint32Value();
int rc = gpioRead(gpio);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioRead");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioWrite) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetPullUpDown", ""));
}
unsigned gpio = info[0]->Uint32Value();
unsigned level = info[1]->Uint32Value();
int rc = gpioWrite(gpio, level);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioWrite");
}
}
NAN_METHOD(gpioTrigger) {
if (info.Length() < 3 || !info[0]->IsUint32() || !info[1]->IsUint32() || !info[2]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioTrigger", ""));
}
unsigned gpio = info[0]->Uint32Value();
unsigned pulseLen = info[1]->Uint32Value();
unsigned level = info[2]->Uint32Value();
int rc = gpioTrigger(gpio, pulseLen, level);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioTrigger");
}
}
NAN_METHOD(gpioPWM) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioPWM", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
unsigned dutycycle = info[1]->Uint32Value();
int rc = gpioPWM(user_gpio, dutycycle);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioPWM");
}
}
NAN_METHOD(gpioHardwarePWM) {
if (info.Length() < 3 ||
!info[0]->IsUint32() ||
!info[1]->IsUint32() ||
!info[2]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioHardwarePWM", ""));
}
unsigned gpio = info[0]->Uint32Value();
unsigned frequency = info[1]->Uint32Value();
unsigned dutycycle = info[2]->Uint32Value();
int rc = gpioHardwarePWM(gpio, frequency, dutycycle);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioHardwarePWM");
}
}
NAN_METHOD(gpioGetPWMdutycycle) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioGetPWMdutycycle", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
int rc = gpioGetPWMdutycycle(user_gpio);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioGetPWMdutycycle");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioSetPWMrange) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetPWMrange", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
unsigned range = info[1]->Uint32Value();
int rc = gpioSetPWMrange(user_gpio, range);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioSetPWMrange");
}
}
NAN_METHOD(gpioGetPWMrange) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioGetPWMrange", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
int rc = gpioGetPWMrange(user_gpio);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioGetPWMrange");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioGetPWMrealRange) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioGetPWMrealRange", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
int rc = gpioGetPWMrealRange(user_gpio);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioGetPWMrealRange");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioSetPWMfrequency) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetPWMfrequency", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
unsigned frequency = info[1]->Uint32Value();
int rc = gpioSetPWMfrequency(user_gpio, frequency);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioSetPWMfrequency");
}
}
NAN_METHOD(gpioGetPWMfrequency) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioGetPWMfrequency", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
int rc = gpioGetPWMfrequency(user_gpio);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioGetPWMfrequency");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioServo) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioServo", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
unsigned pulsewidth = info[1]->Uint32Value();
int rc = gpioServo(user_gpio, pulsewidth);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioServo");
}
}
NAN_METHOD(gpioGetServoPulsewidth) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioGetServoPulsewidth", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
int rc = gpioGetServoPulsewidth(user_gpio);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioGetServoPulsewidth");
}
info.GetReturnValue().Set(rc);
}
// gpioISRHandler is not executed in the event loop thread
static void gpioISRHandler(int gpio, int level, uint32_t tick) {
uv_sem_wait(&sem_g);
gpio_g = gpio;
level_g = level;
tick_g = tick;
gpioISR_g[gpio].AsyncSend();
}
// gpioISREventLoopHandler is executed in the event loop thread.
#if NODE_VERSION_AT_LEAST(0, 11, 13)
static void gpioISREventLoopHandler(uv_async_t* handle) {
#else
static void gpioISREventLoopHandler(uv_async_t* handle, int status) {
#endif
Nan::HandleScope scope;
if (gpioISR_g[gpio_g].Callback()) {
v8::Local<v8::Value> args[3] = {
Nan::New<v8::Integer>(gpio_g),
Nan::New<v8::Integer>(level_g),
Nan::New<v8::Integer>(tick_g)
};
gpioISR_g[gpio_g].Callback()->Call(3, args);
}
uv_sem_post(&sem_g);
}
static NAN_METHOD(gpioSetISRFunc) {
if (info.Length() < 3 ||
!info[0]->IsUint32() ||
!info[1]->IsUint32() ||
!info[2]->IsInt32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetISRFunc", ""));
}
if (info.Length() >= 4 &&
!info[3]->IsFunction() &&
!info[3]->IsNull() &&
!info[3]->IsUndefined()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetISRFunc", ""));
}
unsigned user_gpio = info[0]->Uint32Value();
unsigned edge = info[1]->Uint32Value();
int timeout = info[2]->Int32Value();
Nan::Callback *callback = 0;
gpioISRFunc_t isrFunc = 0;
if (info.Length() >= 4 && info[3]->IsFunction()) {
callback = new Nan::Callback(info[3].As<v8::Function>());
isrFunc = gpioISRHandler;
}
gpioISR_g[user_gpio].SetCallback(callback);
int rc = gpioSetISRFunc(user_gpio, edge, timeout, isrFunc);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioSetISRFunc");
}
}
// gpioAlertHandler is not executed in the event loop thread
static void gpioAlertHandler(int gpio, int level, uint32_t tick) {
uv_sem_wait(&sem_g);
gpio_g = gpio;
level_g = level;
tick_g = tick;
gpioAlert_g[gpio].AsyncSend();
}
// gpioAlertEventLoopHandler is executed in the event loop thread.
#if NODE_VERSION_AT_LEAST(0, 11, 13)
static void gpioAlertEventLoopHandler(uv_async_t* handle) {
#else
static void gpioAlertEventLoopHandler(uv_async_t* handle, int status) {
#endif
Nan::HandleScope scope;
if (gpioAlert_g[gpio_g].Callback()) {
v8::Local<v8::Value> args[3] = {
Nan::New<v8::Integer>(gpio_g),
Nan::New<v8::Integer>(level_g),
Nan::New<v8::Integer>(tick_g)
};
gpioAlert_g[gpio_g].Callback()->Call(3, args);
}
uv_sem_post(&sem_g);
}
static NAN_METHOD(gpioSetAlertFunc) {
if (info.Length() < 1 ||
!info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetAlertFunc"));
}
if (info.Length() >= 2 &&
!info[1]->IsFunction() &&
!info[1]->IsNull() &&
!info[1]->IsUndefined()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioSetAlertFunc"));
}
unsigned user_gpio = info[0]->Uint32Value();
Nan::Callback *callback = 0;
gpioAlertFunc_t alertFunc = 0;
if (info.Length() >= 2 && info[1]->IsFunction()) {
callback = new Nan::Callback(info[1].As<v8::Function>());
alertFunc = gpioAlertHandler;
}
gpioAlert_g[user_gpio].SetCallback(callback);
int rc = gpioSetAlertFunc(user_gpio, alertFunc);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioSetAlertFunc");
}
}
/* ------------------------------------------------------------------------ */
/* GpioBank */
/* ------------------------------------------------------------------------ */
NAN_METHOD(GpioReadBits_0_31) {
info.GetReturnValue().Set(gpioRead_Bits_0_31());
}
NAN_METHOD(GpioReadBits_32_53) {
info.GetReturnValue().Set(gpioRead_Bits_32_53());
}
NAN_METHOD(GpioWriteBitsSet_0_31) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "GpioWriteBitsSet_0_31", ""));
}
unsigned bits = info[0]->Uint32Value();
int rc = gpioWrite_Bits_0_31_Set(bits);
if (rc < 0) {
return ThrowPigpioError(rc, "GpioWriteBitsSet_0_31");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(GpioWriteBitsSet_32_53) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "GpioWriteBitsSet_32_53", ""));
}
unsigned bits = info[0]->Uint32Value();
int rc = gpioWrite_Bits_32_53_Set(bits);
if (rc < 0) {
return ThrowPigpioError(rc, "GpioWriteBitsSet_32_53");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(GpioWriteBitsClear_0_31) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "GpioWriteBitsClear_0_31", ""));
}
unsigned bits = info[0]->Uint32Value();
int rc = gpioWrite_Bits_0_31_Clear(bits);
if (rc < 0) {
return ThrowPigpioError(rc, "GpioWriteBitsClear_0_31");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(GpioWriteBitsClear_32_53) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "GpioWriteBitsClear_32_53", ""));
}
unsigned bits = info[0]->Uint32Value();
int rc = gpioWrite_Bits_32_53_Clear(bits);
if (rc < 0) {
return ThrowPigpioError(rc, "GpioWriteBitsClear_32_53");
}
info.GetReturnValue().Set(rc);
}
/* ------------------------------------------------------------------------ */
/* Notifier */
/* ------------------------------------------------------------------------ */
NAN_METHOD(gpioNotifyOpen) {
int rc = gpioNotifyOpen();
if (rc < 0) {
return ThrowPigpioError(rc, "gpioNotifyOpen");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioNotifyOpenWithSize) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioNotifyOpenWithSize", ""));
}
unsigned bufSize = info[0]->Uint32Value();
int rc = gpioNotifyOpenWithSize(bufSize);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioNotifyOpen");
}
info.GetReturnValue().Set(rc);
}
NAN_METHOD(gpioNotifyBegin) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioNotifyBegin", ""));
}
unsigned handle = info[0]->Uint32Value();
unsigned bits = info[1]->Uint32Value();
int rc = gpioNotifyBegin(handle, bits);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioNotifyBegin");
}
}
NAN_METHOD(gpioNotifyPause) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioNotifyPause", ""));
}
unsigned handle = info[0]->Uint32Value();
int rc = gpioNotifyPause(handle);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioNotifyPause");
}
}
NAN_METHOD(gpioNotifyClose) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioNotifyClose", ""));
}
unsigned handle = info[0]->Uint32Value();
int rc = gpioNotifyClose(handle);
if (rc < 0) {
return ThrowPigpioError(rc, "gpioNotifyClose");
}
}
/* ------------------------------------------------------------------------ */
/* Configuration */
/* ------------------------------------------------------------------------ */
NAN_METHOD(gpioCfgClock) {
if (info.Length() < 2 || !info[0]->IsUint32() || !info[1]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioCfgClock", ""));
}
unsigned cfgMicros = info[0]->Uint32Value();
unsigned cfgPeripheral = info[1]->Uint32Value();
unsigned cfgSource = 0;
gpioCfgClock(cfgMicros, cfgPeripheral, cfgSource);
}
NAN_METHOD(gpioCfgSocketPort) {
if (info.Length() < 1 || !info[0]->IsUint32()) {
return Nan::ThrowError(Nan::ErrnoException(EINVAL, "gpioCfgSocketPort", ""));
}
unsigned cfgPort = info[0]->Uint32Value();
gpioCfgSocketPort(cfgPort);
}
/*static void SetConst(
Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target,
const char* name,
int value
) {
Nan::Set(target,
Nan::New<v8::String>(name).ToLocalChecked(),
Nan::New<v8::Integer>(value)
);
}*/
static void SetFunction(
Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target,
const char* name,
Nan::FunctionCallback callback
) {
Nan::Set(target,
Nan::New(name).ToLocalChecked(),
Nan::GetFunction(Nan::New<v8::FunctionTemplate>(callback)).ToLocalChecked()
);
}
NAN_MODULE_INIT(InitAll) {
uv_sem_init(&sem_g, 1);
/* mode constants */
/* SetConst(target, "PI_INPUT", PI_INPUT);
SetConst(target, "PI_OUTPUT", PI_OUTPUT);
SetConst(target, "PI_ALT0", PI_ALT0);
SetConst(target, "PI_ALT1", PI_ALT1);
SetConst(target, "PI_ALT2", PI_ALT2);
SetConst(target, "PI_ALT3", PI_ALT3);
SetConst(target, "PI_ALT4", PI_ALT4);
SetConst(target, "PI_ALT5", PI_ALT5);*/
/* pud constants */
/* SetConst(target, "PI_PUD_OFF", PI_PUD_OFF);
SetConst(target, "PI_PUD_DOWN", PI_PUD_DOWN);
SetConst(target, "PI_PUD_UP", PI_PUD_UP);*/
/* isr constants */
/* SetConst(target, "RISING_EDGE", RISING_EDGE);
SetConst(target, "FALLING_EDGE", FALLING_EDGE);
SetConst(target, "EITHER_EDGE", EITHER_EDGE);*/
/* timeout constant */
/* SetConst(target, "PI_TIMEOUT", PI_TIMEOUT); */
/* gpio number constants */
/* SetConst(target, "PI_MIN_GPIO", PI_MIN_GPIO);
SetConst(target, "PI_MAX_GPIO", PI_MAX_GPIO);
SetConst(target, "PI_MAX_USER_GPIO", PI_MAX_USER_GPIO);*/
/* error code constants */
/* SetConst(target, "PI_INIT_FAILED", PI_INIT_FAILED);*/
/* gpioCfgClock cfgPeripheral constants */
/* SetConst(target, "PI_CLOCK_PWM", PI_CLOCK_PWM);
SetConst(target, "PI_CLOCK_PCM", PI_CLOCK_PCM);*/
/* functions */
SetFunction(target, "gpioHardwareRevision", gpioHardwareRevision);
SetFunction(target, "gpioInitialise", gpioInitialise);
SetFunction(target, "gpioTerminate", gpioTerminate);
SetFunction(target, "gpioSetMode", gpioSetMode);
SetFunction(target, "gpioGetMode", gpioGetMode);
SetFunction(target, "gpioSetPullUpDown", gpioSetPullUpDown);
SetFunction(target, "gpioRead", gpioRead);
SetFunction(target, "gpioWrite", gpioWrite);
SetFunction(target, "gpioTrigger", gpioTrigger);
SetFunction(target, "gpioPWM", gpioPWM);
SetFunction(target, "gpioHardwarePWM", gpioHardwarePWM);
SetFunction(target, "gpioGetPWMdutycycle", gpioGetPWMdutycycle);
SetFunction(target, "gpioSetPWMrange", gpioSetPWMrange);
SetFunction(target, "gpioGetPWMrange", gpioGetPWMrange);
SetFunction(target, "gpioGetPWMrealRange", gpioGetPWMrealRange);
SetFunction(target, "gpioSetPWMfrequency", gpioSetPWMfrequency);
SetFunction(target, "gpioGetPWMfrequency", gpioGetPWMfrequency);
SetFunction(target, "gpioServo", gpioServo);
SetFunction(target, "gpioGetServoPulsewidth", gpioGetServoPulsewidth);
SetFunction(target, "gpioSetISRFunc", gpioSetISRFunc);
SetFunction(target, "gpioSetAlertFunc", gpioSetAlertFunc);
SetFunction(target, "GpioReadBits_0_31", GpioReadBits_0_31);
SetFunction(target, "GpioReadBits_32_53", GpioReadBits_32_53);
SetFunction(target, "GpioWriteBitsSet_0_31", GpioWriteBitsSet_0_31);
SetFunction(target, "GpioWriteBitsSet_32_53", GpioWriteBitsSet_32_53);
SetFunction(target, "GpioWriteBitsClear_0_31", GpioWriteBitsClear_0_31);
SetFunction(target, "GpioWriteBitsClear_32_53", GpioWriteBitsClear_32_53);
SetFunction(target, "gpioNotifyOpen", gpioNotifyOpen);
SetFunction(target, "gpioNotifyOpenWithSize", gpioNotifyOpenWithSize);
SetFunction(target, "gpioNotifyBegin", gpioNotifyBegin);
SetFunction(target, "gpioNotifyPause", gpioNotifyPause);
SetFunction(target, "gpioNotifyClose", gpioNotifyClose);
SetFunction(target, "gpioCfgClock", gpioCfgClock);
SetFunction(target, "gpioCfgSocketPort", gpioCfgSocketPort);
}
NODE_MODULE(pigpio, InitAll)
'use strict';
// Generate PWM pulses at 250Hz with a 7us duty cycle and measure the length
// of the pulses with alerts.
var pigpio = require('../'),
Gpio = pigpio.Gpio,
led;
pigpio.configureClock(1, pigpio.CLOCK_PCM);
led = new Gpio(18, {
mode: Gpio.OUTPUT,
alert: true
});
led.digitalWrite(0);
(function () {
var pulseCounts = [],
pulses = 0,
risingTick = 0,
fallingTick,
i;
led.on('alert', function (level, tick) {
var pulseLength;
if (level === 1) {
risingTick = tick;
} else {
fallingTick = tick;
pulseLength = fallingTick - risingTick;
if (pulseCounts[pulseLength] === undefined) {
pulseCounts[pulseLength] = 0;
}
pulseCounts[pulseLength] += 1;
pulses += 1;
if (pulses === 1000) {
for (i = 0; i != pulseCounts.length; i += 1) {
if (pulseCounts[i] !== undefined) {
console.log(i + 'us - ' + pulseCounts[i]);
}
}
led.digitalWrite(0);
led.disableAlert();
}
}
});
}());
// frequency 250Hz, duty cycle 7us
led.hardwarePwmWrite(250, 250*7);
'use strict';
var pigpio = require('../'),
Gpio = pigpio.Gpio,
led,
iv;
//pigpio.configureClock(1, pigpio.CLOCK_PCM);
led = new Gpio(17, {
mode: Gpio.OUTPUT,
alert: true
});
led.digitalWrite(0);
(function () {
var pulseCounts = [],
pulses = 0,
risingTick,
fallingTick,
i;
led.on('alert', function (level, tick) {
var pulseLength;
if (level === 1) {
risingTick = tick;
} else {
fallingTick = tick;
pulseLength = fallingTick - risingTick;
if (pulseCounts[pulseLength] === undefined) {
pulseCounts[pulseLength] = 0;
}
pulseCounts[pulseLength] += 1;
pulses += 1;
if (pulses === 1000) {
for (i = 0; i != pulseCounts.length; i += 1) {
if (pulseCounts[i] !== undefined) {
console.log(i + 'us - ' + pulseCounts[i]);
}
}
clearInterval(iv);
led.digitalWrite(0);
led.disableAlert();
}
}
});
}());
iv = setInterval(function () {
led.trigger(10, 1);
}, 2);
'use strict';
var Gpio = require('../').Gpio,
button = new Gpio(4, {alert: true});
button.on('alert', function (level, tick) {
console.log(level + ' ' + tick);
});
console.log(' press the momentary push button a few times');
'use strict';
var assert = require('assert'),
pigpio = require('../'),
Gpio = pigpio.Gpio,
GpioBank = pigpio.GpioBank,
led17 = new Gpio(17, {mode: Gpio.OUTPUT}),
led18 = new Gpio(18, {mode: Gpio.OUTPUT}),
bank1 = new GpioBank(),
iv;
bank1.clear(1 << 18 | 1 << 17);
assert.strictEqual((bank1.read() >> 17) & 0x3, 0, 'expected 0');
iv = setInterval(function () {
var bits = (bank1.read() >> 17) & 0x3;
if (bits === 0) {
bank1.set(1 << 17);
assert.strictEqual((bank1.read() >> 17) & 0x3, 1, 'expected 1');
} else if (bits === 1) {
bank1.clear(1 << 17);
bank1.set(1 << 18);
assert.strictEqual((bank1.read() >> 17) & 0x3, 2, 'expected 2');
} else if (bits === 2) {
bank1.set(1 << 17);
bank1.set(1 << 18);
assert.strictEqual((bank1.read() >> 17) & 0x3, 3, 'expected 3');
} else if (bits === 3) {
bank1.clear(1 << 17);
bank1.clear(1 << 18);
assert.strictEqual((bank1.read() >> 17) & 0x3, 0, 'expected 0');
}
}, 250);
setTimeout(function () {
bank1.clear(1 << 18 | 1 << 17);
clearInterval(iv);
}, 2000);
'use strict';
var Gpio = require('../').Gpio,
iv,
led = new Gpio(18, {mode: Gpio.OUTPUT});
led.hardwarePwmWrite(10, 500000);
setTimeout(function () {
led.digitalWrite(0);
}, 2000);
'use strict';
var Gpio = require('../').Gpio,
iv,
led = new Gpio(17, {mode: Gpio.OUTPUT});
iv = setInterval(function () {
led.digitalWrite(led.digitalRead() ^ 1);
}, 100);
setTimeout(function () {
led.digitalWrite(0);
clearInterval(iv);
}, 2000);
'use strict';
var pigpio = require('bindings')('pigpio.node'),
iv;
var LED = 17;
pigpio.gpioInitialise();
iv = setInterval(function () {
pigpio.gpioWrite(LED, pigpio.gpioRead(LED) ^ 1);
}, 100);
setTimeout(function () {
pigpio.gpioWrite(LED, 0);
clearInterval(iv);
}, 2000);
'use strict';
// requiring pigpio shouldn't result in the event loop being kept alive if
// nothing is actully performed. If this program doesn't terminate immediately,
// the event loop is being kept alive, which is incorrect.
var pigpio = require('bindings')('pigpio.node');
'use strict';
var pigpio = require('bindings')('pigpio.node'),
time,
ops,
i;
var LED = 17;
pigpio.gpioInitialise();
time = process.hrtime();
for (i = 0; i !== 2000000; i += 1) {
pigpio.gpioWrite(LED, 1);
pigpio.gpioWrite(LED, 0);
}
time = process.hrtime(time);
ops = Math.floor((i * 2) / (time[0] + time[1] / 1E9));
console.log(ops + ' write ops per second');
'use strict';
// If "pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 0)" is not run before
// exiting the process, the following error will often occur the next time the
// program is run:
// initMboxBlock: init mbox zaps failed
var pigpio = require('bindings')('pigpio.node'),
handlerCount = 0;
var BUTTON = 4,
LED = 17;
pigpio.gpioInitialise();
setImmediate(function next() {
handlerCount += 1;
pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 1, function(gpio, level, tick) {
if (handlerCount % 1000 === 0) {
console.log(handlerCount + ' - gpio: ' + gpio + ', level: ' + level + ', tick: ' + tick);
}
if (level !== pigpio.PI_TIMEOUT) {
console.log(handlerCount + ' - gpio: ' + gpio + ', level: ' + level + ', tick: ' + tick);
pigpio.gpioWrite(LED, level);
}
});
setImmediate(next);
});
process.on('SIGINT', function () {
pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 0);
pigpio.gpioTerminate();
process.exit();
});
'use strict';
var pigpio = require('bindings')('pigpio.node'),
irqCount7 = 0,
irqCount9 = 0;
var INPUTS = [7, 9],
OUTPUTS = [8, 11];
pigpio.gpioInitialise();
OUTPUTS.forEach(function (output) {
pigpio.gpioWrite(output, 0);
});
INPUTS.forEach(function (input) {
pigpio.gpioSetISRFunc(input, pigpio.EITHER_EDGE, 0, function(gpio, level, tick) {
if (gpio === 7) {
irqCount7 += 1;
if (irqCount7 < 10000) {
pigpio.gpioWrite(8, level ^ 1);
}
} else if (gpio === 9) {
irqCount9 += 1;
if (irqCount9 < 10000) {
pigpio.gpioWrite(11, level ^ 1);
}
}
if (irqCount7 === 10000 & irqCount9 === 10000) {
console.log('20000 interrupts detected');
INPUTS.forEach(function (input) {
pigpio.gpioSetISRFunc(input, pigpio.EITHER_EDGE, 0);
});
}
});
});
setTimeout(function () {
OUTPUTS.forEach(function (output) {
pigpio.gpioWrite(output, 1);
});
}, 10);
'use strict';
var pigpio = require('bindings')('pigpio.node'),
irqCount = 0;
var INPUT = 7,
OUTPUT = 8;
pigpio.gpioInitialise();
pigpio.gpioWrite(OUTPUT, 0);
pigpio.gpioSetISRFunc(INPUT, pigpio.EITHER_EDGE, 0, function(gpio, level, tick) {
irqCount += 1;
pigpio.gpioWrite(OUTPUT, level ^ 1);
});
// Delay for 1ms before triggering the first interrupt. This delay is necessary
// inorder to give the thread started by the call to gpioSetISRFunc above
// enough time to consume any existing interrupt before calling poll for the
// first time. Without the 1ms delay, the first interrupt which is triggered by
// gpioWrite below may also be consumed and thrown away.
setTimeout(function () {
var time = process.hrtime();
pigpio.gpioWrite(OUTPUT, 1);
setTimeout(function () {
var irqPerSec;
time = process.hrtime(time);
irqPerSec = Math.floor(irqCount / (time[0] + time[1] / 1E9));
console.log(irqPerSec + ' interrupts per second');
// Stop listening for interrupts
pigpio.gpioSetISRFunc(INPUT, pigpio.EITHER_EDGE, 0);
}, 1000);
}, 1);
'use strict';
var pigpio = require('bindings')('pigpio.node');
var BUTTON = 4,
LED = 17;
pigpio.gpioInitialise()
setInterval(function () {
pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 100, function(gpio, level, tick) {
console.log('gpio: ' + gpio + ', level: ' + level + ', tick: ' + tick);
if (level !== pigpio.PI_TIMEOUT) {
pigpio.gpioWrite(LED, level);
}
});
setTimeout(function () {
pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 0);
}, 1000)
}, 2000);
/*setTimeout(function () {
pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 0);
}, 2000);*/
console.log('hit the button a few times');
'use strict';
var pigpio = require('bindings')('pigpio.node');
var BUTTON = 4,
LED = 17;
pigpio.gpioInitialise()
pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 0, function(gpio, level, tick) {
console.log('gpio: ' + gpio + ', level: ' + level);
pigpio.gpioWrite(LED, level);
});
setTimeout(function () {
pigpio.gpioSetISRFunc(BUTTON, pigpio.EITHER_EDGE, 0);
}, 2000);
console.log('hit the button a few times');
'use strict';
var pigpio = require('bindings')('pigpio.node'),
leds = [5, 6, 12, 13, 16, 17, 19, 20, 21, 26],
dutycycle = 0;
pigpio.gpioInitialise();
setInterval(function () {
leds.forEach(function (led) {
pigpio.gpioPWM(led, dutycycle);
});
dutycycle += 5;
if (dutycycle > 255) {
dutycycle = 0;
}
}, 20);
#!/bin/sh
node blinky
node do-nothing
node gpio-write-performance
node irq-handle-2-inputs
node irq-performance
node light-switch
'use strict';
var Gpio = require('../').Gpio,
button = new Gpio(4, {
mode: Gpio.INPUT,
pullUpDown: Gpio.PUD_DOWN
}),
time,
ops,
i;
time = process.hrtime();
for (i = 0; i !== 2000000; i += 1) {
button.digitalRead();
}
time = process.hrtime(time);
ops = Math.floor(i / (time[0] + time[1] / 1E9));
console.log(' ' + ops + ' read ops per second');
'use strict';
var Gpio = require('../').Gpio,
led = new Gpio(17, {mode: Gpio.OUTPUT}),
time,
ops,
i;
time = process.hrtime();
for (i = 0; i !== 2000000; i += 1) {
led.digitalWrite(1);
led.digitalWrite(0);
}
time = process.hrtime(time);
ops = Math.floor((i * 2) / (time[0] + time[1] / 1E9));
console.log(' ' + ops + ' write ops per second');
'use strict';
// requiring pigpio shouldn't result in the event loop being kept alive if
// nothing is actully performed. If this program doesn't terminate immediately,
// the event loop is being kept alive, which is incorrect.
var pigpio = require('../');
'use strict';
var assert = require('assert'),
Gpio = require('../').Gpio,
gpio7 = new Gpio(7, {mode: Gpio.INPUT}),
gpio8 = new Gpio(8, {mode: Gpio.OUTPUT});
assert.strictEqual(gpio7.getMode(), Gpio.INPUT, 'expected INPUT mode for gpio7');
assert.strictEqual(gpio8.getMode(), Gpio.OUTPUT, 'expected OUTPUT mode for gpio8');
gpio8.mode(Gpio.INPUT);
assert.strictEqual(gpio8.getMode(), Gpio.INPUT, 'expected INPUT mode for gpio8');
gpio7.mode(Gpio.OUTPUT);
assert.strictEqual(gpio7.getMode(), Gpio.OUTPUT, 'expected OUTPUT mode for gpio7');
gpio7.mode(Gpio.INPUT);
assert.strictEqual(gpio7.getMode(), Gpio.INPUT, 'expected INPUT mode for gpio7');
'use strict';
var assert = require('assert'),
Gpio = require('../').Gpio;
assert.strictEqual(Gpio.MIN_GPIO, 0, 'expected Gpio.MIN_GPIO to be 0');
assert.strictEqual(Gpio.MAX_GPIO, 53, 'expected Gpio.MAX_GPIO to be 53');
assert.strictEqual(Gpio.MAX_USER_GPIO, 31, 'expected Gpio.MAX_USER_GPIO to be 31');
'use strict';
var pigpio = require('../');
console.log('Hardware Revision: ' + pigpio.hardwareRevision().toString(16));
'use strict';
// GPIO7 needs to be connected to GPIO8 with a 1K resistor for this test.
var Gpio = require('../').Gpio,
input = new Gpio(7, {mode: Gpio.INPUT}),
output = new Gpio(8, {mode: Gpio.OUTPUT}),
risingCount = 0,
fallingCount = 0,
iv;
// Put output (and input) in a known state.
output.digitalWrite(0);
// Toggle output (and input) every 10 ms
iv = setInterval(function () {
output.digitalWrite(output.digitalRead() ^ 1);
}, 10);
// ISR
input.on('interrupt', function (level) {
if (level === 0) {
fallingCount += 1;
} else if (level === 1) {
risingCount += 1;
}
});
function noEdge() {
console.log(' no edge');
input.disableInterrupt();
risingCount = 0;
fallingCount = 0;
setTimeout(function () {
console.log(' ' + risingCount + ' rising edge interrupts (0 expected)');
console.log(' ' + fallingCount + ' falling edge interrupts (0 expected)');
clearInterval(iv);
input.disableInterrupt();
}, 1000)
}
function fallingEdge() {
console.log(' falling edge');
input.enableInterrupt(Gpio.FALLING_EDGE);
risingCount = 0;
fallingCount = 0;
setTimeout(function () {
console.log(' ' + risingCount + ' rising edge interrupts (0 expected)');
console.log(' ' + fallingCount + ' falling edge interrupts (~50 expected)');
noEdge();
}, 1000)
}
function risingEdge() {
console.log(' rising edge');
input.enableInterrupt(Gpio.RISING_EDGE);
risingCount = 0;
fallingCount = 0;
setTimeout(function () {
console.log(' ' + risingCount + ' rising edge interrupts (~50 expected)');
console.log(' ' + fallingCount + ' falling edge interrupts (0 expected)');
fallingEdge();
}, 1000)
}
(function eitherEdge() {
console.log(' either edge');
input.enableInterrupt(Gpio.EITHER_EDGE);
risingCount = 0;
fallingCount = 0;
setTimeout(function () {
console.log(' ' + risingCount + ' rising edge interrupts (~50 expected)');
console.log(' ' + fallingCount + ' falling edge interrupts (~50 expected)');
risingEdge();
}, 1000);
}());
'use strict';
// For this test to work
// - GPIO7 needs to be connected to GPIO8 with a 1K resistor
// - GPIO9 needs to be connected to GPIO11 with a 1K resistor
var Gpio = require('../').Gpio;
[[7, 8], [9, 11]].forEach(function (gpioNos) {
var interruptCount= 0,
input = new Gpio(gpioNos[0], {mode: Gpio.INPUT, edge: Gpio.EITHER_EDGE}),
output = new Gpio(gpioNos[1], {mode: Gpio.OUTPUT});
// Put input and output in a known state
output.digitalWrite(0);
input.on('interrupt', function (level) {
interruptCount += 1;
output.digitalWrite(level ^ 1);
if (interruptCount === 1000) {
console.log(' ' + interruptCount + ' interrupts detected on GPIO' + gpioNos[0]);
input.disableInterrupt();
}
});
setTimeout(function () {
// Trigger first interrupt
output.digitalWrite(1);
}, 1);
});
'use strict';
// GPIO7 needs to be connected to GPIO8 with a 1K resistor for this test.
var Gpio = require('../').Gpio,
interruptCount = 0,
input = new Gpio(7, {mode: Gpio.INPUT, edge: Gpio.EITHER_EDGE}),
output = new Gpio(8, {mode: Gpio.OUTPUT});
output.digitalWrite(0);
input.on('interrupt', function (level) {
interruptCount++;
output.digitalWrite(level ^ 1);
});
setTimeout(function () {
var time = process.hrtime();
output.digitalWrite(1);
setTimeout(function () {
var interruptsPerSec;
time = process.hrtime(time);
interruptsPerSec = Math.floor(interruptCount / (time[0] + time[1] / 1E9));
console.log(' ' + interruptsPerSec + ' interrupts per second');
input.disableInterrupt();
}, 1000);
}, 1);
'use strict';
var Gpio = require('../').Gpio,
timeoutCount = 0,
input = new Gpio(7, {mode: Gpio.INPUT, edge: Gpio.EITHER_EDGE, timeout: 100});
input.on('interrupt', function (level) {
if (level === Gpio.TIMEOUT) {
timeoutCount++;
}
});
setTimeout(function () {
console.log(' ' + timeoutCount + ' timeouts detected (~10 expected)');
input.enableInterrupt(Gpio.EITHER_EDGE, 1);
timeoutCount = 0;
setTimeout(function () {
input.disableInterrupt();
console.log(' ' + timeoutCount + ' timeouts detected (~1000 expected)');
}, 1000);
}, 1000);
'use strict';
var Gpio = require('../').Gpio,
timeoutCount = 0,
input = new Gpio(7, {mode: Gpio.INPUT, edge: Gpio.EITHER_EDGE, timeout: 10});
input.on('interrupt', function (level) {
if (level === Gpio.TIMEOUT) {
timeoutCount++;
}
});
setTimeout(function () {
console.log(' ' + timeoutCount + ' timeouts detected (~100 expected)');
input.enableInterrupt(Gpio.EITHER_EDGE);
timeoutCount = 0;
setTimeout(function () {
input.disableInterrupt();
console.log(' ' + timeoutCount + ' timeouts detected (0 expected)');
}, 1000);
}, 1000);
'use strict';
var Gpio = require('../').Gpio,
button = new Gpio(4, {
mode: Gpio.INPUT,
pullUpDown: Gpio.PUD_DOWN,
edge: Gpio.EITHER_EDGE
}),
led = new Gpio(17, {mode: Gpio.OUTPUT});
button.on('interrupt', function (level) {
led.digitalWrite(level);
});
setTimeout(function () {
led.digitalWrite(0);
button.disableInterrupt();
}, 2000);
console.log(' press the momentary push button a few times');
'use strict';
var pigpio = require('../'),
Gpio = pigpio.Gpio,
Notifier = pigpio.Notifier,
notifierCount = 0;
var LED_GPIO = 18,
FREQUENCY = 25000;
(function () {
var led = new Gpio(LED_GPIO, {mode: Gpio.OUTPUT});
led.hardwarePwmWrite(FREQUENCY, 500000);
}());
(function next() {
var ledNotifier = new Notifier({bits: 1 << LED_GPIO}),
closing = false;
ledNotifier.stream().on('data', function (buf) {
if (!closing) {
ledNotifier.stream().on('close', function () {
notifierCount += 1;
if (notifierCount % 1000 === 0) {
console.log(notifierCount);
}
if (notifierCount < 100000) {
next();
}
});
ledNotifier.close();
closing = true;
}
});
}());
'use strict';
var pigpio = require('../'),
Gpio = pigpio.Gpio,
Notifier = pigpio.Notifier;
var LED_GPIO = 18,
FREQUENCY = 25000;
(function () {
var led = new Gpio(LED_GPIO, {mode: Gpio.OUTPUT});
led.hardwarePwmWrite(FREQUENCY, 500000);
}());
(function () {
var ledNotifier = new Notifier({bits: 1 << LED_GPIO}),
notificationsReceived = 0,
seqnoErrors = 0,
ledStateErrors = 0,
lastSeqno,
lastLedState,
lastTick,
minTickDiff = 0xffffffff,
maxTickDiff = 0;
ledNotifier.stream().on('data', function (buf) {
var ix = 0;
for (ix = 0; ix < buf.length; ix += Notifier.NOTIFICATION_LENGTH) {
var seqno = buf.readUInt16LE(ix);
var tick = buf.readUInt32LE(ix + 4);
var level = buf.readUInt32LE(ix + 8);
if (notificationsReceived > 0) {
if (lastLedState === (level & (1 << LED_GPIO))) {
console.log(' unexpected led state');
ledStateErrors += 1;
}
if ((lastSeqno + 1) !== seqno) {
console.log(' seqno error, was %d, expected %d', seqno, lastSeqno + 1);
seqnoErrors += 1;
}
if (tick - lastTick < minTickDiff) {
minTickDiff = tick - lastTick;
}
if (tick - lastTick > maxTickDiff) {
maxTickDiff = tick - lastTick;
}
}
notificationsReceived += 1;
lastSeqno = seqno;
lastLedState = level & (1 << LED_GPIO);
lastTick = tick;
}
if (notificationsReceived >= 50000) {
ledNotifier.stream().pause();
ledNotifier.close();
console.log(' notifications: %d', notificationsReceived);
console.log(' seqno errors: %d', seqnoErrors);
console.log(' led state errors: %d', ledStateErrors);
console.log(' expected tick diff: %d us', 1000000 / (FREQUENCY * 2));
console.log(' min tick diff: %d us', minTickDiff);
console.log(' max tick diff: %d us', maxTickDiff);
}
});
}());
'use strict';
var pigpio = require('../'),
Gpio = pigpio.Gpio,
Notifier = pigpio.Notifier;
var LED_GPIO = 18,
FREQUENCY = 150000;
pigpio.configureClock(1, pigpio.CLOCK_PCM);
(function () {
var led = new Gpio(LED_GPIO, {mode: Gpio.OUTPUT});
led.hardwarePwmWrite(FREQUENCY, 500000);
}());
(function () {
var ledNotifier = new Notifier({bits: 1 << LED_GPIO}),
notificationsReceived = 0,
events = 0,
seqnoErrors = 0,
ledStateErrors = 0,
lastSeqno,
lastLedState,
lastTick,
minTickDiff = 0xffffffff,
maxTickDiff = 0,
restBuf = null,
iv;
function printInfo() {
console.log();
console.log(' events: %d', events);
console.log(' notifications: %d', notificationsReceived);
console.log(' seqno errors: %d', seqnoErrors);
console.log(' led state errors: %d', ledStateErrors);
console.log(' expected tick diff: %d us', 1000000 / (FREQUENCY * 2));
console.log(' min tick diff: %d us', minTickDiff);
console.log(' max tick diff: %d us', maxTickDiff);
minTickDiff = 0xffffffff;
maxTickDiff = 0;
}
ledNotifier.stream().on('data', function (buf) {
var ix,
entries,
rest;
events += 1;
if (restBuf !== null) {
buf = Buffer.concat([restBuf, buf]);
}
entries = Math.floor(buf.length / Notifier.NOTIFICATION_LENGTH);
rest = buf.length % Notifier.NOTIFICATION_LENGTH;
if (rest === 0) {
restBuf = null;
} else {
restBuf = new Buffer(buf.slice(buf.length - rest));
}
for (ix = 0; ix < buf.length - rest; ix += Notifier.NOTIFICATION_LENGTH) {
var seqno = buf.readUInt16LE(ix);
var tick = buf.readUInt32LE(ix + 4);
var level = buf.readUInt32LE(ix + 8);
if (notificationsReceived > 0) {
if (lastLedState === (level & (1 << LED_GPIO))) {
console.log(' unexpected led state');
ledStateErrors += 1;
}
if (((lastSeqno + 1) & 0xffff) !== seqno) {
console.log(' seqno error, was %d, expected %d', seqno, lastSeqno + 1);
seqnoErrors += 1;
}
if (tick - lastTick < minTickDiff) {
minTickDiff = tick - lastTick;
}
if (tick - lastTick > maxTickDiff) {
maxTickDiff = tick - lastTick;
}
}
notificationsReceived += 1;
lastSeqno = seqno;
lastLedState = level & (1 << LED_GPIO);
lastTick = tick;
}
if (notificationsReceived >= 1e9) {
ledNotifier.stream().pause();
ledNotifier.close();
clearInterval(iv);
printInfo();
}
});
iv = setInterval(printInfo, 5000);
}());
'use strict';
var pigpio = require('../'),
Gpio = pigpio.Gpio,
Notifier = pigpio.Notifier;
var LED_GPIO = 17,
LED_TOGGLES = 1000;
(function () {
var led = new Gpio(LED_GPIO, {mode: Gpio.OUTPUT}),
ledToggles = 0,
lastTime = process.hrtime(),
minSetIntervalDiff = 0xffffffff,
maxSetIntervalDiff = 0,
iv;
iv = setInterval(function () {
var time = process.hrtime(),
diff = Math.floor(((time[0] * 1e9 + time[1]) - (lastTime[0] * 1e9 + lastTime[1])) / 1000);
lastTime = time;
if (diff < minSetIntervalDiff) {
minSetIntervalDiff = diff;
}
if (diff > maxSetIntervalDiff) {
maxSetIntervalDiff = diff;
}
led.digitalWrite(led.digitalRead() ^ 1);
ledToggles += 1;
if (ledToggles === LED_TOGGLES) {
clearInterval(iv);
console.log(' led toggles: %d', ledToggles);
console.log(' min setInterval diff: %d us', minSetIntervalDiff);
console.log(' max setInterval diff: %d us', maxSetIntervalDiff);
}
}, 1);
}());
(function () {
var ledNotifier = new Notifier({bits: 1 << LED_GPIO}),
notificationsReceived = 0,
seqnoErrors = 0,
ledStateErrors = 0,
lastSeqno,
lastLedState,
lastTick,
minTickDiff = 0xffffffff,
maxTickDiff = 0;
ledNotifier.stream().on('data', function (buf) {
var ix = 0;
for (ix = 0; ix < buf.length; ix += Notifier.NOTIFICATION_LENGTH) {
var seqno = buf.readUInt16LE(ix);
var tick = buf.readUInt32LE(ix + 4);
var level = buf.readUInt32LE(ix + 8);
if (notificationsReceived > 0) {
if (lastLedState === (level & (1 << LED_GPIO))) {
console.log(' unexpected led state');
ledStateErrors += 1;
}
if ((lastSeqno + 1) !== seqno) {
console.log(' seqno error, was %d, expected %d', seqno, lastSeqno + 1);
seqnoErrors += 1;
}
if (tick - lastTick < minTickDiff) {
minTickDiff = tick - lastTick;
}
if (tick - lastTick > maxTickDiff) {
maxTickDiff = tick - lastTick;
}
}
notificationsReceived += 1;
lastSeqno = seqno;
lastLedState = level & (1 << LED_GPIO);
lastTick = tick;
}
if (notificationsReceived >= LED_TOGGLES) {
ledNotifier.close();
console.log(' notifications: %d', notificationsReceived);
console.log(' seqno errors: %d', seqnoErrors);
console.log(' led state errors: %d', ledStateErrors);
console.log(' min tick diff: %d us', minTickDiff);
console.log(' max tick diff: %d us', maxTickDiff);
}
});
}());
'use strict';
var assert = require('assert'),
Gpio = require('../').Gpio,
input = new Gpio(22, {mode: Gpio.INPUT, pullUpDown: Gpio.PUD_UP});
assert.strictEqual(input.digitalRead(), 1, 'expected gpio22 to be 1');
input.pullUpDown(Gpio.PUD_DOWN);
assert.strictEqual(input.digitalRead(), 0, 'expected gpio22 to be 0');
'use strict';
var assert = require('assert'),
Gpio = require('../').Gpio,
iv,
led = new Gpio(17, {mode: Gpio.OUTPUT}),
dutyCycle = 0;
iv = setInterval(function () {
var dutyCycleRead;
led.pwmWrite(dutyCycle);
dutyCycleRead = led.getPwmDutyCycle();
assert.strictEqual(dutyCycleRead, dutyCycle,
'expected dutyCycle to be ' + dutyCycle + ', not ' + dutyCycleRead
);
dutyCycle += 5;
if (dutyCycle > 255) {
dutyCycle = 0;
}
}, 20);
setTimeout(function () {
led.digitalWrite(0);
clearInterval(iv);
}, 2000);
'use strict';
var assert = require('assert'),
Gpio = require('../').Gpio,
iv,
led = new Gpio(18, {mode: Gpio.OUTPUT}),
dutyCycle;
assert.strictEqual(led.getPwmRange(), 255, 'expected pwm range to be 255');
assert.strictEqual(led.getPwmRealRange(), 250, 'expected pwm real range to be 250');
assert.strictEqual(led.getPwmFrequency(), 800, 'expected get pwm frequency to be 800');
led.pwmRange(125);
assert.strictEqual(led.getPwmRange(), 125, 'expected pwm range to be 125');
assert.strictEqual(led.getPwmRealRange(), 250, 'expected pwm real range to be 250');
assert.strictEqual(led.getPwmFrequency(), 800, 'expected get pwm frequency to be 800');
led.pwmFrequency(2000)
assert.strictEqual(led.getPwmRange(), 125, 'expected pwm range to be 125');
assert.strictEqual(led.getPwmRealRange(), 100, 'expected pwm real range to be 100');
assert.strictEqual(led.getPwmFrequency(), 2000, 'expected get pwm frequency to be 2000');
dutyCycle = Math.floor(led.getPwmRange() / 2);
led.pwmWrite(dutyCycle);
assert.strictEqual(led.getPwmDutyCycle(), dutyCycle, 'expected duty cycle to be ' + dutyCycle);
led.hardwarePwmWrite(1e7, 500000);
assert.strictEqual(led.getPwmRange(), 1e6, 'expected pwm range to be 1e6');
assert.strictEqual(led.getPwmRealRange(), 25, 'expected pwm real range to be 25');
assert.strictEqual(led.getPwmFrequency(), 1e7, 'expected get pwm frequency to be 1e7');
assert.strictEqual(led.getPwmDutyCycle(), 500000, 'expected duty cycle to be 500000');
led.digitalWrite(0);
assert.strictEqual(led.getPwmRange(), 125, 'expected pwm range to be 125');
assert.strictEqual(led.getPwmRealRange(), 100, 'expected pwm real range to be 100');
assert.strictEqual(led.getPwmFrequency(), 2000, 'expected get pwm frequency to be 2000');
#!/bin/sh
echo hardware-revision
node hardware-revision
echo banked-leds
node banked-leds
echo blinky
node blinky
echo blinky-pwm
node blinky-pwm
echo digital-read-performance
node digital-read-performance
echo digital-write-performance
node digital-write-performance
echo do-nothing
node do-nothing
echo gpio-mode
node gpio-mode
echo gpio-numbers
node gpio-numbers
echo isr-enable-disable
node isr-enable-disable
echo isr-multiple-sources
node isr-multiple-sources
echo isr-performance
node isr-performance
echo isr-timeouts
node isr-timeouts
echo isr-timeouts-2
node isr-timeouts-2
echo light-switch
node light-switch
echo notifier
node notifier
echo notifier-pwm
node notifier-pwm
echo pull-up-down
node pull-up-down
echo pulse-led
node pulse-led
echo pwm
node pwm
echo servo-control
node servo-control
echo terminate
node terminate
echo trigger-led
node trigger-led
'use strict';
var assert = require('assert'),
Gpio = require('../').Gpio,
iv,
motor = new Gpio(17, {mode: Gpio.OUTPUT}),
pulseWidth = 500;
motor.servoWrite(0);
assert.strictEqual(motor.getServoPulseWidth(), 0,
'expected pulseWidth to be 0'
);
iv = setInterval(function () {
var pulseWidthRead;
motor.servoWrite(pulseWidth);
pulseWidthRead = motor.getServoPulseWidth();
assert.strictEqual(pulseWidthRead, pulseWidth,
'expected pulseWidth to be ' + pulseWidth + ', not ' + pulseWidthRead
);
pulseWidth += 25;
if (pulseWidth > 2500) {
pulseWidth = 500;
}
}, 20);
setTimeout(function () {
motor.digitalWrite(0);
clearInterval(iv);
}, 2000);
'use strict';
var pigpio = require('../'),
Gpio = pigpio.Gpio,
led = new Gpio(17, {mode: Gpio.OUTPUT});
led.digitalWrite(1);
setTimeout(function () {
pigpio.terminate();
// Creating a new Gpio object should automatically re-initialize
// the pigpio library.
led = new Gpio(17, {mode: Gpio.OUTPUT});
// If the pigpio library was not re-initialized calling digitalWrite will
// result in an excption. See https://github.com/fivdi/pigpio/issues/34
led.digitalWrite(0);
}, 500);
'use strict';
var Gpio = require('../').Gpio,
iv,
led = new Gpio(17, {mode: Gpio.OUTPUT});
iv = setInterval(function () {
led.trigger(100, 1);
}, 2);
setTimeout(function () {
led.digitalWrite(0);
clearInterval(iv);
}, 2000);
......@@ -41,9 +41,9 @@ all_deps :=
CC.target ?= $(CC)
CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
CFLAGS.target ?= $(CFLAGS)
CXX.target ?= $(CXX)
CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
CXXFLAGS.target ?= $(CXXFLAGS) $(CPPFLAGS)
LINK.target ?= $(LINK)
LDFLAGS.target ?= $(LDFLAGS)
AR.target ?= $(AR)
......@@ -54,9 +54,9 @@ LINK ?= $(CXX.target)
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
# to replicate this environment fallback in make as well.
CC.host ?= gcc
CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
CFLAGS.host ?=
CXX.host ?= g++
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
CXXFLAGS.host ?=
LINK.host ?= $(CXX.host)
LDFLAGS.host ?=
AR.host ?= ar
......@@ -126,52 +126,46 @@ cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $
quiet_cmd_cxx = CXX($(TOOLSET)) $@
cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_objc = CXX($(TOOLSET)) $@
cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_objcxx = CXX($(TOOLSET)) $@
cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# Commands for precompiled header files.
quiet_cmd_pch_c = CXX($(TOOLSET)) $@
cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_cc = CXX($(TOOLSET)) $@
cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $<
quiet_cmd_pch_m = CXX($(TOOLSET)) $@
cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $<
quiet_cmd_pch_mm = CXX($(TOOLSET)) $@
cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $<
# gyp-mac-tool is written next to the root Makefile by gyp.
# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd
# already.
quiet_cmd_mac_tool = MACTOOL $(4) $<
cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@"
quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@
cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4)
quiet_cmd_infoplist = INFOPLIST $@
cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@"
quiet_cmd_touch = TOUCH $@
cmd_touch = touch $@
quiet_cmd_copy = COPY $@
# send stderr to /dev/null to ignore messages when linking directories.
cmd_copy = rm -rf "$@" && cp -af "$<" "$@"
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
quiet_cmd_alink = LIBTOOL-STATIC $@
cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^)
quiet_cmd_alink = AR($(TOOLSET)) $@
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
# Due to circular dependencies between libraries :(, we wrap the
# special "figure out circular dependencies" flags around the entire
# input list during linking.
quiet_cmd_link = LINK($(TOOLSET)) $@
cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
# We support two kinds of shared objects (.so):
# 1) shared_library, which is just bundling together many dependent libraries
# into a link line.
# 2) loadable_module, which is generating a module intended for dlopen().
#
# They differ only slightly:
# In the former case, we want to package all dependent code into the .so.
# In the latter case, we want to package just the API exposed by the
# outermost module.
# This means shared_library uses --whole-archive, while loadable_module doesn't.
# (Note that --whole-archive is incompatible with the --start-group used in
# normal linking.)
# Other shared-object link notes:
# - Set SONAME to the library filename so our binaries don't reference
# the local, absolute paths used on the link command-line.
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS)
cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS)
cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
# Define an escape_quotes function to escape single quotes.
......@@ -236,7 +230,7 @@ define do_cmd
$(if $(or $(command_changed),$(prereq_changed)),
@$(call exact_echo, $($(quiet)cmd_$(1)))
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
$(if $(findstring flock,$(word 2,$(cmd_$1))),
$(if $(findstring flock,$(word 1,$(cmd_$1))),
@$(cmd_$(1))
@echo " $(quiet_cmd_$(1)): Finished",
@$(cmd_$(1))
......@@ -274,10 +268,6 @@ $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
......@@ -292,10 +282,6 @@ $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
......@@ -309,10 +295,6 @@ $(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
@$(call do_cmd,cxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD
@$(call do_cmd,objc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD
@$(call do_cmd,objcxx,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
@$(call do_cmd,cc,1)
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
......@@ -331,8 +313,8 @@ ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
endif
quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/scollado/proyecto-micro/node_modules/uws/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/scollado/.node-gyp/6.11.3/include/node/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/scollado/.node-gyp/6.11.3" "-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/scollado/.node-gyp/6.11.3/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/scollado/proyecto-micro/node_modules/uws" "-Dnode_engine=v8" binding.gyp
Makefile: $(srcdir)/../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../.node-gyp/6.11.3/include/node/common.gypi
cmd_regen_makefile = cd $(srcdir); /usr/share/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/home/pi/proyecto-micro/node_modules/uws/build/config.gypi -I/usr/share/node-gyp/addon.gypi -I/usr/include/nodejs/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/usr/include/nodejs" "-Dnode_gyp_dir=/usr/share/node-gyp" "-Dnode_lib_file=node.lib" "-Dmodule_root_dir=/home/pi/proyecto-micro/node_modules/uws" binding.gyp
Makefile: $(srcdir)/../../../../../usr/include/nodejs/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../usr/share/node-gyp/addon.gypi
$(call do_cmd,regen_makefile)
# "all" is a concatenation of the "all" targets from all the included
......
cmd_Release/obj.target/uws.node := g++ -shared -pthread -s -Wl,-soname=uws.node -o Release/obj.target/uws.node -Wl,--start-group Release/obj.target/uws/src/Extensions.o Release/obj.target/uws/src/Group.o Release/obj.target/uws/src/Networking.o Release/obj.target/uws/src/Hub.o Release/obj.target/uws/src/Node.o Release/obj.target/uws/src/WebSocket.o Release/obj.target/uws/src/HTTPSocket.o Release/obj.target/uws/src/Socket.o Release/obj.target/uws/src/addon.o -Wl,--end-group
cmd_Release/obj.target/uws/src/Extensions.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Extensions.o.d.raw -c -o Release/obj.target/uws/src/Extensions.o ../src/Extensions.cpp
cmd_Release/obj.target/uws/src/Extensions.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Extensions.o.d.raw -c -o Release/obj.target/uws/src/Extensions.o ../src/Extensions.cpp
Release/obj.target/uws/src/Extensions.o: ../src/Extensions.cpp \
../src/Extensions.h
../src/Extensions.cpp:
......
cmd_Release/obj.target/uws/src/Group.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Group.o.d.raw -c -o Release/obj.target/uws/src/Group.o ../src/Group.cpp
cmd_Release/obj.target/uws/src/Group.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Group.o.d.raw -c -o Release/obj.target/uws/src/Group.o ../src/Group.cpp
Release/obj.target/uws/src/Group.o: ../src/Group.cpp ../src/Group.h \
../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h \
../src/Socket.h ../src/HTTPSocket.h ../src/Extensions.h ../src/Hub.h \
../src/Node.h /Users/scollado/.node-gyp/6.11.3/include/node/zlib.h \
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h
../src/Backend.h ../src/Libuv.h /usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h ../src/Socket.h \
../src/HTTPSocket.h ../src/Extensions.h ../src/Hub.h ../src/Node.h
../src/Group.cpp:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
../src/Socket.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Hub.h:
../src/Node.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zlib.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h:
cmd_Release/obj.target/uws/src/HTTPSocket.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/HTTPSocket.o.d.raw -c -o Release/obj.target/uws/src/HTTPSocket.o ../src/HTTPSocket.cpp
cmd_Release/obj.target/uws/src/HTTPSocket.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/HTTPSocket.o.d.raw -c -o Release/obj.target/uws/src/HTTPSocket.o ../src/HTTPSocket.cpp
Release/obj.target/uws/src/HTTPSocket.o: ../src/HTTPSocket.cpp \
../src/HTTPSocket.h ../src/Socket.h ../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h \
../src/Group.h ../src/WebSocket.h ../src/WebSocketProtocol.h \
../src/Extensions.h
../src/HTTPSocket.h ../src/Socket.h ../src/Networking.h ../src/Backend.h \
../src/Libuv.h /usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h ../src/Group.h \
../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Extensions.h
../src/HTTPSocket.cpp:
../src/HTTPSocket.h:
../src/Socket.h:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
......
cmd_Release/obj.target/uws/src/Hub.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Hub.o.d.raw -c -o Release/obj.target/uws/src/Hub.o ../src/Hub.cpp
cmd_Release/obj.target/uws/src/Hub.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Hub.o.d.raw -c -o Release/obj.target/uws/src/Hub.o ../src/Hub.cpp
Release/obj.target/uws/src/Hub.o: ../src/Hub.cpp ../src/Hub.h \
../src/Group.h ../src/WebSocket.h ../src/WebSocketProtocol.h \
../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h \
../src/Socket.h ../src/HTTPSocket.h ../src/Extensions.h ../src/Node.h \
/Users/scollado/.node-gyp/6.11.3/include/node/zlib.h \
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h
../src/Networking.h ../src/Backend.h ../src/Libuv.h \
/usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h ../src/Socket.h \
../src/HTTPSocket.h ../src/Extensions.h ../src/Node.h
../src/Hub.cpp:
../src/Hub.h:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
../src/Socket.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Node.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zlib.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h:
cmd_Release/obj.target/uws/src/Networking.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Networking.o.d.raw -c -o Release/obj.target/uws/src/Networking.o ../src/Networking.cpp
cmd_Release/obj.target/uws/src/Networking.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Networking.o.d.raw -c -o Release/obj.target/uws/src/Networking.o ../src/Networking.cpp
Release/obj.target/uws/src/Networking.o: ../src/Networking.cpp \
../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h
../src/Networking.h ../src/Backend.h ../src/Libuv.h \
/usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h
../src/Networking.cpp:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
cmd_Release/obj.target/uws/src/Node.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Node.o.d.raw -c -o Release/obj.target/uws/src/Node.o ../src/Node.cpp
cmd_Release/obj.target/uws/src/Node.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Node.o.d.raw -c -o Release/obj.target/uws/src/Node.o ../src/Node.cpp
Release/obj.target/uws/src/Node.o: ../src/Node.cpp ../src/Node.h \
../src/Socket.h ../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h
../src/Socket.h ../src/Networking.h ../src/Backend.h ../src/Libuv.h \
/usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h
../src/Node.cpp:
../src/Node.h:
../src/Socket.h:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
cmd_Release/obj.target/uws/src/Socket.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Socket.o.d.raw -c -o Release/obj.target/uws/src/Socket.o ../src/Socket.cpp
cmd_Release/obj.target/uws/src/Socket.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/Socket.o.d.raw -c -o Release/obj.target/uws/src/Socket.o ../src/Socket.cpp
Release/obj.target/uws/src/Socket.o: ../src/Socket.cpp ../src/Socket.h \
../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h
../src/Networking.h ../src/Backend.h ../src/Libuv.h \
/usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h
../src/Socket.cpp:
../src/Socket.h:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
cmd_Release/obj.target/uws/src/WebSocket.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/WebSocket.o.d.raw -c -o Release/obj.target/uws/src/WebSocket.o ../src/WebSocket.cpp
cmd_Release/obj.target/uws/src/WebSocket.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/WebSocket.o.d.raw -c -o Release/obj.target/uws/src/WebSocket.o ../src/WebSocket.cpp
Release/obj.target/uws/src/WebSocket.o: ../src/WebSocket.cpp \
../src/WebSocket.h ../src/WebSocketProtocol.h ../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h \
../src/Socket.h ../src/Group.h ../src/HTTPSocket.h ../src/Extensions.h \
../src/Hub.h ../src/Node.h \
/Users/scollado/.node-gyp/6.11.3/include/node/zlib.h \
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h
../src/Backend.h ../src/Libuv.h /usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h ../src/Socket.h \
../src/Group.h ../src/HTTPSocket.h ../src/Extensions.h ../src/Hub.h \
../src/Node.h
../src/WebSocket.cpp:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
../src/Socket.h:
../src/Group.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Hub.h:
../src/Node.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zlib.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h:
cmd_Release/obj.target/uws/src/addon.o := c++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/scollado/.node-gyp/6.11.3/include/node -I/Users/scollado/.node-gyp/6.11.3/src -I/Users/scollado/.node-gyp/6.11.3/deps/uv/include -I/Users/scollado/.node-gyp/6.11.3/deps/v8/include -O3 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/addon.o.d.raw -c -o Release/obj.target/uws/src/addon.o ../src/addon.cpp
cmd_Release/obj.target/uws/src/addon.o := g++ '-DNODE_GYP_MODULE_NAME=uws' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -ffunction-sections -fdata-sections -std=c++11 -DUSE_LIBUV -MMD -MF ./Release/.deps/Release/obj.target/uws/src/addon.o.d.raw -c -o Release/obj.target/uws/src/addon.o ../src/addon.cpp
Release/obj.target/uws/src/addon.o: ../src/addon.cpp ../src/../src/uWS.h \
../src/Hub.h ../src/Group.h ../src/WebSocket.h \
../src/WebSocketProtocol.h ../src/Networking.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h \
../src/Backend.h ../src/Libuv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h \
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h \
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h \
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h \
../src/Socket.h ../src/HTTPSocket.h ../src/Extensions.h ../src/Node.h \
/Users/scollado/.node-gyp/6.11.3/include/node/zlib.h \
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h ../src/addon.h \
/Users/scollado/.node-gyp/6.11.3/include/node/node.h \
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h \
/Users/scollado/.node-gyp/6.11.3/include/node/v8-version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h \
/Users/scollado/.node-gyp/6.11.3/include/node/node_version.h \
/Users/scollado/.node-gyp/6.11.3/include/node/node_buffer.h \
../src/../src/Hub.h ../src/../src/Group.h ../src/../src/WebSocket.h \
../src/../src/WebSocketProtocol.h ../src/../src/Networking.h \
../src/../src/Backend.h ../src/../src/Libuv.h \
/usr/include/nodejs/deps/uv/include/uv.h \
/usr/include/nodejs/deps/uv/include/uv-errno.h \
/usr/include/nodejs/deps/uv/include/uv-version.h \
/usr/include/nodejs/deps/uv/include/uv-unix.h \
/usr/include/nodejs/deps/uv/include/uv-threadpool.h \
/usr/include/nodejs/deps/uv/include/uv-linux.h ../src/../src/Socket.h \
../src/../src/HTTPSocket.h ../src/../src/Extensions.h \
../src/../src/Node.h ../src/addon.h /usr/include/nodejs/src/node.h \
/usr/include/nodejs/deps/v8/include/v8.h \
/usr/include/nodejs/deps/v8/include/v8-version.h \
/usr/include/nodejs/deps/v8/include/v8config.h \
/usr/include/nodejs/src/node_version.h \
/usr/include/nodejs/src/node_buffer.h /usr/include/nodejs/src/node.h \
../src/http.h
../src/addon.cpp:
../src/../src/uWS.h:
../src/Hub.h:
../src/Group.h:
../src/WebSocket.h:
../src/WebSocketProtocol.h:
../src/Networking.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslv.h:
../src/Backend.h:
../src/Libuv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-errno.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-unix.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-threadpool.h:
/Users/scollado/.node-gyp/6.11.3/include/node/uv-darwin.h:
/Users/scollado/.node-gyp/6.11.3/include/node/pthread-barrier.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/e_os2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/./archs/darwin64-x86_64-cc/opensslconf.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/comp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/crypto.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/stack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/safestack.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ossl_typ.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/symhacks.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bio.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/buffer.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/evp.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/objects.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/obj_mac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/asn1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/bn.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ec.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ecdh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/rsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dsa.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dh.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/sha.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/x509_vfy.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/lhash.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pkcs7.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pem2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/hmac.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/kssl.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl2.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl3.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/tls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/dtls1.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/pqueue.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/ssl23.h:
/Users/scollado/.node-gyp/6.11.3/include/node/openssl/srtp.h:
../src/Socket.h:
../src/HTTPSocket.h:
../src/Extensions.h:
../src/Node.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zlib.h:
/Users/scollado/.node-gyp/6.11.3/include/node/zconf.h:
../src/../src/Hub.h:
../src/../src/Group.h:
../src/../src/WebSocket.h:
../src/../src/WebSocketProtocol.h:
../src/../src/Networking.h:
../src/../src/Backend.h:
../src/../src/Libuv.h:
/usr/include/nodejs/deps/uv/include/uv.h:
/usr/include/nodejs/deps/uv/include/uv-errno.h:
/usr/include/nodejs/deps/uv/include/uv-version.h:
/usr/include/nodejs/deps/uv/include/uv-unix.h:
/usr/include/nodejs/deps/uv/include/uv-threadpool.h:
/usr/include/nodejs/deps/uv/include/uv-linux.h:
../src/../src/Socket.h:
../src/../src/HTTPSocket.h:
../src/../src/Extensions.h:
../src/../src/Node.h:
../src/addon.h:
/Users/scollado/.node-gyp/6.11.3/include/node/node.h:
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:
/Users/scollado/.node-gyp/6.11.3/include/node/v8-version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:
/Users/scollado/.node-gyp/6.11.3/include/node/node_version.h:
/Users/scollado/.node-gyp/6.11.3/include/node/node_buffer.h:
/usr/include/nodejs/src/node.h:
/usr/include/nodejs/deps/v8/include/v8.h:
/usr/include/nodejs/deps/v8/include/v8-version.h:
/usr/include/nodejs/deps/v8/include/v8config.h:
/usr/include/nodejs/src/node_version.h:
/usr/include/nodejs/src/node_buffer.h:
/usr/include/nodejs/src/node.h:
../src/http.h:
cmd_Release/uws.node := c++ -bundle -undefined dynamic_lookup -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./Release -stdlib=libc++ -o Release/uws.node Release/obj.target/uws/src/Extensions.o Release/obj.target/uws/src/Group.o Release/obj.target/uws/src/Networking.o Release/obj.target/uws/src/Hub.o Release/obj.target/uws/src/Node.o Release/obj.target/uws/src/WebSocket.o Release/obj.target/uws/src/HTTPSocket.o Release/obj.target/uws/src/Socket.o Release/obj.target/uws/src/addon.o
cmd_Release/uws.node := ln -f "Release/obj.target/uws.node" "Release/uws.node" 2>/dev/null || (rm -rf "Release/uws.node" && cp -af "Release/obj.target/uws.node" "Release/uws.node")
cmd_uws := LD_LIBRARY_PATH=/Users/scollado/proyecto-micro/node_modules/uws/build/Release/lib.host:/Users/scollado/proyecto-micro/node_modules/uws/build/Release/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; cp "/Users/scollado/proyecto-micro/node_modules/uws/build/Release/uws.node" uws_darwin_48.node
cmd_uws := LD_LIBRARY_PATH=/home/pi/proyecto-micro/node_modules/uws/build/Release/lib.host:/home/pi/proyecto-micro/node_modules/uws/build/Release/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; cp "/home/pi/proyecto-micro/node_modules/uws/build/Release/uws.node" uws_linux_46.node
......@@ -4,19 +4,10 @@ TOOLSET := target
TARGET := action_after_build
### Rules for action "move_lib":
quiet_cmd_binding_gyp_action_after_build_target_move_lib = ACTION binding_gyp_action_after_build_target_move_lib $@
cmd_binding_gyp_action_after_build_target_move_lib = LD_LIBRARY_PATH=$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd $(srcdir)/.; cp "$(builddir)/uws.node" uws_darwin_48.node
cmd_binding_gyp_action_after_build_target_move_lib = LD_LIBRARY_PATH=$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd $(srcdir)/.; cp "$(builddir)/uws.node" uws_linux_46.node
uws: obj := $(abs_obj)
uws: builddir := $(abs_builddir)
uws: export BUILT_FRAMEWORKS_DIR := ${abs_builddir}
uws: export BUILT_PRODUCTS_DIR := ${abs_builddir}
uws: export CONFIGURATION := ${BUILDTYPE}
uws: export PRODUCT_NAME := action_after_build
uws: export SDKROOT := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
uws: export SRCROOT := ${abs_srcdir}/
uws: export SOURCE_ROOT := ${SRCROOT}
uws: export TARGET_BUILD_DIR := ${abs_builddir}
uws: export TEMP_DIR := ${TMPDIR}
uws: TOOLSET := $(TOOLSET)
uws: $(builddir)/uws.node FORCE_DO_CMD
$(call do_cmd,binding_gyp_action_after_build_target_move_lib)
......
......@@ -8,37 +8,31 @@
"libraries": []
},
"variables": {
"arm_float_abi": "hard",
"arm_fpu": "vfp",
"arm_thumb": 0,
"arm_version": "6",
"asan": 0,
"coverage": "false",
"debug_devtools": "node",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_data_file": "icudt58l.dat",
"icu_data_in": "../../deps/icu-small/source/data/in/icudt58l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_locales": "en,root",
"icu_path": "deps/icu-small",
"icu_small": "true",
"icu_ver_major": "58",
"llvm_version": 0,
"host_arch": "arm",
"icu_gyp_path": "tools/icu/icu-system.gyp",
"icu_small": "false",
"node_byteorder": "little",
"node_enable_d8": "false",
"node_enable_v8_vtunejit": "false",
"node_install_npm": "true",
"node_module_version": 48,
"node_no_browser_globals": "false",
"node_prefix": "/usr/local",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_install_npm": "false",
"node_module_version": 46,
"node_prefix": "/usr",
"node_release_urlbase": "",
"node_shared": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_shared_libuv": "true",
"node_shared_openssl": "true",
"node_shared_zlib": "true",
"node_tag": "",
"node_use_bundled_v8": "true",
"node_use_dtrace": "true",
"node_use_dtrace": "false",
"node_use_etw": "false",
"node_use_lttng": "false",
"node_use_openssl": "true",
......@@ -46,130 +40,101 @@
"node_use_v8_platform": "true",
"openssl_fips": "",
"openssl_no_asm": 0,
"shlib_suffix": "48.dylib",
"target_arch": "x64",
"shlib_suffix": "so.46",
"target_arch": "arm",
"uv_parent_path": "/deps/uv/",
"uv_use_dtrace": "true",
"uv_use_dtrace": "false",
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_inspector": "true",
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 0,
"v8_random_seed": 0,
"v8_use_snapshot": "true",
"want_separate_host_toolset": 0,
"xcode_version": "7.0",
"nodedir": "/Users/scollado/.node-gyp/6.11.3",
"nodedir": "/usr/include/nodejs",
"copy_dev_lib": "true",
"standalone_static_library": 1,
"dry_run": "",
"legacy_bundling": "",
"save_dev": "",
"browser": "",
"commit_hooks": "true",
"only": "",
"viewer": "man",
"also": "",
"rollback": "true",
"usage": "",
"globalignorefile": "/usr/local/etc/npmignore",
"init_author_url": "",
"maxsockets": "50",
"shell": "/bin/bash",
"metrics_registry": "https://registry.npmjs.org/",
"parseable": "",
"shrinkwrap": "true",
"init_license": "ISC",
"timing": "",
"if_present": "",
"cache_max": "Infinity",
"init_author_email": "",
"cache_lock_stale": "60000",
"sign_git_tag": "",
"cert": "",
"git_tag_version": "true",
"local_address": "",
"long": "",
"fetch_retries": "2",
"registry": "https://registry.npmjs.org/",
"key": "",
"message": "%s",
"versions": "",
"globalconfig": "/usr/local/etc/npmrc",
"user_agent": "npm/1.4.21 node/v4.8.2 linux arm",
"always_auth": "",
"logs_max": "10",
"prefer_online": "",
"cache_lock_retries": "10",
"global_style": "",
"heading": "npm",
"fetch_retry_mintimeout": "10000",
"offline": "",
"read_only": "",
"searchlimit": "20",
"access": "",
"json": "",
"allow_same_version": "",
"bin_links": "true",
"key": "",
"description": "true",
"engine_strict": "",
"https_proxy": "",
"init_module": "/Users/scollado/.npm-init.js",
"userconfig": "/Users/scollado/.npmrc",
"cidr": "",
"node_version": "6.11.3",
"fetch_retries": "2",
"heading": "npm",
"user": "",
"auth_type": "legacy",
"editor": "vi",
"ignore_prepublish": "",
"save": "true",
"script_shell": "",
"tag": "latest",
"global": "",
"progress": "true",
"ham_it_up": "",
"optional": "true",
"searchstaleness": "900",
"bin_links": "true",
"force": "",
"save_prod": "",
"searchopts": "",
"cache_min": "10",
"init_license": "ISC",
"editor": "vi",
"rollback": "true",
"cache_max": "Infinity",
"userconfig": "/home/pi/.npmrc",
"engine_strict": "",
"init_author_name": "",
"init_author_url": "",
"tmp": "/tmp",
"depth": "Infinity",
"save_dev": "",
"usage": "",
"https_proxy": "",
"onload_script": "",
"rebuild_bundle": "true",
"sso_poll_frequency": "500",
"unicode": "true",
"save_bundle": "",
"shell": "/bin/bash",
"prefix": "/usr/local",
"registry": "https://registry.npmjs.org/",
"__DO_NOT_MODIFY_THIS_FILE___use__etc_npmrc_instead_": "true",
"browser": "",
"cache_lock_wait": "10000",
"save_optional": "",
"searchopts": "",
"versions": "",
"cache": "/home/pi/.npm",
"ignore_scripts": "",
"searchsort": "name",
"version": "",
"local_address": "",
"viewer": "man",
"color": "true",
"fetch_retry_mintimeout": "10000",
"umask": "18",
"fetch_retry_maxtimeout": "60000",
"message": "%s",
"ca": "",
"save_prefix": "^",
"scripts_prepend_node_path": "warn-only",
"sso_type": "oauth",
"strict_ssl": "true",
"tag_version_prefix": "v",
"dev": "",
"cert": "",
"global": "",
"link": "",
"save": "",
"unicode": "true",
"long": "",
"production": "",
"unsafe_perm": "true",
"node_version": "4.8.2",
"tag": "latest",
"git_tag_version": "true",
"shrinkwrap": "true",
"fetch_retry_factor": "10",
"group": "20",
"npat": "",
"proprietary_attribs": "true",
"save_exact": "",
"cache_lock_stale": "60000",
"prefer_offline": "",
"version": "",
"cache_min": "10",
"otp": "",
"cache": "/Users/scollado/.npm",
"strict_ssl": "true",
"username": "",
"globalconfig": "/etc/npmrc",
"dev": "",
"init_module": "/home/pi/.npm-init.js",
"parseable": "",
"globalignorefile": "/etc/npmignore",
"cache_lock_retries": "10",
"save_prefix": "^",
"group": "1000",
"init_author_email": "",
"searchexclude": "",
"color": "true",
"package_lock": "true",
"save_optional": "",
"user_agent": "npm/5.5.1 node/v6.11.3 darwin x64",
"ignore_scripts": "",
"cache_lock_wait": "10000",
"production": "",
"save_bundle": "",
"send_metrics": "",
"init_version": "1.0.0",
"umask": "0022",
"scope": "",
"git": "git",
"init_author_name": "",
"onload_script": "",
"tmp": "/var/folders/sf/4jq4y1ys2gn1nsjs0r5f_bbc0000gn/T",
"unsafe_perm": "true",
"prefix": "/usr/local",
"link": ""
"optional": "true",
"email": "",
"json": "",
"spin": "true"
}
}
#!/usr/bin/env python
# Generated by gyp. Do not edit.
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
"""
import fcntl
import fnmatch
import glob
import json
import os
import plistlib
import re
import shutil
import string
import subprocess
import sys
import tempfile
def main(args):
executor = MacTool()
exit_code = executor.Dispatch(args)
if exit_code is not None:
sys.exit(exit_code)
class MacTool(object):
"""This class performs all the Mac tooling steps. The methods can either be
executed directly, or dispatched from an argument list."""
def Dispatch(self, args):
"""Dispatches a string command to a method."""
if len(args) < 1:
raise Exception("Not enough arguments")
method = "Exec%s" % self._CommandifyName(args[0])
return getattr(self, method)(*args[1:])
def _CommandifyName(self, name_string):
"""Transforms a tool name like copy-info-plist to CopyInfoPlist"""
return name_string.title().replace('-', '')
def ExecCopyBundleResource(self, source, dest, convert_to_binary):
"""Copies a resource file to the bundle/Resources directory, performing any
necessary compilation on each resource."""
extension = os.path.splitext(source)[1].lower()
if os.path.isdir(source):
# Copy tree.
# TODO(thakis): This copies file attributes like mtime, while the
# single-file branch below doesn't. This should probably be changed to
# be consistent with the single-file branch.
if os.path.exists(dest):
shutil.rmtree(dest)
shutil.copytree(source, dest)
elif extension == '.xib':
return self._CopyXIBFile(source, dest)
elif extension == '.storyboard':
return self._CopyXIBFile(source, dest)
elif extension == '.strings':
self._CopyStringsFile(source, dest, convert_to_binary)
else:
shutil.copy(source, dest)
def _CopyXIBFile(self, source, dest):
"""Compiles a XIB file with ibtool into a binary plist in the bundle."""
# ibtool sometimes crashes with relative paths. See crbug.com/314728.
base = os.path.dirname(os.path.realpath(__file__))
if os.path.relpath(source):
source = os.path.join(base, source)
if os.path.relpath(dest):
dest = os.path.join(base, dest)
args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices',
'--output-format', 'human-readable-text', '--compile', dest, source]
ibtool_section_re = re.compile(r'/\*.*\*/')
ibtool_re = re.compile(r'.*note:.*is clipping its content')
ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE)
current_section_header = None
for line in ibtoolout.stdout:
if ibtool_section_re.match(line):
current_section_header = line
elif not ibtool_re.match(line):
if current_section_header:
sys.stdout.write(current_section_header)
current_section_header = None
sys.stdout.write(line)
return ibtoolout.returncode
def _ConvertToBinary(self, dest):
subprocess.check_call([
'xcrun', 'plutil', '-convert', 'binary1', '-o', dest, dest])
def _CopyStringsFile(self, source, dest, convert_to_binary):
"""Copies a .strings file using iconv to reconvert the input into UTF-16."""
input_code = self._DetectInputEncoding(source) or "UTF-8"
# Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call
# CFPropertyListCreateFromXMLData() behind the scenes; at least it prints
# CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
# semicolon in dictionary.
# on invalid files. Do the same kind of validation.
import CoreFoundation
s = open(source, 'rb').read()
d = CoreFoundation.CFDataCreate(None, s, len(s))
_, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None)
if error:
return
fp = open(dest, 'wb')
fp.write(s.decode(input_code).encode('UTF-16'))
fp.close()
if convert_to_binary == 'True':
self._ConvertToBinary(dest)
def _DetectInputEncoding(self, file_name):
"""Reads the first few bytes from file_name and tries to guess the text
encoding. Returns None as a guess if it can't detect it."""
fp = open(file_name, 'rb')
try:
header = fp.read(3)
except e:
fp.close()
return None
fp.close()
if header.startswith("\xFE\xFF"):
return "UTF-16"
elif header.startswith("\xFF\xFE"):
return "UTF-16"
elif header.startswith("\xEF\xBB\xBF"):
return "UTF-8"
else:
return None
def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys):
"""Copies the |source| Info.plist to the destination directory |dest|."""
# Read the source Info.plist into memory.
fd = open(source, 'r')
lines = fd.read()
fd.close()
# Insert synthesized key/value pairs (e.g. BuildMachineOSBuild).
plist = plistlib.readPlistFromString(lines)
if keys:
plist = dict(plist.items() + json.loads(keys[0]).items())
lines = plistlib.writePlistToString(plist)
# Go through all the environment variables and replace them as variables in
# the file.
IDENT_RE = re.compile(r'[/\s]')
for key in os.environ:
if key.startswith('_'):
continue
evar = '${%s}' % key
evalue = os.environ[key]
lines = string.replace(lines, evar, evalue)
# Xcode supports various suffices on environment variables, which are
# all undocumented. :rfc1034identifier is used in the standard project
# template these days, and :identifier was used earlier. They are used to
# convert non-url characters into things that look like valid urls --
# except that the replacement character for :identifier, '_' isn't valid
# in a URL either -- oops, hence :rfc1034identifier was born.
evar = '${%s:identifier}' % key
evalue = IDENT_RE.sub('_', os.environ[key])
lines = string.replace(lines, evar, evalue)
evar = '${%s:rfc1034identifier}' % key
evalue = IDENT_RE.sub('-', os.environ[key])
lines = string.replace(lines, evar, evalue)
# Remove any keys with values that haven't been replaced.
lines = lines.split('\n')
for i in range(len(lines)):
if lines[i].strip().startswith("<string>${"):
lines[i] = None
lines[i - 1] = None
lines = '\n'.join(filter(lambda x: x is not None, lines))
# Write out the file with variables replaced.
fd = open(dest, 'w')
fd.write(lines)
fd.close()
# Now write out PkgInfo file now that the Info.plist file has been
# "compiled".
self._WritePkgInfo(dest)
if convert_to_binary == 'True':
self._ConvertToBinary(dest)
def _WritePkgInfo(self, info_plist):
"""This writes the PkgInfo file from the data stored in Info.plist."""
plist = plistlib.readPlist(info_plist)
if not plist:
return
# Only create PkgInfo for executable types.
package_type = plist['CFBundlePackageType']
if package_type != 'APPL':
return
# The format of PkgInfo is eight characters, representing the bundle type
# and bundle signature, each four characters. If that is missing, four
# '?' characters are used instead.
signature_code = plist.get('CFBundleSignature', '????')
if len(signature_code) != 4: # Wrong length resets everything, too.
signature_code = '?' * 4
dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo')
fp = open(dest, 'w')
fp.write('%s%s' % (package_type, signature_code))
fp.close()
def ExecFlock(self, lockfile, *cmd_list):
"""Emulates the most basic behavior of Linux's flock(1)."""
# Rely on exception handling to report errors.
fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
fcntl.flock(fd, fcntl.LOCK_EX)
return subprocess.call(cmd_list)
def ExecFilterLibtool(self, *cmd_list):
"""Calls libtool and filters out '/path/to/libtool: file: foo.o has no
symbols'."""
libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$')
libtool_re5 = re.compile(
r'^.*libtool: warning for library: ' +
r'.* the table of contents is empty ' +
r'\(no object file members in the library define global symbols\)$')
env = os.environ.copy()
# Ref:
# http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c
# The problem with this flag is that it resets the file mtime on the file to
# epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone.
env['ZERO_AR_DATE'] = '1'
libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env)
_, err = libtoolout.communicate()
for line in err.splitlines():
if not libtool_re.match(line) and not libtool_re5.match(line):
print >>sys.stderr, line
# Unconditionally touch the output .a file on the command line if present
# and the command succeeded. A bit hacky.
if not libtoolout.returncode:
for i in range(len(cmd_list) - 1):
if cmd_list[i] == "-o" and cmd_list[i+1].endswith('.a'):
os.utime(cmd_list[i+1], None)
break
return libtoolout.returncode
def ExecPackageFramework(self, framework, version):
"""Takes a path to Something.framework and the Current version of that and
sets up all the symlinks."""
# Find the name of the binary based on the part before the ".framework".
binary = os.path.basename(framework).split('.')[0]
CURRENT = 'Current'
RESOURCES = 'Resources'
VERSIONS = 'Versions'
if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)):
# Binary-less frameworks don't seem to contain symlinks (see e.g.
# chromium's out/Debug/org.chromium.Chromium.manifest/ bundle).
return
# Move into the framework directory to set the symlinks correctly.
pwd = os.getcwd()
os.chdir(framework)
# Set up the Current version.
self._Relink(version, os.path.join(VERSIONS, CURRENT))
# Set up the root symlinks.
self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary)
self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES)
# Back to where we were before!
os.chdir(pwd)
def _Relink(self, dest, link):
"""Creates a symlink to |dest| named |link|. If |link| already exists,
it is overwritten."""
if os.path.lexists(link):
os.remove(link)
os.symlink(dest, link)
def ExecCompileXcassets(self, keys, *inputs):
"""Compiles multiple .xcassets files into a single .car file.
This invokes 'actool' to compile all the inputs .xcassets files. The
|keys| arguments is a json-encoded dictionary of extra arguments to
pass to 'actool' when the asset catalogs contains an application icon
or a launch image.
Note that 'actool' does not create the Assets.car file if the asset
catalogs does not contains imageset.
"""
command_line = [
'xcrun', 'actool', '--output-format', 'human-readable-text',
'--compress-pngs', '--notices', '--warnings', '--errors',
]
is_iphone_target = 'IPHONEOS_DEPLOYMENT_TARGET' in os.environ
if is_iphone_target:
platform = os.environ['CONFIGURATION'].split('-')[-1]
if platform not in ('iphoneos', 'iphonesimulator'):
platform = 'iphonesimulator'
command_line.extend([
'--platform', platform, '--target-device', 'iphone',
'--target-device', 'ipad', '--minimum-deployment-target',
os.environ['IPHONEOS_DEPLOYMENT_TARGET'], '--compile',
os.path.abspath(os.environ['CONTENTS_FOLDER_PATH']),
])
else:
command_line.extend([
'--platform', 'macosx', '--target-device', 'mac',
'--minimum-deployment-target', os.environ['MACOSX_DEPLOYMENT_TARGET'],
'--compile',
os.path.abspath(os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH']),
])
if keys:
keys = json.loads(keys)
for key, value in keys.iteritems():
arg_name = '--' + key
if isinstance(value, bool):
if value:
command_line.append(arg_name)
elif isinstance(value, list):
for v in value:
command_line.append(arg_name)
command_line.append(str(v))
else:
command_line.append(arg_name)
command_line.append(str(value))
# Note: actool crashes if inputs path are relative, so use os.path.abspath
# to get absolute path name for inputs.
command_line.extend(map(os.path.abspath, inputs))
subprocess.check_call(command_line)
def ExecMergeInfoPlist(self, output, *inputs):
"""Merge multiple .plist files into a single .plist file."""
merged_plist = {}
for path in inputs:
plist = self._LoadPlistMaybeBinary(path)
self._MergePlist(merged_plist, plist)
plistlib.writePlist(merged_plist, output)
def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning):
"""Code sign a bundle.
This function tries to code sign an iOS bundle, following the same
algorithm as Xcode:
1. copy ResourceRules.plist from the user or the SDK into the bundle,
2. pick the provisioning profile that best match the bundle identifier,
and copy it into the bundle as embedded.mobileprovision,
3. copy Entitlements.plist from user or SDK next to the bundle,
4. code sign the bundle.
"""
resource_rules_path = self._InstallResourceRules(resource_rules)
substitutions, overrides = self._InstallProvisioningProfile(
provisioning, self._GetCFBundleIdentifier())
entitlements_path = self._InstallEntitlements(
entitlements, substitutions, overrides)
subprocess.check_call([
'codesign', '--force', '--sign', key, '--resource-rules',
resource_rules_path, '--entitlements', entitlements_path,
os.path.join(
os.environ['TARGET_BUILD_DIR'],
os.environ['FULL_PRODUCT_NAME'])])
def _InstallResourceRules(self, resource_rules):
"""Installs ResourceRules.plist from user or SDK into the bundle.
Args:
resource_rules: string, optional, path to the ResourceRules.plist file
to use, default to "${SDKROOT}/ResourceRules.plist"
Returns:
Path to the copy of ResourceRules.plist into the bundle.
"""
source_path = resource_rules
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['CONTENTS_FOLDER_PATH'],
'ResourceRules.plist')
if not source_path:
source_path = os.path.join(
os.environ['SDKROOT'], 'ResourceRules.plist')
shutil.copy2(source_path, target_path)
return target_path
def _InstallProvisioningProfile(self, profile, bundle_identifier):
"""Installs embedded.mobileprovision into the bundle.
Args:
profile: string, optional, short name of the .mobileprovision file
to use, if empty or the file is missing, the best file installed
will be used
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
Returns:
A tuple containing two dictionary: variables substitutions and values
to overrides when generating the entitlements file.
"""
source_path, provisioning_data, team_id = self._FindProvisioningProfile(
profile, bundle_identifier)
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['CONTENTS_FOLDER_PATH'],
'embedded.mobileprovision')
shutil.copy2(source_path, target_path)
substitutions = self._GetSubstitutions(bundle_identifier, team_id + '.')
return substitutions, provisioning_data['Entitlements']
def _FindProvisioningProfile(self, profile, bundle_identifier):
"""Finds the .mobileprovision file to use for signing the bundle.
Checks all the installed provisioning profiles (or if the user specified
the PROVISIONING_PROFILE variable, only consult it) and select the most
specific that correspond to the bundle identifier.
Args:
profile: string, optional, short name of the .mobileprovision file
to use, if empty or the file is missing, the best file installed
will be used
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
Returns:
A tuple of the path to the selected provisioning profile, the data of
the embedded plist in the provisioning profile and the team identifier
to use for code signing.
Raises:
SystemExit: if no .mobileprovision can be used to sign the bundle.
"""
profiles_dir = os.path.join(
os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles')
if not os.path.isdir(profiles_dir):
print >>sys.stderr, (
'cannot find mobile provisioning for %s' % bundle_identifier)
sys.exit(1)
provisioning_profiles = None
if profile:
profile_path = os.path.join(profiles_dir, profile + '.mobileprovision')
if os.path.exists(profile_path):
provisioning_profiles = [profile_path]
if not provisioning_profiles:
provisioning_profiles = glob.glob(
os.path.join(profiles_dir, '*.mobileprovision'))
valid_provisioning_profiles = {}
for profile_path in provisioning_profiles:
profile_data = self._LoadProvisioningProfile(profile_path)
app_id_pattern = profile_data.get(
'Entitlements', {}).get('application-identifier', '')
for team_identifier in profile_data.get('TeamIdentifier', []):
app_id = '%s.%s' % (team_identifier, bundle_identifier)
if fnmatch.fnmatch(app_id, app_id_pattern):
valid_provisioning_profiles[app_id_pattern] = (
profile_path, profile_data, team_identifier)
if not valid_provisioning_profiles:
print >>sys.stderr, (
'cannot find mobile provisioning for %s' % bundle_identifier)
sys.exit(1)
# If the user has multiple provisioning profiles installed that can be
# used for ${bundle_identifier}, pick the most specific one (ie. the
# provisioning profile whose pattern is the longest).
selected_key = max(valid_provisioning_profiles, key=lambda v: len(v))
return valid_provisioning_profiles[selected_key]
def _LoadProvisioningProfile(self, profile_path):
"""Extracts the plist embedded in a provisioning profile.
Args:
profile_path: string, path to the .mobileprovision file
Returns:
Content of the plist embedded in the provisioning profile as a dictionary.
"""
with tempfile.NamedTemporaryFile() as temp:
subprocess.check_call([
'security', 'cms', '-D', '-i', profile_path, '-o', temp.name])
return self._LoadPlistMaybeBinary(temp.name)
def _MergePlist(self, merged_plist, plist):
"""Merge |plist| into |merged_plist|."""
for key, value in plist.iteritems():
if isinstance(value, dict):
merged_value = merged_plist.get(key, {})
if isinstance(merged_value, dict):
self._MergePlist(merged_value, value)
merged_plist[key] = merged_value
else:
merged_plist[key] = value
else:
merged_plist[key] = value
def _LoadPlistMaybeBinary(self, plist_path):
"""Loads into a memory a plist possibly encoded in binary format.
This is a wrapper around plistlib.readPlist that tries to convert the
plist to the XML format if it can't be parsed (assuming that it is in
the binary format).
Args:
plist_path: string, path to a plist file, in XML or binary format
Returns:
Content of the plist as a dictionary.
"""
try:
# First, try to read the file using plistlib that only supports XML,
# and if an exception is raised, convert a temporary copy to XML and
# load that copy.
return plistlib.readPlist(plist_path)
except:
pass
with tempfile.NamedTemporaryFile() as temp:
shutil.copy2(plist_path, temp.name)
subprocess.check_call(['plutil', '-convert', 'xml1', temp.name])
return plistlib.readPlist(temp.name)
def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix):
"""Constructs a dictionary of variable substitutions for Entitlements.plist.
Args:
bundle_identifier: string, value of CFBundleIdentifier from Info.plist
app_identifier_prefix: string, value for AppIdentifierPrefix
Returns:
Dictionary of substitutions to apply when generating Entitlements.plist.
"""
return {
'CFBundleIdentifier': bundle_identifier,
'AppIdentifierPrefix': app_identifier_prefix,
}
def _GetCFBundleIdentifier(self):
"""Extracts CFBundleIdentifier value from Info.plist in the bundle.
Returns:
Value of CFBundleIdentifier in the Info.plist located in the bundle.
"""
info_plist_path = os.path.join(
os.environ['TARGET_BUILD_DIR'],
os.environ['INFOPLIST_PATH'])
info_plist_data = self._LoadPlistMaybeBinary(info_plist_path)
return info_plist_data['CFBundleIdentifier']
def _InstallEntitlements(self, entitlements, substitutions, overrides):
"""Generates and install the ${BundleName}.xcent entitlements file.
Expands variables "$(variable)" pattern in the source entitlements file,
add extra entitlements defined in the .mobileprovision file and the copy
the generated plist to "${BundlePath}.xcent".
Args:
entitlements: string, optional, path to the Entitlements.plist template
to use, defaults to "${SDKROOT}/Entitlements.plist"
substitutions: dictionary, variable substitutions
overrides: dictionary, values to add to the entitlements
Returns:
Path to the generated entitlements file.
"""
source_path = entitlements
target_path = os.path.join(
os.environ['BUILT_PRODUCTS_DIR'],
os.environ['PRODUCT_NAME'] + '.xcent')
if not source_path:
source_path = os.path.join(
os.environ['SDKROOT'],
'Entitlements.plist')
shutil.copy2(source_path, target_path)
data = self._LoadPlistMaybeBinary(target_path)
data = self._ExpandVariables(data, substitutions)
if overrides:
for key in overrides:
if key not in data:
data[key] = overrides[key]
plistlib.writePlist(data, target_path)
return target_path
def _ExpandVariables(self, data, substitutions):
"""Expands variables "$(variable)" in data.
Args:
data: object, can be either string, list or dictionary
substitutions: dictionary, variable substitutions to perform
Returns:
Copy of data where each references to "$(variable)" has been replaced
by the corresponding value found in substitutions, or left intact if
the key was not found.
"""
if isinstance(data, str):
for key, value in substitutions.iteritems():
data = data.replace('$(%s)' % key, value)
return data
if isinstance(data, list):
return [self._ExpandVariables(v, substitutions) for v in data]
if isinstance(data, dict):
return {k: self._ExpandVariables(data[k], substitutions) for k in data}
return data
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))
......@@ -7,7 +7,6 @@ DEFS_Debug := \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_DARWIN_USE_64_BIT_INODE=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DBUILDING_NODE_EXTENSION' \
......@@ -16,13 +15,13 @@ DEFS_Debug := \
# Flags passed to all source files.
CFLAGS_Debug := \
-O0 \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-fPIC \
-pthread \
-Wall \
-Wendif-labels \
-W \
-Wno-unused-parameter
-Wextra \
-Wno-unused-parameter \
-g \
-O0
# Flags passed to only C files.
CFLAGS_C_Debug :=
......@@ -30,40 +29,33 @@ CFLAGS_C_Debug :=
# Flags passed to only C++ files.
CFLAGS_CC_Debug := \
-std=c++11 \
-stdlib=libc++ \
-DUSE_LIBUV
# Flags passed to only ObjC files.
CFLAGS_OBJC_Debug :=
# Flags passed to only ObjC++ files.
CFLAGS_OBJCC_Debug :=
INCS_Debug := \
-I/Users/scollado/.node-gyp/6.11.3/include/node \
-I/Users/scollado/.node-gyp/6.11.3/src \
-I/Users/scollado/.node-gyp/6.11.3/deps/uv/include \
-I/Users/scollado/.node-gyp/6.11.3/deps/v8/include
-I/usr/include/nodejs/include/node \
-I/usr/include/nodejs/src \
-I/usr/include/nodejs/deps/uv/include \
-I/usr/include/nodejs/deps/v8/include
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=uws' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-D_DARWIN_USE_64_BIT_INODE=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-DBUILDING_NODE_EXTENSION'
# Flags passed to all source files.
CFLAGS_Release := \
-O3 \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-fPIC \
-pthread \
-Wall \
-Wendif-labels \
-W \
-Wno-unused-parameter
-Wextra \
-Wno-unused-parameter \
-O3 \
-ffunction-sections \
-fdata-sections
# Flags passed to only C files.
CFLAGS_C_Release :=
......@@ -71,20 +63,13 @@ CFLAGS_C_Release :=
# Flags passed to only C++ files.
CFLAGS_CC_Release := \
-std=c++11 \
-stdlib=libc++ \
-DUSE_LIBUV
# Flags passed to only ObjC files.
CFLAGS_OBJC_Release :=
# Flags passed to only ObjC++ files.
CFLAGS_OBJCC_Release :=
INCS_Release := \
-I/Users/scollado/.node-gyp/6.11.3/include/node \
-I/Users/scollado/.node-gyp/6.11.3/src \
-I/Users/scollado/.node-gyp/6.11.3/deps/uv/include \
-I/Users/scollado/.node-gyp/6.11.3/deps/v8/include
-I/usr/include/nodejs/include/node \
-I/usr/include/nodejs/src \
-I/usr/include/nodejs/deps/uv/include \
-I/usr/include/nodejs/deps/v8/include
OBJS := \
$(obj).target/$(TARGET)/src/Extensions.o \
......@@ -105,8 +90,6 @@ all_deps += $(OBJS)
$(OBJS): TOOLSET := $(TOOLSET)
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))
$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))
# Suffix rules, putting all outputs into $(obj).
......@@ -124,50 +107,35 @@ $(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
# End of this set of suffix rules
### Rules for final target.
LDFLAGS_Debug := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-L$(builddir) \
-stdlib=libc++
LIBTOOLFLAGS_Debug := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first
-pthread \
-s
LDFLAGS_Release := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first \
-mmacosx-version-min=10.7 \
-arch x86_64 \
-L$(builddir) \
-stdlib=libc++
LIBTOOLFLAGS_Release := \
-undefined dynamic_lookup \
-Wl,-no_pie \
-Wl,-search_paths_first
-pthread \
-s
LIBS :=
$(builddir)/uws.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(builddir)/uws.node: LIBS := $(LIBS)
$(builddir)/uws.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))
$(builddir)/uws.node: TOOLSET := $(TOOLSET)
$(builddir)/uws.node: $(OBJS) FORCE_DO_CMD
$(obj).target/uws.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/uws.node: LIBS := $(LIBS)
$(obj).target/uws.node: TOOLSET := $(TOOLSET)
$(obj).target/uws.node: $(OBJS) FORCE_DO_CMD
$(call do_cmd,solink_module)
all_deps += $(builddir)/uws.node
all_deps += $(obj).target/uws.node
# Add target alias
.PHONY: uws
uws: $(builddir)/uws.node
# Copy this to the executable output path.
$(builddir)/uws.node: TOOLSET := $(TOOLSET)
$(builddir)/uws.node: $(obj).target/uws.node FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/uws.node
# Short alias for building this executable.
.PHONY: uws.node
uws.node: $(builddir)/uws.node
uws.node: $(obj).target/uws.node $(builddir)/uws.node
# Add executable to "all" target.
.PHONY: all
......
make: Entering directory '/home/pi/proyecto-micro/node_modules/uws/build'
CXX(target) Release/obj.target/uws/src/Extensions.o
CXX(target) Release/obj.target/uws/src/Group.o
CXX(target) Release/obj.target/uws/src/Networking.o
......@@ -7,180 +8,13 @@
CXX(target) Release/obj.target/uws/src/HTTPSocket.o
CXX(target) Release/obj.target/uws/src/Socket.o
CXX(target) Release/obj.target/uws/src/addon.o
In file included from ../src/addon.cpp:3:
../src/http.h:31:55: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) header.value, String::kNormalString, header.valueLength));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:45:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "GET", String::kNormalString, 3));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:48:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "PUT", String::kNormalString, 3));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:51:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "POST", String::kNormalString, 4));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:54:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "HEAD", String::kNormalString, 4));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:57:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "PATCH", String::kNormalString, 5));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:60:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "TRACE", String::kNormalString, 5));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:63:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "DELETE", String::kNormalString, 6));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:66:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "OPTIONS", String::kNormalString, 7));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:69:51: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(String::NewFromOneByte(args.GetIsolate(), (uint8_t *) "CONNECT", String::kNormalString, 7));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:99:77: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
Local<Object> reqObjectLocal = reqTemplateLocal->GetFunction()->NewInstance();
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:3276:3: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:149:39: warning: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Wsign-compare]
In file included from ../src/addon.cpp:3:0:
../src/http.h: In static member function ‘static void HttpServer::Response::writeHead(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/http.h:149:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < headers->Length(); i++) {
~ ^ ~~~~~~~~~~~~~~~~~
../src/http.h:196:53: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
return resTemplateLocal->GetFunction()->NewInstance();
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:3276:3: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:227:52: warning: 'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
reqObject->SetInternalField(4, String::NewFromOneByte(isolate, (uint8_t *) req.getUrl().value, String::kNormalString, req.getUrl().valueLength));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2332:10: note: 'NewFromOneByte' has been explicitly marked deprecated here
static V8_DEPRECATED(
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:293:110: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(newInstance = Local<Function>::New(args.GetIsolate(), httpPersistent)->NewInstance());
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:3276:3: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:320:80: warning: 'SetPrototype' is deprecated [-Wdeprecated-declarations]
express->Get(String::NewFromUtf8(isolate, "request"))->ToObject()->SetPrototype(Local<Object>::New(args.GetIsolate(), reqTemplate)->GetPrototype());
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2813:3: note: 'SetPrototype' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:321:81: warning: 'SetPrototype' is deprecated [-Wdeprecated-declarations]
express->Get(String::NewFromUtf8(isolate, "response"))->ToObject()->SetPrototype(Local<Object>::New(args.GetIsolate(), resTemplate)->GetPrototype());
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:2813:3: note: 'SetPrototype' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", bool SetPrototype(Local<Value> prototype));
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
In file included from ../src/addon.cpp:3:
../src/http.h:327:48: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
args.GetReturnValue().Set(express->NewInstance());
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8.h:3276:3: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
/Users/scollado/.node-gyp/6.11.3/include/node/v8config.h:336:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
18 warnings generated.
SOLINK_MODULE(target) Release/uws.node
~~^~~~~~~~~~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/uws.node
COPY Release/uws.node
ACTION binding_gyp_action_after_build_target_move_lib uws
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/proyecto-micro/node_modules/uws/build'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment