tenox7 / ttyplot

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

Makefile: Dehardcode compiler and cflags #16

Closed Johnnynator closed 5 years ago

Johnnynator commented 5 years ago

It is generally nicer to not hard code the compiler and cflags so that the Makefile works in more use cases e.g. cross compiling, systems that have clang installed and so on. Note $(CC) defaults to gcc if it is unset.

tenox7 commented 5 years ago

Shouldn't -lcurses go to LDFLAGS?

Johnnynator commented 5 years ago

@tenox7 LDFLAGS and CFLAGS should be used in a way that they can be overwritten from the outside without being able to break, so they should only contain optional flags. -lcurses is mandatory, sometimes libraries do get put into a variable called LIBS.