kwh-cost/Makefile

25 lines
415 B
Makefile
Raw Normal View History

2021-12-23 23:58:23 +04:00
TARGET=kwh-calc
CFLAGS=--std=c2x -O3 -Wall -Werror -Wextra -pedantic
SRC_DIR=src
OBJ_DIR=obj
all: ${TARGET}
${TARGET}: ${OBJ_DIR}/main.o
${CC} ${CFLAGS} $< -o $@
${OBJ_DIR}/main.o: ${SRC_DIR}/main.c ${SRC_DIR}/main.h
@mkdir -p ${OBJ_DIR}
${CC} ${CFLAGS} -c $< -o $@
clean:
rm -r ${OBJ_DIR}
rm ${TARGET}
install:
2021-12-24 00:12:51 +04:00
install -Dm755 ${TARGET} ${DESTDIR}usr/bin/${TARGET}
2021-12-23 23:58:23 +04:00
uninstall:
2021-12-24 00:06:54 +04:00
rm -f /usr/bin/${TARGET}