Makefile cleanup
This commit is contained in:
parent
c52d665691
commit
ad66be3697
9
Makefile
9
Makefile
|
@ -17,6 +17,7 @@ SRCDIR = srcs
|
|||
INCDIR = includes
|
||||
|
||||
CC = cc
|
||||
LDFLAGS =
|
||||
CFLAGS = \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
|
@ -24,8 +25,6 @@ CFLAGS = \
|
|||
-I$(INCDIR) \
|
||||
-fcolor-diagnostics \
|
||||
|
||||
LDFLAGS =
|
||||
|
||||
_OBJ = $(SRC:.c=.o)
|
||||
OBJ = $(addprefix $(OBJDIR)/,$(_OBJ))
|
||||
DEPS = $(addprefix $(INCDIR)/,$(HEADERS))
|
||||
|
@ -37,7 +36,7 @@ RMDIR = /bin/rmdir
|
|||
|
||||
NAME ?= bsq
|
||||
|
||||
.PHONY: re fclean clean all
|
||||
.PHONY: re fclean clean all test tests run valgrind
|
||||
|
||||
all: $(NAME)
|
||||
|
||||
|
@ -62,7 +61,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c $(DEPS)
|
|||
$(OBJDIR):
|
||||
@mkdir -p $@
|
||||
|
||||
tests: test
|
||||
tests: test valgrind
|
||||
|
||||
test: re run fclean
|
||||
|
||||
|
@ -74,7 +73,7 @@ SUCCESS = && $(SUCCESS_MSG) || $(FAIL_MSG)
|
|||
SUCCESS_VALG = && $(SUCCESS_MSG_VALG) || $(FAIL_MSG_VALG)
|
||||
FAIL = && $(FAIL_MSG) || $(SUCCESS_MSG)
|
||||
VALGRIND = valgrind --leak-check=full --error-exitcode=1
|
||||
VALGRIND_SMALL = 2>/dev/null 1>&2 valgrind --leak-check=full --error-exitcode=1
|
||||
VALGRIND_SMALL = 2>/dev/null 1>&2 valgrind --error-exitcode=1
|
||||
YLW = : [33m;
|
||||
CYN = : [36m;
|
||||
CLR_RST = && : [m
|
||||
|
|
Loading…
Reference in New Issue