forked from hasktorch/hasktorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (39 loc) · 1.16 KB
/
Makefile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
UNAME:=$(shell uname)
PWD:=$(shell pwd)
# intero and stack ghci are unable to use DYLD_LIBRARY_PATH on OSX
# See https://ghc.haskell.org/trac/ghc/ticket/11617
init:
git submodule update --init --recursive
( cd vendor; ./build-aten.sh )
( cd vendor; ./build-aten-spec.sh )
( cd vendor; ./build-error-handler.sh )
ifeq ($(UNAME),Darwin)
ln -sf $(PWD)/vendor/build/libATen.dylib /usr/local/lib/libATen.dylib
ln -sf $(PWD)/vendor/build/libEHX.dylib /usr/local/lib/libEHX.dylib
@echo "\nCreated shared library symlinks for OSX:\n"
@ls -l /usr/local/lib/libATen.dylib /usr/local/lib/libEHX.dylib
@echo
endif
stack build
clean:
stack clean
purge: clean
rm -rf vendor
git checkout -- vendor
build: clean
stack build
refresh:
rsync -arv ./output/raw/src/*.hs ./raw/src/
rsync -arv ./output/raw/src/generic/*.hs ./raw/src/generic/
build-aten:
cd vendor && ./build-aten.sh
build-spec:
cd vendor && ./build-aten-spec.sh
codegen-generic: build
stack exec codegen-generic
codegen-concrete: build
stack exec codegen-concrete
codegen-managed: build
stack exec codegen-managed
codegen: codegen-managed codegen-concrete codegen-generic
.PHONY: clean build refresh codegen init