DeepSpeech/native_client/javascript/Makefile
Alexandre Lissy 42075082be Cleanup makefile
Fixes #874
2017-10-06 11:35:53 +02:00

35 lines
787 B
Makefile

NODE_BUILD_TOOL ?= node-pre-gyp
NODE_ABI_TARGET ?=
NODE_BUILD_VERBOSE ?= --verbose
include ../definitions.mk
default: build
clean:
rm -f deepspeech_wrap.cxx
rm -rf ./build/
clean-npm-pack:
rm -fr ./node_modules/
rm -fr ./deepspeech-*.tgz
really-clean: clean clean-npm-pack
rm -fr ./lib/
configure: deepspeech_wrap.cxx
$(NODE_BUILD_TOOL) configure $(NODE_BUILD_VERBOSE)
build: configure deepspeech_wrap.cxx
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" $(NODE_BUILD_TOOL) $(NODE_ABI_TARGET) rebuild $(NODE_BUILD_VERBOSE)
package: build
$(NODE_BUILD_TOOL) $(NODE_ABI_TARGET) package $(NODE_BUILD_VERBOSE)
npm-pack: clean
npm install node-pre-gyp@0.6.x
npm pack $(NODE_BUILD_VERBOSE)
deepspeech_wrap.cxx: deepspeech.i
swig -c++ -javascript -node deepspeech.i