diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2022-04-04 04:00:33 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2022-04-04 04:03:50 +0530 |
commit | 24b564abd1593eb94295cfd4f632043476107450 (patch) | |
tree | e0f338c2ecc7103cbf805049d52c5f539f36f991 | |
parent | cc64d9ea6b48a7bae1778b5888d14cefb1c0c2ce (diff) |
Support BSD Editline
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | README.md | 6 |
2 files changed, 13 insertions, 3 deletions
@@ -8,9 +8,17 @@ CFLAGS_OPTIMIZATION ?= -O3 CFLAGS_WARNINGS ?= -Wall -Wextra -Wno-unused-parameter -Werror LDLIBS_READLINE ?= -lreadline +LDLIBS_EDITLINE ?= -ledit CFLAGS += $(CFLAGS_OPTIMIZATION) $(CFLAGS_WARNINGS) -LDLIBS += $(LDLIBS_READLINE) + +O_EL := 0 # set to use the BSD editline library + +ifeq ($(strip $(O_EL)),1) + LDLIBS += $(LDLIBS_EDITLINE) +else + LDLIBS += $(LDLIBS_READLINE) +endif SRC = $(wildcard src/*.c) INCLUDE = -Iinc @@ -53,7 +53,7 @@ It has a [`bc`](https://www.gnu.org/software/bc/manual/html_mono/bc.html) mode f #### Dependencies -`bcal` is written in C and depends on standard libc and libreadline. It invokes GNU `bc` or `calc` for non-storage expressions. +`bcal` is written in C and depends on standard libc and GNU Readline (or [BSD Editline](https://www.thrysoee.dk/editline/)). It invokes GNU `bc` or `calc` for non-storage expressions. To use `calc`: @@ -76,8 +76,10 @@ If you have git installed, clone this repository. Otherwise, download the [lates Install to default location (`/usr/local`): - $ make $ sudo make strip install +To link to libedit: + + $ sudo make O_EL=1 strip install To uninstall, run: $ sudo make uninstall |