File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed
Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,18 @@ NPM ?= npm
77# Define the command for `node`:
88NODE ?= node
99
10+ # Define the C compiler:
11+ C_COMPILER ?= gcc
12+
13+ # Define the C++ compiler:
14+ CXX_COMPILER ?= g++
15+
16+ # Define the Fortran compiler:
17+ FORTRAN_COMPILER ?= gfortran
18+
19+ # Define the Fortran/C linker:
20+ LINKER ?= gfortran
21+
1022# Define the command for removing files and directories:
1123DELETE ?= -rm
1224DELETE_FLAGS ?= -rf
@@ -29,6 +41,7 @@ include $(TOOLS_MAKE_LIB_DIR)/help/Makefile
2941include $(TOOLS_MAKE_LIB_DIR ) /init/Makefile
3042
3143# Please keep sorted in alphabetical order:
44+ include $(TOOLS_MAKE_LIB_DIR ) /addons/Makefile
3245include $(TOOLS_MAKE_LIB_DIR ) /benchmark/Makefile
3346include $(TOOLS_MAKE_LIB_DIR ) /bib/Makefile
3447include $(TOOLS_MAKE_LIB_DIR ) /complexity/Makefile
Original file line number Diff line number Diff line change 1+
2+ # VARIABLES #
3+
4+ # Define the path of the executable for [node-gyp][1].
5+ #
6+ # [1]: https://github.com/nodejs/node-gyp
7+
8+ NODE_GYP ?= $(BIN_DIR ) /node-gyp
9+
10+ # Define the C compiler:
11+ C_COMPILER ?= gcc
12+
13+ # Define the C++ compiler:
14+ CXX_COMPILER ?= g++
15+
16+ # Define the Fortran compiler:
17+ FORTRAN_COMPILER ?= gfortran
18+
19+
20+ # TARGETS #
21+
22+ # Install add-ons.
23+ #
24+ # This target installs native add-ons.
25+
26+ install-addons : $(NODE_GYP )
27+ $(QUIET ) $(MAKE ) -f $(this_file ) list-pkgs-addons | while read -r pkg; do \
28+ echo ' ' ; \
29+ echo " Add-on: $$ pkg" ; \
30+ echo ' Compiling source...' ; \
31+ cd $$ pkg/src && \
32+ C_COMPILER=$(C_COMPILER ) \
33+ FORTRAN_COMPILER=$(FORTRAN_COMPILER ) \
34+ $(MAKE ) ; \
35+ echo ' Building add-on...' ; \
36+ cd .. && $(NODE_GYP ) rebuild; \
37+ done
38+
39+ .PHONY : install-addons
40+
41+
42+ # Remove add-ons.
43+ #
44+ # This target removes all compiled and generated files for native add-ons.
45+
46+ clean-addons :
47+ $(QUIET ) $(MAKE ) -f $(this_file ) list-pkgs-addons | while read -r pkg; do \
48+ echo ' ' ; \
49+ echo " Add-on: $$ pkg" ; \
50+ echo ' Cleaning source...' ; \
51+ cd $$ pkg/src && $(MAKE ) clean; \
52+ echo ' Cleaning add-on...' ; \
53+ cd .. && $(NODE_GYP ) clean; \
54+ done
55+
56+ .PHONY : clean-addons
You can’t perform that action at this time.
0 commit comments