tenox7 / ttyplot

a realtime plotting utility for terminal/console with data input from stdin
Apache License 2.0
961 stars 43 forks source link

Makefile: Use pkg-config for systems where ncurses is not libcurses.so (fixes #66) #67

Closed hartwork closed 1 year ago

hartwork commented 1 year ago

Fixes #66

I'm happy to adjust and discuss.

tenox7 commented 1 year ago

Running make on macOS returns:

/bin/sh: pkg-config: command not found
hartwork commented 1 year ago

@tenox7 two thoughts on that:

hartwork commented 1 year ago

@tenox7 updated now to demo the fallback approach.

tenox7 commented 1 year ago

that looks better, let me test it a bit :)

hartwork commented 1 year ago

@tenox7 any news?

tenox7 commented 1 year ago

BTW the variable expansion is done when CC command is invoked

$ make
cc -O2 -pipe -Wall -Wextra  ttyplot.c `pkg-config --libs ncurses 2>/dev/null || echo '-lcurses -ltinfo'` -o ttyplot
hartwork commented 1 year ago

@tenox7 yes, is that a problem? I'm not sure about the message here.

tenox7 commented 1 year ago

I guess it's not a problem on modern systems.