From e33844407ba09d57824e1a46d4bb03ec256eb279 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 29 Dec 2019 12:27:38 +0100 Subject: Makefile update --- Makefile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 406346e..8af806e 100644 --- a/Makefile +++ b/Makefile @@ -17,17 +17,19 @@ INCS = jo_lowbat.hpp OBJS = $(patsubst ${SRCS_DIR}%.cpp,${OBJS_DIR}%.o,${SRCS}) -CC = g++ - -DEBUG = -g3 +DEBUG += Og -ggdb +DEBUG = -ggdb FSANITIZE = -fsanitize=address -OPTIMIZE = -O3 +CXX = g++ + +OPTIMIZE = -O2 +OPTIMIZE += -pipe -CFLAGS = -Wall -CFLAGS += -Wextra -CFLAGS += -Werror -CFLAGS += ${OPTIMIZE} +CXXFLAGS = -Wall +CXXFLAGS += -Wextra +CXXFLAGS += -Werror +CXXFLAGS += ${OPTIMIZE} NAME = lowbat @@ -45,11 +47,11 @@ MANPREFIX = $(PREFIX)/share/man ${OBJS_DIR}%.o: ${SRCS_DIR}%.cpp ${INCS_DIR}${INCS} @${MKDIR} ${OBJS_DIR} - ${CC} ${CFLAGS} -I${INCS_DIR} -c -o $@ $< + ${CXX} ${CXXFLAGS} -I${INCS_DIR} -c -o $@ $< ${NAME}: ${OBJS} @${MKDIR} ${TRGT_DIR} - ${CC} ${CFLAGS} -o ${TRGT_DIR}${NAME} ${OBJS} + ${CXX} ${CXXFLAGS} -o ${TRGT_DIR}${NAME} ${OBJS} all: ${NAME} -- cgit v1.2.3