.PHONY: all build web server clean run dev

all: build

web:
	cd web && npm install && npm run build
	rm -rf server/static/*
	cp -r web/dist/* server/static/

server:
	cd server && go build -o ../lan-manager .

build: web server

clean:
	rm -f lan-manager
	rm -rf server/static/*
	rm -rf web/dist

dev:
	cd web && npm run dev

run:
	cd server && go run .
