fixed some rules + Makefile

This commit is contained in:
2024-03-27 19:37:17 +01:00
parent dff4dfd0e3
commit 8f722d7896
4 changed files with 74 additions and 20 deletions

22
src/Makefile Normal file
View File

@ -0,0 +1,22 @@
LDFLAGS="-L/usr/local/opt/flex/lib"
machine.py: ram
./ram < test.1
cat machine.py
ram: ram.yy.c ram.tab.c
gcc -o $@ $^ -ly -lfl
ram.tab.c: ram.y
bison -d --report=all $^
ram.yy.c: ram.l
flex -o $@ $^
clean:
rm -f machine.py
rm -f ram
rm -f *.o
rm -f *.output
rm -f *.tab.c *.tab.h
rm -f *.yy.c