felt/Makefile
Mikkel Georgsen af13732b2b feat(01-01): initialize Go module, dependency tree, and project scaffold
- Go module at github.com/felt-app/felt with go-libsql pinned to commit hash
- Full directory structure per research recommendations (cmd/leaf, internal/*, frontend/)
- Makefile with build, run, run-dev, test, frontend, all, clean targets
- LibSQL database with WAL mode, foreign keys, and embedded migration runner
- SvelteKit SPA stub served via go:embed
- Package stubs for all internal packages (server, nats, store, auth, clock, etc.)
- go build and go vet pass cleanly

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 03:34:44 +01:00

31 lines
687 B
Makefile

.PHONY: build run test frontend all clean
# Default data directory
DATA_DIR ?= ./data
ADDR ?= :8080
BINARY := cmd/leaf/leaf
build:
CGO_ENABLED=1 go build -o $(BINARY) ./cmd/leaf/
run: build
./$(BINARY) --data-dir $(DATA_DIR) --addr $(ADDR)
run-dev: build
./$(BINARY) --data-dir $(DATA_DIR) --addr $(ADDR) --dev
test:
CGO_ENABLED=1 go test ./...
frontend:
@mkdir -p frontend/build
@if [ ! -f frontend/build/index.html ]; then \
echo '<!DOCTYPE html><html><head><title>Felt</title></head><body><h1>Felt</h1><p>Loading...</p></body></html>' > frontend/build/index.html; \
fi
@echo "Frontend build complete (stub)"
all: frontend build
clean:
rm -f $(BINARY)
rm -rf data/