From bc7ac26be58fec8b4d71dd193a0643d214cef27a Mon Sep 17 00:00:00 2001 From: carla-v Date: Thu, 20 Dec 2012 11:59:24 -0500 Subject: [PATCH] Makefile: Fix compiler flags * Reorder LDFLAGS to be passed after -o * Get compiler/linker options from the system with ncurses5-config --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0eac46d..6587ec5 100644 --- a/Makefile +++ b/Makefile @@ -8,15 +8,15 @@ BIN = tty-clock PREFIX ?= /usr/local INSTALLPATH = ${DESTDIR}${PREFIX}/bin MANPATH = ${DESTDIR}${PREFIX}/share/man/man1 -CFLAGS = -Wall -g -LDFLAGS = -lncurses +CFLAGS = -Wall -g -I $$(ncurses5-config --includedir) +LDFLAGS = -L $$(ncurses5-config --libdir) $$(ncurses5-config --libs) tty-clock : ${SRC} @echo "build ${SRC}" @echo "CC ${CFLAGS} ${LDFLAGS} ${SRC}" - @${CC} ${CFLAGS} ${LDFLAGS} ${SRC} -o ${BIN} + @${CC} ${CFLAGS} ${SRC} -o ${BIN} ${LDFLAGS} install : ${BIN}