From be97847d627e55d82b58f4b1145b2ac8ea68eeaa Mon Sep 17 00:00:00 2001 From: Axel CHEMIN Date: Sun, 8 Nov 2020 19:20:03 +0100 Subject: [PATCH] Amélioration Makefile --- Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5324999..7603c54 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,52 @@ +BIN = bin +OBJ = obj +SRC = src +INCLUDE = include +CFLAGS = +CLIBS = -lusb-1.0 +GNUMAKEFLAGS = --no-print-directory +VERBOSE_THRESHOLD?=3 -all : src/GetUsbInfos.c - gcc -Wall src/GetUsbInfos.c -lusb-1.0 +RELEASE?=0 +ifeq ($(RELEASE), 1) + CFLAGS = -W -Wall + VERBOSE_THRESHOLD = 0 +else + CFLAGS = -W -Wall -g -O0 +endif +all : main demostep + + + +main : + echo "Here compile the main program" + +demostep : STEP4.1 + + + +STEP4.1 : ${SRC}/GetUsbInfos.c bin + gcc -o ${BIN}/STEP4.1.out ${SRC}/GetUsbInfos.c ${CLIBS} ${CFLAGS} + + + + +obj : + @-mkdir ${OBJ} + +bin : + @-mkdir ${BIN} + +clean : + rm -rf obj/*.o + +mrproper: clean + rm -rf bin + rm -rf obj + -- libgit2 0.21.2