blob: 455c18010bfc2b7cbcd21f7c22f390250c4c0396 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff --git a/Makefile b/Makefile
index 8fca24ee38..33b59b5b96 100644
--- a/Makefile
+++ b/Makefile
@@ -39,9 +39,9 @@
## Comment these out to disable "linenoise"-library support
HISTFILE = .picocom_history
CPPFLAGS += -DHISTFILE=\"$(HISTFILE)\" \
- -DLINENOISE
-OBJS += linenoise-1.0/linenoise.o
-linenoise-1.0/linenoise.o : linenoise-1.0/linenoise.c linenoise-1.0/linenoise.h
+ -DLINENOISE \
+ $(shell $(PKG_CONFIG) --cflags linenoise)
+LDFLAGS += $(shell $(PKG_CONFIG) --libs linenoise)
## Comment this in to enable (force) custom baudrate support
## even on systems not enabled by default.
diff --git a/picocom.c b/picocom.c
index 775ee9c3bb..ba2f9bd666 100644
--- a/picocom.c
+++ b/picocom.c
@@ -48,7 +48,7 @@
#include "split.h"
#include "term.h"
#ifdef LINENOISE
-#include "linenoise-1.0/linenoise.h"
+#include <linenoise.h>
#endif
#include "custbaud.h"
|