aboutsummaryrefslogtreecommitdiffstats
path: root/makefile
blob: ab3549719ee68fec7059467d0f289db705171182 (plain) (blame)
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
BINS := atlas
BUILD_TAGS := icu fts5
SRC := main.go $(wildcard cmd/*.go) $(wildcard pkg/*/*.go)
INSTALL_PATH := ~/.local/bin

.PHONY: all install uninstall test info clean

all: $(BINS)

atlas: $(SRC)
	go build -tags "$(BUILD_TAGS)" -o $@ $<

test:
	go test -tags "$(BUILD_TAGS)" ./...

########
#
########

install: $(INSTALL_PATH)/atlas

$(INSTALL_PATH)/atlas: atlas
	cp atlas $(INSTALL_PATH)

uninstall: $(INSTALL_PATH)/atlas
	rm $<

########
#
########

info:
	@echo "SRC: $(SRC)"
	@echo "BINS: $(BINS)"
	@echo "INSTALL_PATH: $(INSTALL_PATH)"
	@echo "BUILD_TAGS: $(BUILD_TAGS)"

clean:
	rm -f $(BINS) *.db *.db-shm *.db-wal
	go mod tidy