kwh-cost/Makefile

26 lines
511 B
Makefile
Raw Normal View History

TARGET=kwh-cost
2021-12-23 23:58:23 +04:00
CFLAGS=--std=c2x -O3 -Wall -Werror -Wextra -pedantic
SRC_DIR=src
OBJ_DIR=obj
DESTDIR=/
.PHONY: all ${TARGET} clean install uninstall
2021-12-23 23:58:23 +04:00
all: ${TARGET}
2021-12-23 23:58:23 +04:00
${TARGET}: ${SRC_DIR}/main.c ${SRC_DIR}/main.h
${CC} ${CFLAGS} ${LDFLAGS} $< -o $@
2021-12-23 23:58:23 +04:00
clean:
rm ${TARGET}
install:
2021-12-24 00:12:51 +04:00
install -Dm755 ${TARGET} ${DESTDIR}usr/bin/${TARGET}
install -Dm644 LICENSE ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE
2021-12-23 23:58:23 +04:00
uninstall:
rm -f ${DESTDIR}usr/bin/${TARGET}
rm -f ${DESTDIR}usr/share/licenses/${TARGET}/LICENSE