From 1aeed2fdde697479f9e819f078bb06cfa7386dc9 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 29 Dec 2019 12:36:03 +0100 Subject: Makefile rework in progress --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8af806e..420183b 100644 --- a/Makefile +++ b/Makefile @@ -9,9 +9,11 @@ INCS_DIR = inc/ OBJS_DIR = obj/ TRGT_DIR = bin/ -SRCS = ${SRCS_DIR}main.cpp -SRCS += ${SRCS_DIR}jo_exec.cpp -SRCS += ${SRCS_DIR}jo_notify.cpp +SRCS_NAME = main.cpp +SRCS_NAME += jo_exec.cpp +SRCS_NAME += jo_notify.cpp + +SRCS = $(addprefix ${SRCS_DIR}, ${SRCS_NAME}) INCS = jo_lowbat.hpp @@ -29,7 +31,9 @@ OPTIMIZE += -pipe CXXFLAGS = -Wall CXXFLAGS += -Wextra CXXFLAGS += -Werror -CXXFLAGS += ${OPTIMIZE} +#CXXFLAGS += ${OPTIMIZE} +CXXFLAGS += ${DEBUG} +CXXFLAGS += ${FSANITIZE} NAME = lowbat @@ -46,11 +50,11 @@ MANPREFIX = $(PREFIX)/share/man ${OBJS_DIR}%.o: ${SRCS_DIR}%.cpp ${INCS_DIR}${INCS} - @${MKDIR} ${OBJS_DIR} + ${MKDIR} ${OBJS_DIR} ${CXX} ${CXXFLAGS} -I${INCS_DIR} -c -o $@ $< ${NAME}: ${OBJS} - @${MKDIR} ${TRGT_DIR} + ${MKDIR} ${TRGT_DIR} ${CXX} ${CXXFLAGS} -o ${TRGT_DIR}${NAME} ${OBJS} all: ${NAME} -- cgit v1.2.3