diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-03 23:53:08 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-03 23:53:08 +0100 |
commit | 198cb64ca257cf303d16e7271671ea9efbb2bcf2 (patch) | |
tree | dcf372264ff5fe62228f411fa9780a492cc00f50 /Makefile | |
parent | Bad (diff) | |
download | lowbat-gnu-198cb64ca257cf303d16e7271671ea9efbb2bcf2.tar.gz lowbat-gnu-198cb64ca257cf303d16e7271671ea9efbb2bcf2.tar.bz2 lowbat-gnu-198cb64ca257cf303d16e7271671ea9efbb2bcf2.tar.xz lowbat-gnu-198cb64ca257cf303d16e7271671ea9efbb2bcf2.tar.zst lowbat-gnu-198cb64ca257cf303d16e7271671ea9efbb2bcf2.zip |
Better Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -38,7 +38,7 @@ CFLAGS += -Wextra CFLAGS += -Werror CFLAGS += ${OPTIMIZE} #------------------------------------------------------------------------------# -NAME = ${TRGT_DIR}lowbat +NAME = lowbat #==============================================================================# #--------------------------------- UNIX ---------------------------------------# #==============================================================================# @@ -57,10 +57,11 @@ MANPREFIX = $(PREFIX)/share/man #==============================================================================# ${OBJS_DIR}%.o: ${SRCS_DIR}%.cpp ${INCS_DIR}${INCS} @${MKDIR} ${OBJS_DIR} - ${CC} ${CFLAGS} -I${INCS_DIR} -i${INCS} -c -o $@ $< + ${CC} ${CFLAGS} -I${INCS_DIR} -c -o $@ $< #------------------------------------------------------------------------------# ${NAME}: ${OBJS} - ${CC} ${CFLAGS} -o ${TARGET} ${OBJS} + @${MKDIR} ${TRGT_DIR} + ${CC} ${CFLAGS} -o ${TRGT_DIR}${NAME} ${OBJS} #------------------------------------------------------------------------------# all: @${MAKE} -j5 ${NAME} @@ -76,5 +77,13 @@ uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/lowbat rm -f $(DESTDIR)$(MANPREFIX)/man1/lowbat.1 #------------------------------------------------------------------------------# -.PHONY: all lowbat clean fclean install uninstall +clean: + ${RM} ${OBJS_DIR} +#------------------------------------------------------------------------------# +fclean: clean +#------------------------------------------------------------------------------# +re: fclean all +#------------------------------------------------------------------------------# + ${RM} ${TRGT_DIR} +.PHONY: all lowbat clean fclean re install uninstall #==================================== EOF =====================================# |