-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (47 loc) · 1.23 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
PREFIX=/usr/local
GO=go #/usr/local/go/bin/go
ARGS=build
CMD=mkdir -p ./bin/$(GOOS)_$(GOARCH) && $(GO) $(ARGS)
all: aggregate filter map interpolate util
### aggregate
aggregate: mean product quotient sum
mean:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/aggregate/$@.go
product:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/aggregate/$@.go
quotient:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/aggregate/$@.go
sum:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/aggregate/$@.go
###filter
filter: nhead
nhead:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/filter/$@.go
### map
map: abs inv scale shift
abs:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/map/$@.go
inv:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/map/$@.go
scale:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/map/$@.go
shift:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/map/$@.go
### interpolate
interpolate: interplin
interplin:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/interpolate/$@.go
### util
util: splitlines
splitlines:
$(CMD) -o ./bin/$(GOOS)_$(GOARCH)/$@ src/util/$@.go
### UTILS
install:
ls -tr bin/* | xargs -t -I {} install {} $(PREFIX)/bin/.
uninstall:
ls bin | xargs -t -I {} rm $(PREFIX)/bin/{}
clean:
rm -rf ./bin/*
test:
./test/test.sh
.PHONY: clean install uninstall test