mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
8384223ac8
This removes the need to force it to build as C++, and adds proper UTF-8 support for Windows. Since this is a fork of linenoise, there's no hope for getting lua-linenoise to sync with it upstream. I made the bare minimum changes to keep it working, but didn't add bindings for new functionality (e.g. multi-line editing).
23 lines
805 B
Makefile
23 lines
805 B
Makefile
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
|
|
cat $^ >$@
|