Skip to content

Commit

Permalink
Proper shell expansion in Makefile and overriding CFLAGS/LDLIBS for r…
Browse files Browse the repository at this point in the history
…equired arguments.
  • Loading branch information
MIvanchev committed Jan 2, 2024
1 parent e964aab commit 348f2a6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
DESTDIR ?=
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/man

# Optional, thus no override.

CFLAGS += -Wall -Wextra
CFLAGS += `pkg-config --cflags ncursesw`
LDLIBS += `pkg-config --libs ncursesw` -lm

# The following variables are overridden because the ncursesw flags are
# required for a successful build.

override CFLAGS += $(shell pkg-config --cflags ncursesw)
override LDLIBS += $(shell pkg-config --libs ncursesw) -lm

all: ttyplot stresstest

Expand Down

0 comments on commit 348f2a6

Please sign in to comment.