@ -50,8 +50,7 @@ HOSTTMPNPM:=$(shell mktemp -u XXXXXXXXXX)
TARGET_CFLAGS += $( FPIC)
TARGET_CFLAGS += $( FPIC)
TARGET_CPPFLAGS += $( FPIC)
TARGET_CPPFLAGS += $( FPIC)
d e f i n e B u i l d / C o m p i l e
$( MAKE_VARS) \
NPM_FLAGS = $( MAKE_VARS) \
$( MAKE_FLAGS) \
$( MAKE_FLAGS) \
npm_config_arch = $( NODEJS_CPU) \
npm_config_arch = $( NODEJS_CPU) \
npm_config_target_arch = $( NODEJS_CPU) \
npm_config_target_arch = $( NODEJS_CPU) \
@ -59,42 +58,51 @@ define Build/Compile
npm_config_nodedir = $( STAGING_DIR) /usr/ \
npm_config_nodedir = $( STAGING_DIR) /usr/ \
npm_config_prefix = $( PKG_INSTALL_DIR) /usr/ \
npm_config_prefix = $( PKG_INSTALL_DIR) /usr/ \
npm_config_cache = $( TMP_DIR) /npm-cache-$( TMPNPM) \
npm_config_cache = $( TMP_DIR) /npm-cache-$( TMPNPM) \
npm_config_tmp = $( TMP_DIR) /npm-tmp-$( TMPNPM) \
npm install -g $( PKG_BUILD_DIR)
npm_config_tmp = $( TMP_DIR) /npm-tmp-$( TMPNPM)
d e f i n e B u i l d / C o m p i l e
cd $( PKG_BUILD_DIR) ; \
$( NPM_FLAGS) npm install --production --global-style --no-save --omit= dev --no-package-lock --ignore-scripts --legacy-peer-deps
rm -rf $( TMP_DIR) /npm-tmp-$( TMPNPM)
rm -rf $( TMP_DIR) /npm-tmp-$( TMPNPM)
rm -rf $( TMP_DIR) /npm-cache-$( TMPNPM)
rm -rf $( TMP_DIR) /npm-cache-$( TMPNPM)
e n d e f
e n d e f
d e f i n e P a c k a g e / n o d e - j a v a s c r i p t - o b f u s c a t o r / i n s t a l l
d e f i n e P a c k a g e / n o d e - j a v a s c r i p t - o b f u s c a t o r / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/lib/node/$( PKG_NPM_NAME)
$( INSTALL_DIR) $( 1) /usr/lib/node/$( PKG_NPM_NAME)
$( CP) $( PKG_INSTALL_DIR) /usr/lib/node_modules/$( PKG_NPM_NAME ) /{ package.json,LICENSE.BSD} \
$( CP) $( PKG_BUILD_DIR ) /{ package.json,LICENSE.BSD} \
$( 1) /usr/lib/node/$( PKG_NPM_NAME) /
$( 1) /usr/lib/node/$( PKG_NPM_NAME) /
$( CP) $( PKG_INSTALL_DIR) /usr/lib/node_modules/$( PKG_NPM_NAME ) /README.md \
$( CP) $( PKG_BUILD_DIR ) /README.md \
$( 1) /usr/lib/node/$( PKG_NPM_NAME) /
$( 1) /usr/lib/node/$( PKG_NPM_NAME) /
$( CP) $( PKG_INSTALL_DIR) /usr/lib/node_modules/$( PKG_NPM_NAME ) /{ node_modules,bin,dist} \
$( CP) $( PKG_BUILD_DIR ) /{ node_modules,bin,dist} \
$( 1) /usr/lib/node/$( PKG_NPM_NAME) /
$( 1) /usr/lib/node/$( PKG_NPM_NAME) /
$( INSTALL_DIR) $( 1) /usr/bin
$( INSTALL_DIR) $( 1) /usr/bin
$( LN) ../lib/node/javascript-obfuscator/bin/javascript-obfuscator $( 1) /usr/bin/javascript-obfuscator
$( LN) ../lib/node/javascript-obfuscator/bin/javascript-obfuscator $( 1) /usr/bin/javascript-obfuscator
e n d e f
e n d e f
d e f i n e H o s t / C o m p i l e
$( HOST_MAKE_VARS) \
HOST_NPM_FLAGS = $( HOST_MAKE_VARS) \
$( HOST_MAKE_FLAGS) \
npm_config_arch = $( NODEJS_CPU) \
npm_config_target_arch = $( NODEJS_CPU) \
npm_config_build_from_source = true \
npm_config_nodedir = $( STAGING_DIR) /usr/ \
npm_config_nodedir = $( STAGING_DIR) /usr/ \
npm_config_prefix = $( HOST_INSTALL_DIR) /usr/ \
npm_config_prefix = $( HOST_INSTALL_DIR) /usr/ \
npm_config_cache = $( TMP_DIR) /npm-cache-$( HOSTTMPNPM) \
npm_config_cache = $( TMP_DIR) /npm-cache-$( HOSTTMPNPM) \
npm_config_tmp = $( TMP_DIR) /npm-tmp-$( HOSTTMPNPM) \
npm install -g --no-optional $( HOST_BUILD_DIR)
npm_config_tmp = $( TMP_DIR) /npm-tmp-$( HOSTTMPNPM)
d e f i n e H o s t / C o m p i l e
cd $( HOST_BUILD_DIR) ; \
$( HOST_NPM_FLAGS) npm install --production --global-style --no-save --omit= dev --no-package-lock --ignore-scripts --legacy-peer-deps
rm -rf $( TMP_DIR) /npm-tmp-$( HOSTTMPNPM)
rm -rf $( TMP_DIR) /npm-tmp-$( HOSTTMPNPM)
rm -rf $( TMP_DIR) /npm-cache-$( HOSTTMPNPM)
rm -rf $( TMP_DIR) /npm-cache-$( HOSTTMPNPM)
e n d e f
e n d e f
d e f i n e H o s t / I n s t a l l
d e f i n e H o s t / I n s t a l l
$( INSTALL_DIR) $( 1) /lib/node_modules/$( PKG_NPM_NAME)
$( INSTALL_DIR) $( 1) /lib/node_modules/$( PKG_NPM_NAME)
$( CP) $( HOST_INSTALL_DIR) /usr/lib/node_modules/$( PKG_NPM_NAME ) /{ package.json,LICENSE.BSD} \
$( CP) $( HOST_BUILD_DIR ) /{ package.json,LICENSE.BSD} \
$( 1) /lib/node_modules/$( PKG_NPM_NAME) /
$( 1) /lib/node_modules/$( PKG_NPM_NAME) /
$( CP) $( HOST_INSTALL_DIR) /usr/lib/node_modules/$( PKG_NPM_NAME ) /README.md \
$( CP) $( HOST_BUILD_DIR ) /README.md \
$( 1) /lib/node_modules/$( PKG_NPM_NAME) /
$( 1) /lib/node_modules/$( PKG_NPM_NAME) /
$( CP) $( HOST_INSTALL_DIR) /usr/lib/node_modules/$( PKG_NPM_NAME ) /{ node_modules,bin,dist} \
$( CP) $( HOST_BUILD_DIR ) /{ node_modules,bin,dist} \
$( 1) /lib/node_modules/$( PKG_NPM_NAME) /
$( 1) /lib/node_modules/$( PKG_NPM_NAME) /
$( INSTALL_DIR) $( 1) /bin
$( INSTALL_DIR) $( 1) /bin
$( LN) ../lib/node_modules/javascript-obfuscator/bin/javascript-obfuscator $( 1) /bin/javascript-obfuscator
$( LN) ../lib/node_modules/javascript-obfuscator/bin/javascript-obfuscator $( 1) /bin/javascript-obfuscator