Skip to content

Commit

Permalink
Updated Makefile and package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
sitnin committed Aug 11, 2013
1 parent a117680 commit b1c50ba
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
25 changes: 15 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,32 @@ all: clean lib tests
@echo "All done"

prepare:
# @echo "Making empty build/ directory"
# @echo "Make an empty build/ directory"
mkdir -p build

clean:
# @echo "Deleting build/ directory"
# @echo "Delete build/ directory"
rm -rf build

check:
build/test
build/testcpp

lib: prepare
@echo "Compiling library"
gcc -c src/iching.c -o build/iching.o -I include -fPIC
ar rcs build/libiching.a build/iching.o
rm build/iching.o

node: clean lib
node-gyp configure build

tests: prepare
build-tests: prepare
@echo "Compiling tests"
gcc tests/test.c -Lbuild/ -liching -o build/test -I include
g++ tests/test.cc -Lbuild/ -liching -o build/testcpp -I include

test: build-tests
build/test
build/testcpp

node-lib: lib
node-gyp configure build

node-test:
node tests/test.js

node: clean node-lib node-test
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iching",
"version": "1.0.0-3",
"version": "1.0.0-4",
"main":"./build/Release/iching",
"description": "A c/c++ library for calculation birth/core/end hexagram numbers",
"author": {
Expand All @@ -20,6 +20,7 @@
"0.8", "0.10"
],
"scripts": {
"install": "make node"
"install": "make node",
"test": "make node-test"
}
}

0 comments on commit b1c50ba

Please sign in to comment.