Skip to content

Commit 7e5358c

Browse files
committed
add repl-readline target
1 parent 74e451e commit 7e5358c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ smoke_pr: smoke.c tinyexpr.c
1616
./$@
1717

1818
repl: repl.o tinyexpr.o
19+
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
20+
21+
repl-readline: repl-readline.o tinyexpr.o
1922
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS) -lreadline
2023

2124
bench: benchmark.o tinyexpr.o
@@ -30,6 +33,9 @@ example2: example2.o tinyexpr.o
3033
example3: example3.o tinyexpr.o
3134
$(CC) $(CCFLAGS) -o $@ $^ $(LFLAGS)
3235

36+
repl-readline.o: repl.c
37+
$(CC) -c -DUSE_READLINE $(CCFLAGS) $< -o $@
38+
3339
.c.o:
3440
$(CC) -c $(CCFLAGS) $< -o $@
3541

0 commit comments

Comments
 (0)