2023-03-06 19:33:37 +01:00
|
|
|
CFLAGS += -Wall -W -Os -g
|
|
|
|
CC ?= gcc
|
2017-05-12 00:28:14 +02:00
|
|
|
|
2023-03-06 19:33:37 +01:00
|
|
|
all: linenoise_example linenoise_utf8_example
|
2017-05-12 00:28:14 +02:00
|
|
|
|
2023-03-06 19:33:37 +01:00
|
|
|
linenoise_example: linenoise.h linenoise-ship.c linenoise-win32.c example.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ linenoise-ship.c example.c
|
2017-05-12 00:28:14 +02:00
|
|
|
|
2023-03-06 19:33:37 +01:00
|
|
|
linenoise_utf8_example: linenoise.h linenoise-ship.c linenoise-win32.c
|
|
|
|
$(CC) $(CFLAGS) -DUSE_UTF8 -o $@ linenoise-ship.c example.c
|
2017-05-12 00:28:14 +02:00
|
|
|
|
|
|
|
clean:
|
2023-03-06 19:33:37 +01:00
|
|
|
rm -f linenoise_example linenoise_utf8_example linenoise-ship.c *.o
|
|
|
|
|
|
|
|
ship: linenoise-ship.c
|
|
|
|
|
|
|
|
# linenoise-ship.c simplifies delivery of linenoise support
|
|
|
|
# simple copy linenoise-ship.c to linenoise.c in your application, and also linenoise.h
|
|
|
|
# - If you want win32 support, also copy linenoise-win32.c
|
|
|
|
# - If you never want to support utf-8, you can omit utf8.h and utf8.c
|
|
|
|
|
|
|
|
linenoise-ship.c: utf8.h utf8.c stringbuf.h stringbuf.c linenoise.c
|
|
|
|
cat $^ >$@
|