-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 788 Bytes
/
Makefile
File metadata and controls
44 lines (36 loc) · 788 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
36
37
38
39
40
41
42
43
44
# Project name (used for binary output)
BINARY=buffer-sim
# Default target
.PHONY: all
all: build
# Build the project binary
.PHONY: build
build:
go build -o bin/$(BINARY) ./cmd/buffer-sim
# Run the demo with defaults
.PHONY: run
run:
go run ./cmd/buffer-sim --mode=both --framing=nl
# Run tests (all packages)
.PHONY: test
test:
go test ./...
# Clean build artifacts
.PHONY: clean
clean:
rm -rf bin
# Install dependencies (tidy up go.mod + go.sum)
.PHONY: deps
deps:
go mod tidy
# Lint (basic vet + fmt check)
.PHONY: lint
lint:
go vet ./...
test -z "$$(gofmt -l .)"
# Demo: run server + client separately
.PHONY: server client
server:
go run ./cmd/buffer-sim --mode=serveronly --framing=nl
client:
go run ./cmd/buffer-sim --mode=clientonly --framing=nl --buffered=true