add simple REPL

This commit is contained in:
Martin Dørum
2020-10-12 23:13:20 +02:00
parent f298485924
commit cf49088b99
2 changed files with 57 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ LFLAGS = -lm
.PHONY = all clean
all: smoke smoke_pr bench example example2 example3
all: smoke smoke_pr repl bench example example2 example3
smoke: smoke.c tinyexpr.c
@@ -15,6 +15,9 @@ smoke_pr: smoke.c tinyexpr.c
$(CC) $(CCFLAGS) -DTE_POW_FROM_RIGHT -DTE_NAT_LOG -o $@ $^ $(LFLAGS)
./$@
repl: repl.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS) -lreadline
bench: benchmark.o tinyexpr.o
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
@@ -31,4 +34,4 @@ example3: example3.o tinyexpr.o
$(CC) -c $(CCFLAGS) $< -o $@
clean:
rm -f *.o *.exe example example2 example3 bench smoke_pr smoke
rm -f *.o *.exe example example2 example3 bench repl smoke_pr smoke