Blame view

Makefile 608 Bytes
Georg Hopp authored
1 2 3 4
.PHONY: start wasm build run clean

PROFILE ?= dev
ifeq "$(PROFILE)" "release"
5 6 7
CARGO_PROFILE = --release
WASM_PROFILE = --release
WASM_EXTRA = --no-default-features
Georg Hopp authored
8
else
9 10 11
CARGO_PROFILE =
WASM_PROFILE = --dev
WASM_EXTRA =
Georg Hopp authored
12 13 14
endif

start:
15
	systemfd --no-pid -s 0.0.0.0:3000 -- \
Georg Hopp authored
16 17 18
		cargo watch -i static/ -s "make run"

wasm:
19 20
	wasm-pack build $(WASM_PROFILE) -d ../static/ui -t web ./ui -- \
		$(WASM_EXTRA)
Georg Hopp authored
21 22

build:
23
	cargo build $(CARGO_PROFILE) --bin artshop-server
Georg Hopp authored
24 25 26 27 28 29 30 31 32 33

run: build wasm
	cargo run --bin artshop-server

release:
	docker build -t artshop -f build/Dockerfile .

clean:
	cargo clean
	rm -Rf ./static/ui