1 diff --git a/Makefile b/Makefile
2 index 8fca24ee38..33b59b5b96 100644
6 ## Comment these out to disable "linenoise"-library support
7 HISTFILE = .picocom_history
8 CPPFLAGS += -DHISTFILE=\"$(HISTFILE)\" \
10 -OBJS += linenoise-1.0/linenoise.o
11 -linenoise-1.0/linenoise.o : linenoise-1.0/linenoise.c linenoise-1.0/linenoise.h
13 + $(shell $(PKG_CONFIG) --cflags linenoise)
14 +LDFLAGS += $(shell $(PKG_CONFIG) --libs linenoise)
16 ## Comment this in to enable (force) custom baudrate support
17 ## even on systems not enabled by default.
18 diff --git a/picocom.c b/picocom.c
19 index 775ee9c3bb..ba2f9bd666 100644
26 -#include "linenoise-1.0/linenoise.h"
27 +#include <linenoise.h>