Updated Makefile to install bindings (in addition to building)

Updated Haskell README to explain how to build the samples
This commit is contained in:
Adrian Herrera 2016-04-08 19:29:43 +10:00
parent b53bab1362
commit 4cbe52a701
2 changed files with 13 additions and 2 deletions

View File

@ -11,15 +11,20 @@ SAMPLE_M68K = $(TMP_DIR)/sample_m68k
SAMPLE_SPARC = $(TMP_DIR)/sample_sparc
SAMPLE_X86 = $(TMP_DIR)/sample_x86
.PHONY: all expected python
.PHONY: build install samples sample_python expected python sample_diff clean check
all:
build:
cd python && $(MAKE) gen_const
cd go && $(MAKE) gen_const
cd java && $(MAKE) gen_const
python const_generator.py dotnet
cd haskell && cabal install --dependencies-only && cabal configure && cabal build
install: build
cd python && $(MAKE) install
cd java && $(MAKE) install
cd haskell && cabal install
samples: expected python
sample_python: expected python
@ -55,6 +60,7 @@ sample_diff: FORCE
clean:
rm -rf $(TMP_DIR)
cd python && $(MAKE) clean
cd java && $(MAKE) clean
cd haskell && cabal clean
check:

View File

@ -26,3 +26,8 @@ If the build fails, install c2hs manually `cabal install c2hs` (note that this
will probably also require you to run `cabal install alex` and `cabal install
happy` as well). If you are NOT using a sandbox, ensure that `$HOME/.cabal/bin`
is on your PATH.
To build a sample (after having built and installed the Haskell bindings)
$ cd bindings/haskell
$ ghc --make samples/SampleArm.hs