1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
all: srs.node
NPROCS:=1
OS:=$(shell uname -s)
ifeq ($(OS),Linux)
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
endif
ifeq ($(OS),Darwin)
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
srs.node:
`npm explore npm -g -- pwd`/bin/node-gyp-bin/node-gyp build
clean:
rm -rf build
rm -f lib/_srs.node
test:
@PATH="./node_modules/mocha/bin:${PATH}" && NODE_PATH="./lib:$(NODE_PATH)" mocha -R spec
check: test
lint:
@jshint lib/*js test/*js --config=jshint.json
.PHONY: test
|