Skip to content

Commit

Permalink
Prebuildify implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
DHVPP committed Mar 23, 2022
1 parent 79f3061 commit 59d6b52
Show file tree
Hide file tree
Showing 47 changed files with 135 additions and 4,561 deletions.
3 changes: 3 additions & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"variables": {
"openssl_fips" : "0"
},
"targets": [
{
"include_dirs": [
Expand Down
4 changes: 2 additions & 2 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
endif

quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /home/dhvp/Projekti/meridianbet/betshop-printer/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/dhvp/.cache/node-gyp/16.13.1" "-Dnode_gyp_dir=/home/dhvp/Projekti/meridianbet/betshop-printer/node_modules/node-gyp" "-Dnode_lib_file=/home/dhvp/.cache/node-gyp/16.13.1/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/dhvp/Projekti/meridianbet/betshop-printer" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/dhvp/Projekti/meridianbet/betshop-printer/build/config.gypi -I/home/dhvp/Projekti/meridianbet/betshop-printer/node_modules/node-gyp/addon.gypi -I/home/dhvp/.cache/node-gyp/16.13.1/include/node/common.gypi "--toplevel-dir=." binding.gyp
Makefile: $(srcdir)/binding.gyp $(srcdir)/build/config.gypi $(srcdir)/node_modules/node-gyp/addon.gypi $(srcdir)/../../../.cache/node-gyp/16.13.1/include/node/common.gypi
cmd_regen_makefile = cd $(srcdir); /home/dhvp/Projekti/meridianbet/betshop-printer/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/tmp/prebuildify/node/5.0.0" "-Dnode_gyp_dir=/home/dhvp/Projekti/meridianbet/betshop-printer/node_modules/node-gyp" "-Dnode_lib_file=/tmp/prebuildify/node/5.0.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/dhvp/Projekti/meridianbet/betshop-printer" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/dhvp/Projekti/meridianbet/betshop-printer/build/config.gypi -I/home/dhvp/Projekti/meridianbet/betshop-printer/node_modules/node-gyp/addon.gypi -I/tmp/prebuildify/node/5.0.0/include/node/common.gypi "--toplevel-dir=." binding.gyp
Makefile: $(srcdir)/../../../../../tmp/prebuildify/node/5.0.0/include/node/common.gypi $(srcdir)/build/config.gypi $(srcdir)/node_modules/node-gyp/addon.gypi $(srcdir)/binding.gyp
$(call do_cmd,regen_makefile)

# "all" is a concatenation of the "all" targets from all the included
Expand Down
1 change: 0 additions & 1 deletion build/Release/.deps/Release/betshop_printer.node.d

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
49 changes: 19 additions & 30 deletions build/betshop_printer.target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ DEFS_Debug := \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-D_HAS_EXCEPTIONS=1' \
'-DBUILDING_NODE_EXTENSION' \
'-DDEBUG' \
'-D_DEBUG' \
'-DV8_ENABLE_CHECKS'
'-D_DEBUG'

# Flags passed to all source files.
CFLAGS_Debug := \
Expand All @@ -41,31 +34,25 @@ CFLAGS_CC_Debug := \
-Wunused-result \
-Wcast-function-type \
-fno-rtti \
-std=gnu++14
-std=gnu++0x

INCS_Debug := \
-I/home/dhvp/.cache/node-gyp/16.13.1/include/node \
-I/home/dhvp/.cache/node-gyp/16.13.1/src \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/openssl/config \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/openssl/openssl/include \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/uv/include \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/zlib \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/v8/include \
-I/tmp/prebuildify/node/5.0.0/include/node \
-I/tmp/prebuildify/node/5.0.0/src \
-I/tmp/prebuildify/node/5.0.0/deps/openssl/config \
-I/tmp/prebuildify/node/5.0.0/deps/openssl/openssl/include \
-I/tmp/prebuildify/node/5.0.0/deps/uv/include \
-I/tmp/prebuildify/node/5.0.0/deps/zlib \
-I/tmp/prebuildify/node/5.0.0/deps/v8/include \
-I$(srcdir)/node_modules/nan

DEFS_Release := \
'-DNODE_GYP_MODULE_NAME=betshop_printer' \
'-DUSING_UV_SHARED=1' \
'-DUSING_V8_SHARED=1' \
'-DV8_DEPRECATION_WARNINGS=1' \
'-DV8_DEPRECATION_WARNINGS' \
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
'-D_GLIBCXX_USE_CXX11_ABI=1' \
'-D_LARGEFILE_SOURCE' \
'-D_FILE_OFFSET_BITS=64' \
'-D__STDC_FORMAT_MACROS' \
'-DOPENSSL_NO_PINSHARED' \
'-DOPENSSL_THREADS' \
'-D_HAS_EXCEPTIONS=1' \
'-DBUILDING_NODE_EXTENSION'

Expand All @@ -79,6 +66,8 @@ CFLAGS_Release := \
-m64 \
\
-O3 \
-ffunction-sections \
-fdata-sections \
-fno-omit-frame-pointer

# Flags passed to only C files.
Expand All @@ -89,16 +78,16 @@ CFLAGS_CC_Release := \
-Wunused-result \
-Wcast-function-type \
-fno-rtti \
-std=gnu++14
-std=gnu++0x

INCS_Release := \
-I/home/dhvp/.cache/node-gyp/16.13.1/include/node \
-I/home/dhvp/.cache/node-gyp/16.13.1/src \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/openssl/config \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/openssl/openssl/include \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/uv/include \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/zlib \
-I/home/dhvp/.cache/node-gyp/16.13.1/deps/v8/include \
-I/tmp/prebuildify/node/5.0.0/include/node \
-I/tmp/prebuildify/node/5.0.0/src \
-I/tmp/prebuildify/node/5.0.0/deps/openssl/config \
-I/tmp/prebuildify/node/5.0.0/deps/openssl/openssl/include \
-I/tmp/prebuildify/node/5.0.0/deps/uv/include \
-I/tmp/prebuildify/node/5.0.0/deps/zlib \
-I/tmp/prebuildify/node/5.0.0/deps/v8/include \
-I$(srcdir)/node_modules/nan

OBJS := \
Expand Down
13 changes: 2 additions & 11 deletions build/config.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -342,17 +342,8 @@
"v8_trace_maps": 0,
"v8_use_siphash": 1,
"want_separate_host_toolset": 0,
"nodedir": "/home/dhvp/.cache/node-gyp/16.13.1",
"nodedir": "/tmp/prebuildify/node/5.0.0",
"standalone_static_library": 1,
"user_agent": "npm/8.1.2 node/v16.13.1 linux x64 workspaces/false",
"userconfig": "/home/dhvp/.npmrc",
"local_prefix": "/home/dhvp/Projekti/meridianbet/betshop-printer",
"metrics_registry": "https://registry.npmjs.org/",
"prefix": "/home/dhvp/.nvm/versions/node/v16.13.1",
"cache": "/home/dhvp/.npm",
"node_gyp": "/home/dhvp/.nvm/versions/node/v16.13.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",
"globalconfig": "/home/dhvp/.nvm/versions/node/v16.13.1/etc/npmrc",
"init_module": "/home/dhvp/.npm-init.js",
"global_prefix": "/home/dhvp/.nvm/versions/node/v16.13.1"
"target": "5.0.0"
}
}
Binary file modified file.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const betshop_printer = require('./build/Release/betshop_printer');
const betshop_printer = require('node-gyp-build')(__dirname);

function getDefaultPrinter() {
return betshop_printer.getDefaultPrinter();
Expand Down
Loading

0 comments on commit 59d6b52

Please sign in to comment.