You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
920 B
39 lines
920 B
#TTY-Clock MakeFile |
|
#Under BSD License |
|
#See clock.c for the license detail. |
|
|
|
SRC = ttyclock.c |
|
CC ?= gcc |
|
BIN = tty-clock |
|
INSTALLPATH = /usr/local/bin/ |
|
CFLAGS ?= -O2 -g |
|
CFLAGS += -Wall $(shell pkg-config --cflags ncurses 2>/dev/null) |
|
LIBS = $(shell pkg-config --libs ncurses 2>/dev/null | echo -lncurses) |
|
|
|
|
|
tty-clock : ${SRC} |
|
|
|
@echo "build ${SRC}" |
|
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} ${SRC} -o ${BIN} ${LIBS} |
|
|
|
install : ${BIN} |
|
|
|
@echo "creating target folder in ${DESTDIR}${INSTALLPATH}" |
|
@mkdir -p "${DESTDIR}${INSTALLPATH}" |
|
@echo "installing binary file to ${DESTDIR}${INSTALLPATH}${BIN}" |
|
@cp ${BIN} "${DESTDIR}${INSTALLPATH}" |
|
@chmod 755 "${DESTDIR}${INSTALLPATH}${BIN}" |
|
@echo "installed" |
|
|
|
uninstall : |
|
|
|
@echo "uninstalling binary file (${DESTDIR}${INSTALLPATH}${BIN})" |
|
@rm -f "${DESTDIR}${INSTALLPATH}${BIN}" |
|
@echo "${BIN} uninstalled" |
|
|
|
clean : |
|
|
|
@echo "cleaning ${BIN}" |
|
@rm ${BIN} |
|
@echo "${BIN} cleaned" |
|
|
|
|