Commit b4a4c919 authored by Giacomo Lavermicocca's avatar Giacomo Lavermicocca

Files to projects added

parent 10a53af2
//Header file for matrixLEDi2c
//created by Michael Junge
//__u16 block[I2C_SMBUS_BLOCK_MAX];
const unsigned short FONT8x8[97][8] = {
{0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00}, // columns, rows, num_bytes_per_char
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // space 0x20
{0x30,0x78,0x78,0x30,0x30,0x00,0x30,0x00}, // !
{0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00}, // "
{0x6C,0x6C,0xFE,0x6C,0xFE,0x6C,0x6C,0x00}, // #
{0x18,0x3E,0x60,0x3C,0x06,0x7C,0x18,0x00}, // $
{0x00,0x63,0x66,0x0C,0x18,0x33,0x63,0x00}, // %
{0x1C,0x36,0x1C,0x3B,0x6E,0x66,0x3B,0x00}, // &
{0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00}, // '
{0x0C,0x18,0x30,0x30,0x30,0x18,0x0C,0x00}, // (
{0x30,0x18,0x0C,0x0C,0x0C,0x18,0x30,0x00}, // )
{0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00}, // *
{0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0x00}, // +
{0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x30}, // ,
{0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00}, // -
{0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00}, // .
{0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00}, // / (forward slash)
{0x3E,0x63,0x63,0x6B,0x63,0x63,0x3E,0x00}, // 0 0x30
{0x18,0x38,0x58,0x18,0x18,0x18,0x7E,0x00}, // 1
{0x3C,0x66,0x06,0x1C,0x30,0x66,0x7E,0x00}, // 2
{0x3C,0x66,0x06,0x1C,0x06,0x66,0x3C,0x00}, // 3
{0x0E,0x1E,0x36,0x66,0x7F,0x06,0x0F,0x00}, // 4
{0x7E,0x60,0x7C,0x06,0x06,0x66,0x3C,0x00}, // 5
{0x1C,0x30,0x60,0x7C,0x66,0x66,0x3C,0x00}, // 6
{0x7E,0x66,0x06,0x0C,0x18,0x18,0x18,0x00}, // 7
{0x3C,0x66,0x66,0x3C,0x66,0x66,0x3C,0x00}, // 8
{0x3C,0x66,0x66,0x3E,0x06,0x0C,0x38,0x00}, // 9
{0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00}, // :
{0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x30}, // ;
{0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00}, // <
{0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00}, // =
{0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00}, // >
{0x3C,0x66,0x06,0x0C,0x18,0x00,0x18,0x00}, // ?
{0x3E,0x63,0x6F,0x69,0x6F,0x60,0x3E,0x00}, // @ 0x40
{0x18,0x3C,0x66,0x66,0x7E,0x66,0x66,0x00}, // A
{0x7E,0x33,0x33,0x3E,0x33,0x33,0x7E,0x00}, // B
{0x1E,0x33,0x60,0x60,0x60,0x33,0x1E,0x00}, // C
{0x7C,0x36,0x33,0x33,0x33,0x36,0x7C,0x00}, // D
{0x7F,0x31,0x34,0x3C,0x34,0x31,0x7F,0x00}, // E
{0x7F,0x31,0x34,0x3C,0x34,0x30,0x78,0x00}, // F
{0x1E,0x33,0x60,0x60,0x67,0x33,0x1F,0x00}, // G
{0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x00}, // H
{0x3C,0x18,0x18,0x18,0x18,0x18,0x3C,0x00}, // I
{0x0F,0x06,0x06,0x06,0x66,0x66,0x3C,0x00}, // J
{0x73,0x33,0x36,0x3C,0x36,0x33,0x73,0x00}, // K
{0x78,0x30,0x30,0x30,0x31,0x33,0x7F,0x00}, // L
{0x63,0x77,0x7F,0x7F,0x6B,0x63,0x63,0x00}, // M
{0x63,0x73,0x7B,0x6F,0x67,0x63,0x63,0x00}, // N
{0x3E,0x63,0x63,0x63,0x63,0x63,0x3E,0x00}, // O
{0x7E,0x33,0x33,0x3E,0x30,0x30,0x78,0x00}, // P 0x50
{0x3C,0x66,0x66,0x66,0x6E,0x3C,0x0E,0x00}, // Q
{0x7E,0x33,0x33,0x3E,0x36,0x33,0x73,0x00}, // R
{0x3C,0x66,0x30,0x18,0x0C,0x66,0x3C,0x00}, // S
{0x7E,0x5A,0x18,0x18,0x18,0x18,0x3C,0x00}, // T
{0x66,0x66,0x66,0x66,0x66,0x66,0x7E,0x00}, // U
{0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00}, // V
{0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00}, // W
{0x63,0x63,0x36,0x1C,0x1C,0x36,0x63,0x00}, // X
{0x66,0x66,0x66,0x3C,0x18,0x18,0x3C,0x00}, // Y
{0x7F,0x63,0x46,0x0C,0x19,0x33,0x7F,0x00}, // Z
{0x3C,0x30,0x30,0x30,0x30,0x30,0x3C,0x00}, // [
{0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00}, // \ (back slash)
{0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00}, // ]
{0x08,0x1C,0x36,0x63,0x00,0x00,0x00,0x00}, // ^
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF}, // _
{0x18,0x18,0x0C,0x00,0x00,0x00,0x00,0x00}, // ` 0x60
{0x00,0x00,0x3C,0x06,0x3E,0x66,0x3B,0x00}, // a
{0x70,0x30,0x3E,0x33,0x33,0x33,0x6E,0x00}, // b
{0x00,0x00,0x3C,0x66,0x60,0x66,0x3C,0x00}, // c
{0x0E,0x06,0x3E,0x66,0x66,0x66,0x3B,0x00}, // d
{0x00,0x00,0x3C,0x66,0x7E,0x60,0x3C,0x00}, // e
{0x1C,0x36,0x30,0x78,0x30,0x30,0x78,0x00}, // f
{0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x7C}, // g
{0x70,0x30,0x36,0x3B,0x33,0x33,0x73,0x00}, // h
{0x18,0x00,0x38,0x18,0x18,0x18,0x3C,0x00}, // i
{0x06,0x00,0x06,0x06,0x06,0x66,0x66,0x3C}, // j
{0x70,0x30,0x33,0x36,0x3C,0x36,0x73,0x00}, // k
{0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00}, // l
{0x00,0x00,0x66,0x7F,0x7F,0x6B,0x63,0x00}, // m
{0x00,0x00,0x7C,0x66,0x66,0x66,0x66,0x00}, // n
{0x00,0x00,0x3C,0x66,0x66,0x66,0x3C,0x00}, // o
{0x00,0x00,0x6E,0x33,0x33,0x3E,0x30,0x78}, // p 0x70
{0x00,0x00,0x3B,0x66,0x66,0x3E,0x06,0x0F}, // q
{0x00,0x00,0x6E,0x3B,0x33,0x30,0x78,0x00}, // r
{0x00,0x00,0x3E,0x60,0x3C,0x06,0x7C,0x00}, // s
{0x08,0x18,0x3E,0x18,0x18,0x1A,0x0C,0x00}, // t
{0x00,0x00,0x66,0x66,0x66,0x66,0x3B,0x00}, // u
{0x00,0x00,0x66,0x66,0x66,0x3C,0x18,0x00}, // v
{0x00,0x00,0x63,0x6B,0x7F,0x7F,0x36,0x00}, // w
{0x00,0x00,0x63,0x36,0x1C,0x36,0x63,0x00}, // x
{0x00,0x00,0x66,0x66,0x66,0x3E,0x06,0x7C}, // y
{0x00,0x00,0x7E,0x4C,0x18,0x32,0x7E,0x00}, // z
{0x0E,0x18,0x18,0x70,0x18,0x18,0x0E,0x00}, // {
{0x0C,0x0C,0x0C,0x00,0x0C,0x0C,0x0C,0x00}, // |
{0x70,0x18,0x18,0x0E,0x18,0x18,0x70,0x00}, // }
{0x3B,0x6E,0x00,0x00,0x00,0x00,0x00,0x00}, // ~
{0x1C,0x36,0x36,0x1C,0x00,0x00,0x00,0x00}};// DEL
// addon.cc
#include <node.h>
#include <signal.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include "i2c-dev.h"
#include <fcntl.h>
#include "8x8font.h"
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <cstdio>
namespace demo {
using v8::Exception;
using v8::FunctionCallbackInfo;
using v8::Isolate;
using v8::Local;
using v8::Number;
using v8::Object;
using v8::String;
using v8::Value;
using v8::Array;
using namespace std;
__u16 block[I2C_SMBUS_BLOCK_MAX];
//global variables used for matrix
int res, i2cbus, daddress, address, size, file;
void Exit()
{
daddress = 0x20; // Stop oscillator (page 10)
printf("writing: 0x%02x\n", daddress);
res = i2c_smbus_write_byte(file, daddress);
daddress = 0x80; // Stop led (page 10)
printf("writing: 0x%02x\n", daddress);
res = i2c_smbus_write_byte(file, daddress);
close(file);
exit(0);
}
void displayImage(__u16 bmp[], int res, int daddress, int file)
{
int i;
for (i = 0; i<8; i++)
{
block[i] = (bmp[i] & 0xfe) >> 1 |
(bmp[i] & 0x01) << 7;
}
i2c_smbus_write_i2c_block_data(file, daddress, 16,
(__u8 *)block);
usleep(100000);
}
void INThandler(int sig)
{
// Closing file and turning off Matrix
unsigned short int clear[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
displayImage(clear, res, daddress, file);
printf("Closing file and turning off the LED Matrix\n");
daddress = 0x20;
for (daddress = 0xef; daddress >= 0xe0; daddress--) {
res = i2c_smbus_write_byte(file, daddress);
}
signal(sig, SIG_IGN);
close(file);
exit(0);
}
int SetFileFirst(int _i2cbus, int _address) //Setta le variabili iniziali...
{
i2cbus = _i2cbus;
address = _address;
daddress = 0;
char filename[20];
signal(SIGINT, INThandler);
//Startup the matrix
size = I2C_SMBUS_BYTE;
sprintf(filename, "/dev/i2c-%d", i2cbus);
file = open(filename, O_RDWR);
if (file<0) {
if (errno == ENOENT) {
fprintf(stderr, "Error: Could not open file "
"/dev/i2c-%d: %s\n", i2cbus, strerror(ENOENT));
}
else {
fprintf(stderr, "Error: Could not open file "
"`%s': %s\n", filename, strerror(errno));
if (errno == EACCES)
fprintf(stderr, "Run as root?\n");
}
exit(1);
}
if (ioctl(file, I2C_SLAVE, address) < 0) {
fprintf(stderr,
"Error: Could not set address to 0x%02x: %s\n",
address, strerror(errno));
return -errno;
}
res = i2c_smbus_write_byte(file, daddress);
if (res < 0) {
fprintf(stderr, "Warning - write failed, filename=%s, daddress=%d\n",
filename, daddress);
}
daddress = 0x21; // Start oscillator (page 10)
printf("writing: 0x%02x\n", daddress);
res = i2c_smbus_write_byte(file, daddress);
daddress = 0x81; // Display on, blinking off (page 11)
printf("writing: 0x%02x\n", daddress);
res = i2c_smbus_write_byte(file, daddress);
daddress = 0xef; // Full brightness (page 15)
printf("Full brightness writing: 0x%02x\n", daddress);
res = i2c_smbus_write_byte(file, daddress);
daddress = 0x00; // Start writing to adress 0 (page 13)
printf("Start writing to address 0 writing: 0x%02x\n", daddress);
res = i2c_smbus_write_byte(file, daddress);
return 0;
}
int SetFile(int _i2cbus, int _address) //Setta le variabili iniziali...
{
i2cbus = _i2cbus;
address = _address;
daddress = 0;
char filename[20];
signal(SIGINT, INThandler);
//Startup the matrix
size = I2C_SMBUS_BYTE;
sprintf(filename, "/dev/i2c-%d", i2cbus);
file = open(filename, O_RDWR);
if (file<0) {
if (errno == ENOENT) {
fprintf(stderr, "Error: Could not open file "
"/dev/i2c-%d: %s\n", i2cbus, strerror(ENOENT));
}
else {
fprintf(stderr, "Error: Could not open file "
"`%s': %s\n", filename, strerror(errno));
if (errno == EACCES)
fprintf(stderr, "Run as root?\n");
}
exit(1);
}
if (ioctl(file, I2C_SLAVE, address) < 0) {
fprintf(stderr,
"Error: Could not set address to 0x%02x: %s\n",
address, strerror(errno));
return -errno;
}
res = i2c_smbus_write_byte(file, daddress);
if (res < 0) {
fprintf(stderr, "Warning - write failed, filename=%s, daddress=%d\n",
filename, daddress);
}
return 0;
}
void Write(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
if (args.Length() < 4) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong arguments")));
return;
}
if (!args[0]->IsNumber() || !args[1]->IsNumber() || !args[2]->IsNumber() || !args[3]->IsNumber()) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong type of arguments")));
return;
}
int ROW = 0;
int VALUE = 0;
// get the param
ROW = args[0]->ToInteger()->Value();
VALUE = args[1]->ToInteger()->Value();
int _i2cbus = args[2]->ToInteger()->Value();
int _address = args[3]->ToInteger()->Value();
SetFile(_i2cbus, _address); //Devo settare /dev/i2c... tutte le volte
i2c_smbus_write_byte_data(file, ROW, VALUE);
close(file);
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "end of job"));
}
void WriteAllFrames(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
if (args.Length() < 4) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong number arguments")));
return;
}
if (!args[0]->IsArray() || !args[1]->IsNumber() || !args[2]->IsNumber() || !args[3]->IsNumber()) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong type of arguments")));
return;
}
int _i2cbus = args[1]->ToInteger()->Value();
int _address = args[2]->ToInteger()->Value();
int velocity = args[3]->ToInteger()->Value();
SetFile(_i2cbus, _address); //Devo settare /dev/i2c... tutte le volte
Local<Array> FirstArray = Local<Array>::Cast(args[0]);
Local<Array> SecondArray;
// ... init obj from arguments or wherever ...
int length = FirstArray->Length();
int VALUE = 0;
//for (int i = 0; i < length; i++)
//{
// // do something with element
// SecondArray = Local<Array>::Cast(FirstArray->Get(Number::New(i)));
// for (int n = 0; n < 16; n++) {
// VALUE = SecondArray->Get(Number::New(n))->ToInteger()->Value();
// i2c_smbus_write_byte_data(file, n, VALUE);
// }
// usleep(50000 * velocity);
//}
close(file);
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "end of 'WRITE ALL FRAMES' job"));
}
void WriteSleep(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
if (args.Length() < 5) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong number arguments")));
return;
}
if (!args[0]->IsNumber() || !args[1]->IsNumber() || !args[2]->IsNumber() || !args[3]->IsNumber() || !args[4]->IsNumber()) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong type of arguments")));
return;
}
int ROW = 0;
int VALUE = 0;
// get the param
ROW = args[0]->ToInteger()->Value();
VALUE = args[1]->ToInteger()->Value();
int _i2cbus = args[2]->ToInteger()->Value();
int _address = args[3]->ToInteger()->Value();
int delay = args[4]->ToInteger()->Value();
SetFile(_i2cbus, _address); //Devo settare /dev/i2c... tutte le volte
i2c_smbus_write_byte_data(file, ROW, VALUE);
sleep(delay);
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "end of job"));
}
void Begin(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
if (args.Length() < 2) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong number arguments")));
return;
}
if (!args[0]->IsNumber() || !args[1]->IsNumber()) {
isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Wrong type of arguments")));
return;
}
int _i2cbus = args[0]->ToInteger()->Value();
int _address = args[1]->ToInteger()->Value();
SetFileFirst(_i2cbus, _address);
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "Begin executed"));
}
void Exit(const FunctionCallbackInfo<Value>& args) {
//LOOP = false;
Isolate* isolate = args.GetIsolate();
args.GetReturnValue().Set(String::NewFromUtf8(isolate, "Exit"));
}
// This is the implementation of the "add" method
// Input arguments are passed using the
// const FunctionCallbackInfo<Value>& args struct
void Add(const FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
// Check the number of arguments passed.
if (args.Length() < 2) {
// Throw an Error that is passed back to JavaScript
isolate->ThrowException(Exception::TypeError(
String::NewFromUtf8(isolate, "Wrong number of arguments")));
return;
}
// Check the argument types
if (!args[0]->IsNumber() || !args[1]->IsNumber()) {
isolate->ThrowException(Exception::TypeError(
String::NewFromUtf8(isolate, "Wrong arguments")));
return;
}
// Perform the operation
double value = args[0]->NumberValue() + args[1]->NumberValue();
Local<Number> num = Number::New(isolate, value);
// Set the return value (using the passed in
// FunctionCallbackInfo<Value>&)
args.GetReturnValue().Set(num);
}
void Init(Local<Object> exports) {
NODE_SET_METHOD(exports, "add", Add);
NODE_SET_METHOD(exports, "Write", Write);
NODE_SET_METHOD(exports, "WriteAllFrames", WriteAllFrames);
NODE_SET_METHOD(exports, "WriteSleep", WriteSleep);
NODE_SET_METHOD(exports, "Begin", Begin);
NODE_SET_METHOD(exports, "Exit", Exit);
}
NODE_MODULE(NODE_GYP_MODULE_NAME, Init)
} // namespace demo
{
"targets": [
{
"target_name": "addon",
"sources": [ "addon.cc" ]
}
]
}
This diff is collapsed.
cmd_Release/addon.node := rm -rf "Release/addon.node" && cp -af "Release/obj.target/addon.node" "Release/addon.node"
cmd_Release/obj.target/addon.node := g++ -shared -pthread -rdynamic -Wl,-soname=addon.node -o Release/obj.target/addon.node -Wl,--start-group Release/obj.target/addon/addon.o -Wl,--end-group
cmd_Release/obj.target/addon/addon.o := g++ '-DNODE_GYP_MODULE_NAME=addon' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/root/.node-gyp/8.5.0/include/node -I/root/.node-gyp/8.5.0/src -I/root/.node-gyp/8.5.0/deps/uv/include -I/root/.node-gyp/8.5.0/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/addon/addon.o.d.raw -c -o Release/obj.target/addon/addon.o ../addon.cc
Release/obj.target/addon/addon.o: ../addon.cc \
/root/.node-gyp/8.5.0/include/node/node.h \
/root/.node-gyp/8.5.0/include/node/v8.h \
/root/.node-gyp/8.5.0/include/node/v8-version.h \
/root/.node-gyp/8.5.0/include/node/v8config.h \
/root/.node-gyp/8.5.0/include/node/node_version.h ../i2c-dev.h \
../8x8font.h
../addon.cc:
/root/.node-gyp/8.5.0/include/node/node.h:
/root/.node-gyp/8.5.0/include/node/v8.h:
/root/.node-gyp/8.5.0/include/node/v8-version.h:
/root/.node-gyp/8.5.0/include/node/v8config.h:
/root/.node-gyp/8.5.0/include/node/node_version.h:
../i2c-dev.h:
../8x8font.h:
# This file is generated by gyp; do not edit.
TOOLSET := target
TARGET := addon
DEFS_Debug := \
'-DNODE_GYP_MODULE_NAME=addon' \
'-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' \
'-DV8_ENABLE_CHECKS'
# Flags passed to all source files.
CFLAGS_Debug := \
-fPIC \
-pthread \
-Wall \
-Wextra \
-Wno-unused-parameter \
-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/root/.node-gyp/8.5.0/include/node \
-I/root/.node-gyp/8.5.0/src \
-I/root/.node-gyp/8.5.0/deps/uv/include \
-I/root/.node-gyp/8.5.0/deps/v8/include
DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=addon' \
'-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 \
-O3 \
-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/root/.node-gyp/8.5.0/include/node \
-I/root/.node-gyp/8.5.0/src \
-I/root/.node-gyp/8.5.0/deps/uv/include \
-I/root/.node-gyp/8.5.0/deps/v8/include
OBJS := \
$(obj).target/$(TARGET)/addon.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 :=
$(obj).target/addon.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
$(obj).target/addon.node: LIBS := $(LIBS)
$(obj).target/addon.node: TOOLSET := $(TOOLSET)
$(obj).target/addon.node: $(OBJS) FORCE_DO_CMD
$(call do_cmd,solink_module)
all_deps += $(obj).target/addon.node
# Add target alias
.PHONY: addon
addon: $(builddir)/addon.node
# Copy this to the executable output path.
$(builddir)/addon.node: TOOLSET := $(TOOLSET)
$(builddir)/addon.node: $(obj).target/addon.node FORCE_DO_CMD
$(call do_cmd,copy)
all_deps += $(builddir)/addon.node
# Short alias for building this executable.
.PHONY: addon.node
addon.node: $(obj).target/addon.node $(builddir)/addon.node
# Add executable to "all" target.
.PHONY: all
all: $(builddir)/addon.node
# This file is generated by gyp; do not edit.
export builddir_name ?= ./build/.
.PHONY: all
all:
$(MAKE) addon
# 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",
"debug_devtools": "node",
"debug_http2": "false",
"debug_nghttp2": "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": 57,
"node_no_browser_globals": "false",
"node_prefix": "/usr",
"node_release_urlbase": "",
"node_shared": "false",
"node_shared_cares": "true",
"node_shared_http_parser": "true",
"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",
"node_without_node_options": "false",
"openssl_fips": "",
"openssl_no_asm": 0,
"shlib_suffix": "so.57",
"target_arch": "arm",
"uv_parent_path": "/deps/uv/",
"uv_use_dtrace": "false",
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 0,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_snapshot": "false",