aboutsummaryrefslogtreecommitdiff
path: root/example/Makefile
blob: 0bce1eca1b9a32828924a0dd84872410902980de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CFLAGS = -Wall -Wextra -g -O2

all: exec

exec: bcode.o main.o
	$(CC) $(CFLAGS) $^ -o $@

bcode.o: ../bcode.c
	$(CC) $(CFLAGS) -c $^ -o $@

../bcode.c: ../gen/select.h
../gen/select.h: rules.py
	cd .. && ./bcgen example/rules.py
	touch ../bcode.c # just to get make to wake up

.PHONY: clean
clean:
	rm -rf *.o exec