central-arch/Makefile

23 lines
375 B
Makefile
Raw Normal View History

2024-10-09 20:31:30 +00:00
BINDIR := $(CURDIR)/bin
LDFLAGS := -w
# Rebuild the binary if any of these files change
SRC := $(shell find . -type f -name '*.go' -print) go.mod go.sum
.PHONY: all
all: build
.PHONY: build
build: build-cpusim
.PHONY: build-cpusim
build-cpusim: $(BINDIR)/cpusim
$(BINDIR)/cpusim: $(SRC)
go build -trimpath -o $@ ./cmd/cpusim
.PHONY: clean
clean:
@rm -rf '$(BINDIR)'