-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 834 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 834 Bytes
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
.PHONY: all build build-mcp run deps grammars coverage clean
all: build
build:
go build -o codemap .
build-mcp:
go build -o codemap-mcp ./cmd/codemap-mcp/
DIR ?= .
ABS_DIR := $(shell cd "$(DIR)" && pwd)
SKYLINE_FLAG := $(if $(SKYLINE),--skyline,)
ANIMATE_FLAG := $(if $(ANIMATE),--animate,)
DEPS_FLAG := $(if $(DEPS),--deps,)
run: build
./codemap $(SKYLINE_FLAG) $(ANIMATE_FLAG) $(DEPS_FLAG) "$(ABS_DIR)"
# Build tree-sitter grammar libraries (one-time setup for deps mode)
grammars:
cd scanner && ./build-grammars.sh
# Dependency graph mode - shows functions and imports per file
deps: build grammars
./codemap --deps "$(ABS_DIR)"
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out | tail -n 1
clean:
rm -f codemap codemap-mcp
rm -rf scanner/.grammar-build
rm -rf scanner/grammars