From 8b8b8b8a35524f0ee73ac74c947a325ea54b2880 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 9 Jun 2020 10:59:25 +0200 Subject: Added make with multiple jobs --- .gitignore | 1 + Makefile | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 07a12bb..6d5b87d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ obj/* rendu.makefile doc/* tmp/* +*.gz diff --git a/Makefile b/Makefile index 7886427..f1554b1 100644 --- a/Makefile +++ b/Makefile @@ -45,14 +45,15 @@ OBJ = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) INCLUDE = $(shell find $(INCLUDE_DIR) -name "*.h") -# export LIBFT_SRC = $(SRC) +all: prebuild + @$(MAKE) -j$(JOBS) allnopre -all: prebuild $(NAME) +allnopre: $(NAME) .PHONY: test test: all @echo "Testing" - @$(MAKE) $(MAKE_ARGS) -C $(TEST_DIR) run + @$(MAKE) -C $(TEST_DIR) run norm: @if [ `command -v $(NORM)` ]; \ @@ -72,7 +73,7 @@ $(NAME): $(OBJ) $(INCLUDE) @echo "Linking: $@" @$(LIB) $@ $(OBJ) -$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c +$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c $(INCLUDE) @echo "Compiling: $@" @$(CC) $(CCFLAGS) -c -o $@ $< @@ -81,7 +82,7 @@ clean: @$(RM) -r $(OBJ_DIR) fclean: clean - @echo "Removing library" + @echo "Removing $(NAME)" @$(RM) $(NAME) re: fclean all -- cgit