aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 2d563eda65bbc8e177142a5ddd7f375cfca2adcc (plain)
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
GOFILES := $(wildcard *.go)
YYFILES := $(wildcard *.y)
AUTOGEN := $(YYFILES:.y=.go)
GO := go

build: $(GOFILES) $(AUTOGEN)
	$(GO) $@

run: $(GOFILES) $(AUTOGEN)
	$(GO) $@ $^

generate:
	$(GO) $@

clean:
	$(GO) $@
	$(RM) $(AUTOGEN) y.output

install: build
	$(GO) $@

%.go: %.y
	$(GO) tool yacc -o $@ $<

.PHONY: clean