Skip to content

Commit

Permalink
Add support for setting node-gyp options
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Jan 28, 2017
1 parent 555738e commit 0545873
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/make/lib/addons/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ endif

NODE_GYP ?= $(BIN_DIR)/node-gyp

# Define command-line options when invoking node-gyp.
NODE_GYP_FLAGS ?=

# Define the C compiler:
C_COMPILER ?= gcc

Expand Down Expand Up @@ -58,7 +61,7 @@ install-addons: $(NODE_GYP)
fPIC=$(fPIC) \
$(MAKE); \
echo 'Building add-on...'; \
cd .. && $(NODE_GYP) rebuild || exit 1; \
cd .. && $(NODE_GYP) $(NODE_GYP_FLAGS) rebuild || exit 1; \
done

.PHONY: install-addons
Expand All @@ -78,7 +81,7 @@ clean-addons:
echo 'Cleaning source...'; \
cd $$pkg/src && $(MAKE) clean; \
echo 'Cleaning add-on...'; \
cd .. && $(NODE_GYP) clean || exit 1; \
cd .. && $(NODE_GYP) $(NODE_GYP_FLAGS) clean || exit 1; \
done

.PHONY: clean-addons

0 comments on commit 0545873

Please sign in to comment.