aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: c4337e660f090af649e06368f2f4f6cd255ee73f (plain)
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
NODE_MODULES = node_modules
VERSION := $(shell cat ./VERSION)

export RUSTFLAGS=-Ctarget-feature=+simd128

.PHONY: build assets deps lint prebaked-build test wasm

assets:
	npm run assets

deps:
	npm ci
	go mod download

build: deps
	npm run build
	@echo "Anubis is now built to ./var/anubis"

all: build

lint:
	go vet ./...
	go tool staticcheck ./...

prebaked-build:
	go build -o ./var/anubis -ldflags "-X 'github.com/TecharoHQ/anubis.Version=$(VERSION)'" ./cmd/anubis

test:
	npm run test

wasm:
	cargo build --release --target wasm32-unknown-unknown
	cp -vf ./target/wasm32-unknown-unknown/release/*.wasm ./web/static/wasm