forked from antirez/linenoise
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
23 lines (16 loc) · 852 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CFLAGS += -Wall -W -Os -g
CC ?= gcc
all: linenoise_example linenoise_utf8_example
linenoise_example: linenoise.h linenoise-ship.c linenoise-win32.c example.c
$(CC) $(CFLAGS) -o $@ linenoise-ship.c example.c
linenoise_utf8_example: linenoise.h linenoise-ship.c linenoise-win32.c
$(CC) $(CFLAGS) -DUSE_UTF8 -o $@ linenoise-ship.c example.c
clean:
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
for i in $^; do echo "#line 1 \"$$i\""; cat $$i; done >$@