Skip to content

Commit ea1d190

Browse files
committed
Add Makefile to help with packaging
1 parent 10b5706 commit ea1d190

File tree

2 files changed

+47
-5
lines changed

2 files changed

+47
-5
lines changed

CatnipJulia/src/run_catnip.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ function run_catnip(; timeout=false)
2020
numSets = 300
2121
# numSets = 120
2222

23-
fig = Figure(fontsize=14; size=(1200, 888))
24-
ax1 = Axis3(fig[1, 1]; aspect=(2, 1, 0.25), elevation=2pi / 5, perspectiveness=0.5, azimuth=0)
23+
fig = Figure(fontsize=14; size=(740, 976))
24+
ax1 = Axis3(fig[1, 1]; aspect=(1.5, 1.00, 0.25), elevation=(2 * pi) / 4, perspectiveness=0.25, azimuth=0 * pi)
2525

2626
hidedecorations!(ax1)
2727
hidespines!(ax1)
@@ -105,9 +105,9 @@ function run_catnip(; timeout=false)
105105

106106
mymagma = GLMakie.to_colormap(:magma)
107107
# mymagma = GLMakie.to_colormap(:BuPu_9)
108-
mymagma[1] = RGBA(0.0,0.0,0.0,0.0)
108+
mymagma[1] = RGBA(0.0, 0.0, 0.0, 0.0)
109109

110-
command = `catnip -d 4:VisOut -r 122880 -n 2048 -sas 6 -sf 45 -i -nw -nwb 81`
110+
command = `catnip -d spotify -r 122880 -n 2048 -sm 4 -sas 6 -sf 45 -i -nw -nwb 82`
111111
# command = `catnip -d "Google Chrome" -r 122880 -n 2048 -sas 6 -sf 45 -i -nw -nwb 60`
112112
#command = `go run ./cmd/catnip -d spotify -r 122880 -n 2048 -sas 5 -sf 45 -i -nw -nwb 50`
113113

@@ -153,7 +153,7 @@ function run_catnip(; timeout=false)
153153
elms = split(line, " ")
154154
elms = [elm for elm in elms if !isempty(elm)]
155155
nums = map(x -> parse(Float64, strip(x)), elms)
156-
nums = reverse(nums)
156+
#nums = reverse(nums)
157157

158158
# idx[] = numSets - count
159159
#println(nums)

Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
BUILD_TAG = devel
2+
ARCH ?= $(shell uname -m)
3+
BIN := catnip
4+
DESTDIR :=
5+
GO ?= go
6+
PKGNAME := catnip
7+
PREFIX := /usr/local
8+
9+
MAJORVERSION := 1
10+
MINORVERSION := 8
11+
PATCHVERSION := 5
12+
VERSION ?= ${MAJORVERSION}.${MINORVERSION}.${PATCHVERSION}
13+
14+
MAIN_DIR := ./cmd/catnip
15+
16+
LDFLAGS := -ldflags "\
17+
-X main.version=${VERSION} \
18+
-linkmode=external \
19+
"
20+
21+
SOURCES ?= $(shell find . -name "*.go" -type f)
22+
23+
24+
build: $(BIN)
25+
26+
clean:
27+
rm $(BIN)
28+
29+
.PHONY: clean
30+
31+
all: build
32+
33+
.PHONY: install
34+
install: build
35+
install -Dm755 ${BIN} $(DESTDIR)$(PREFIX)/bin/${BIN}
36+
37+
.PHONY: uninstall
38+
uninstall:
39+
rm -f $(DESTDIR)$(PREFIX)/bin/${BIN}
40+
41+
$(BIN): $(SOURCES)
42+
$(GO) build $(FLAGS) $(LDFLAGS) -o $@ $(EXTRA_FLAGS) $(MAIN_DIR)

0 commit comments

Comments
 (0)