Update clean rule in makefile to clean all targets
authorNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 16 Feb 2019 09:41:26 +0000 (10:41 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 16 Feb 2019 09:41:26 +0000 (10:41 +0100)
Makefile

index c4888af..f53e5da 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,8 @@ CC = $(CROSS_COMPILE)gcc
 
 CFLAGS += -Wall -Wextra -O2
 
-all: lpcisp lpcprog lpc_binary_check
+ALL_TARGETS = lpcisp lpcprog lpc_binary_check
+all: $(ALL_TARGETS)
 
 
 OBJDIR = objs
@@ -49,5 +50,4 @@ ${OBJDIR}/%.o: %.c
 clean:
        rm -f ${OBJDIR}/*
 mrproper: clean
-       rm -f lpcisp
-       rm -f lpcprog
+       rm -f $(ALL_TARGETS)