fix Makefile

This commit is contained in:
ulic-youthlic 2025-03-26 10:38:10 +08:00
parent 29b5b6c1f3
commit 8973390b2a
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
2 changed files with 70 additions and 57 deletions

View file

@ -1,6 +1,6 @@
CC = zig cc -O2
CC = gcc
all: parser.tab.o lex.yy.o node.o main.o
program: parser.tab.o lex.yy.o node.o main.o
$(CC) ./parser.tab.o ./lex.yy.o ./node.o ./main.o -o program -lfl
main.o: main.c
@ -21,6 +21,19 @@ lex.yy.o: lex.yy.c
lex.yy.c: ./scanner.l
flex scanner.l
.PHONY: clean
.PHONY: clean test
clean:
rm parser.tab.c parser.tab.h parser.tab.o lex.yy.o lex.yy.c program main.o node.o
test: program
@echo Test test1:
./program test1
@read
@echo Test test2:
./program test2
@read
@echo Test test3:
./program test3
@read
@echo Test test4:
./program test4