diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-03 23:43:43 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-03 23:43:43 +0100 |
commit | 9bf65e2721a86ba8336e0ca256f7cd3556b717f6 (patch) | |
tree | 9f93a8f23d9789daa4e4c8ee7b34b112e100b2fa /Makefile | |
parent | .gitignore update (diff) | |
download | lowbat-gnu-9bf65e2721a86ba8336e0ca256f7cd3556b717f6.tar.gz lowbat-gnu-9bf65e2721a86ba8336e0ca256f7cd3556b717f6.tar.bz2 lowbat-gnu-9bf65e2721a86ba8336e0ca256f7cd3556b717f6.tar.xz lowbat-gnu-9bf65e2721a86ba8336e0ca256f7cd3556b717f6.tar.zst lowbat-gnu-9bf65e2721a86ba8336e0ca256f7cd3556b717f6.zip |
Fine Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -1,6 +1,4 @@ -#==============================================================================# -#-------------------------------- Makefile ------------------------------------# -#==============================================================================# +#================================ Makefile ====================================# .POSIX: default: all @@ -22,7 +20,7 @@ SRCS = ${SRCS_DIR}main.cpp SRCS += ${SRCS_DIR}jo_exec.cpp SRCS += ${SRCS_DIR}jo_notify.cpp #------------------------------------------------------------------------------# -INCS = ${INCS_DIR}jo_lowbat.hpp +INCS = jo_lowbat.hpp #------------------------------------------------------------------------------# OBJS = $(patsubst ${SRCS_DIR}%.cpp,${OBJS_DIR}%.o,${SRCS}) #==============================================================================# @@ -54,24 +52,29 @@ else PREFIX = /usr endif MANPREFIX = $(PREFIX)/share/man - -${OBJS_DIR}%.o: ${SRCS_DIR}%.cpp ${INCS_DIR}${INCS} +#==============================================================================# +#--------------------------------- Rules --------------------------------------# +#==============================================================================# +${OBJS_DIR}%.o: ${SRCS_DIR}%.cpp ${INCS_DIR}${INCS} @${MKDIR} ${OBJS_DIR} - -${NAME}: ${OBJS} + ${CC} ${CFLAGS} -I${INCS_DIR} -i${INCS} -c -o $@ $< +#------------------------------------------------------------------------------# +${NAME}: ${OBJS} ${CC} ${CFLAGS} -o ${TARGET} ${OBJS} - +#------------------------------------------------------------------------------# all: @${MAKE} -j5 ${NAME} -install: all +#------------------------------------------------------------------------------# +install: all mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f bin/lowbat $(DESTDIR)$(PREFIX)/bin/ chmod 755 $(DESTDIR)$(PREFIX)/bin/lowbat mkdir -p $(DESTDIR)$(MANPREFIX)/man1 cp -f man/lowbat.1 $(DESTDIR)$(MANPREFIX)/man1/lowbat.1 - +#------------------------------------------------------------------------------# uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/lowbat rm -f $(DESTDIR)$(MANPREFIX)/man1/lowbat.1 - -.PHONY: install uninstall +#------------------------------------------------------------------------------# +.PHONY: all lowbat clean fclean install uninstall +#==================================== EOF =====================================# |