aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 986ecdc95189921605aa64388f071c92218c14da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
PREFIX=/usr/local
CFLAGS=-Wall -Wextra -pedantic -Wmissing-prototypes -Wstrict-prototypes
LDFLAGS=
G ?=
O ?= -O3

CFILES=compiler.c grammar.c utils.c vm.c
OBJFILES=$(CFILES:.c=.o)

all: bpeg

.c.o:
	cc -c $(CFLAGS) $(G) $(O) -o $@ $<

bpeg: $(OBJFILES) bpeg.c
	cc $(CFLAGS) $(G) $(O) -o $@ $^

clean:
	rm -f bpeg $(OBJFILES)

.PHONY: all clean