Tuesday, 2 May 2017

node binding.gyp check 'regular' vs ARM Linux

I am building a node addon that depends on some libraries. Right now, it works on Linux (e.g. Ubuntu 16), but I would like to make it work on a Raspberry Pi (3) as well. The problem is that the library itself contains different versions of the ".a" file depending on the OS. I know that I can do something like:

'conditions:[
    ['OS=="linux"', {
        "cflags":["path_to_include"]
        "ldflags":["path_to_dot_a_file]
    }],
    ['OS=="arm?(don't know...)",{
        "cflags":["path_to_include_arm"]
        "ldflags":["path_to_dot_a_file_arm]
    }],
]

Is there any "tag" to differentiate between regular linux and arm linux? Or any other workaround?

Thanks!



via chlzr

No comments:

Post a Comment