File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change 11/out /*
22/statements /*
33/.stack-work
4+ /release
Original file line number Diff line number Diff line change 11
2- .PHONY = build run
2+ .PHONY = build run static-build clean release
3+
4+ VERSION =0.1.0.0
5+ ARCH =$(shell uname -m)
6+
7+ BINARY_NAME =s2hl
8+
39
410build :
511 @stack build
612
713run :
8- @` pwd` /.stack-work/install/x86_64-linux/lts-3.16/7.10.2/bin/s2hl -exe \
14+ @` pwd` /.stack-work/install/x86_64-linux/lts-3.16/7.10.2/bin/{BINARY_NAME} -exe \
915 --statements-dir ` pwd` /statements \
1016 --output-dir ` pwd` /out \
1117 --currency USD \
1218 --currency HRK
1319
20+ static-build : clean
21+ @mkdir -p release/build
22+ @stack ghc -- \
23+ app/Main.hs \
24+ src/S2HL/Lib.hs \
25+ src/S2HL/Options.hs \
26+ src/S2HL/Types.hs \
27+ -static \
28+ -rtsopts=all \
29+ -optl-pthread \
30+ -optl-static \
31+ -O2 \
32+ -threaded \
33+ -odir release/build \
34+ -hidir release/build \
35+ -o release/${BINARY_NAME} -${VERSION} -linux-${ARCH}
36+
37+ clean :
38+ @rm -rf release
39+
40+ release : static-build
41+ @echo " \n\nRelease available at:\n"
42+ @echo " STATIC BINARY: ` pwd` /release/{BINARY_NAME}-${VERSION} -linux-${ARCH} \n"
43+
You can’t perform that action at this time.
0 commit comments