aboutsummaryrefslogtreecommitdiff
path: root/example/Makefile
blob: 66c96a02eaa086cf27fdfc59f4bf84030d9b04c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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: rules.py
	cd .. && ./bcgen example/rules.py
	touch ../bcode.c # just to get make to wake up

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