Makefile: Fix compiler flags

* Reorder LDFLAGS to be passed after -o

* Get compiler/linker options from the system with ncurses5-config
reverse-branch
carla-v 13 years ago
parent 76e29ba579
commit bc7ac26be5
  1. 6
      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}

Loading…
Cancel
Save