Cleaned up a bit the Makefiles
This commit is contained in:
parent
11ec5cfa3c
commit
6a504cab3e
2 changed files with 16 additions and 9 deletions
21
Makefile
21
Makefile
|
|
@ -6,12 +6,13 @@
|
||||||
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
# By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
# Created: 2023/11/12 11:05:05 by rparodi #+# #+# #
|
||||||
# Updated: 2024/08/12 17:00:12 by maiboyer ### ########.fr #
|
# Updated: 2024/08/12 17:05:19 by maiboyer ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
# Objdir
|
# Objdir
|
||||||
BUILD_DIR = $(shell realpath ./build)
|
BUILD_DIR = $(shell realpath ./build)
|
||||||
|
BASE_PATH = $(shell pwd)
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
GREEN = \033[32m
|
GREEN = \033[32m
|
||||||
|
|
@ -43,7 +44,7 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# TODO: ADD THIS WHEN FINISHING THIS:
|
# TODO: ADD THIS WHEN FINISHING THIS:
|
||||||
CFLAGS_ADDITIONAL += -DNVALGRIND
|
# CFLAGS_ADDITIONAL += -DNVALGRIND
|
||||||
CFLAGS_ADDITIONAL += -O0 -Wno-cpp
|
CFLAGS_ADDITIONAL += -O0 -Wno-cpp
|
||||||
|
|
||||||
# TODO: REMOVE THIS WHEN FINISHING THIS:
|
# TODO: REMOVE THIS WHEN FINISHING THIS:
|
||||||
|
|
@ -52,19 +53,23 @@ CFLAGS_ADDITIONAL += '-DERROR=((void)printf("ERROR HERE: " __FILE__ ":%d in %s\n
|
||||||
#CFLAGS_ADDITIONAL += -O2
|
#CFLAGS_ADDITIONAL += -O2
|
||||||
#CFLAGS_ADDITIONAL += -fuse-ld=gold -Wl,--print-symbol-counts -Wl,/tmp/symbols.count.log
|
#CFLAGS_ADDITIONAL += -fuse-ld=gold -Wl,--print-symbol-counts -Wl,/tmp/symbols.count.log
|
||||||
|
|
||||||
|
|
||||||
export CFLAGS_ADDITIONAL
|
export CFLAGS_ADDITIONAL
|
||||||
export CC
|
export CC
|
||||||
|
export BASE_PATH
|
||||||
|
export BUILD_DIR
|
||||||
|
|
||||||
|
|
||||||
# All (make all)
|
# All (make all)
|
||||||
all:
|
all:
|
||||||
@$(MAKE) --no-print-directory header "BUILD_DIR=$(BUILD_DIR)" "BASE_PATH=$(shell pwd)"
|
@$(MAKE) --no-print-directory header
|
||||||
@$(MAKE) --no-print-directory -f ./Minishell.mk "BUILD_DIR=$(BUILD_DIR)" "BASE_PATH=$(shell pwd)" $(PMAKE)
|
@$(MAKE) --no-print-directory -f ./Minishell.mk $(PMAKE)
|
||||||
@$(MAKE) --no-print-directory footer "BUILD_DIR=$(BUILD_DIR)" "BASE_PATH=$(shell pwd)"
|
@$(MAKE) --no-print-directory footer
|
||||||
|
|
||||||
bonus:
|
bonus:
|
||||||
@$(MAKE) --no-print-directory header "BUILD_DIR=$(BUILD_DIR)" "BASE_PATH=$(shell pwd)"
|
@$(MAKE) --no-print-directory header
|
||||||
@$(MAKE) --no-print-directory -f ./Minishell.mk "BUILD_DIR=$(BUILD_DIR)" "BASE_PATH=$(shell pwd)" $(PMAKE) bonus
|
@$(MAKE) --no-print-directory -f ./Minishell.mk $(PMAKE) bonus
|
||||||
@$(MAKE) --no-print-directory footer "BUILD_DIR=$(BUILD_DIR)" "BASE_PATH=$(shell pwd)"
|
@$(MAKE) --no-print-directory footer
|
||||||
|
|
||||||
# Header
|
# Header
|
||||||
header:
|
header:
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
# By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ #
|
# By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/04/28 17:28:30 by maiboyer #+# #+# #
|
# Created: 2024/04/28 17:28:30 by maiboyer #+# #+# #
|
||||||
# Updated: 2024/08/02 18:58:21 by maiboyer ### ########.fr #
|
# Updated: 2024/08/12 17:05:33 by maiboyer ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
|
|
@ -20,6 +20,8 @@ BUILD_DIR ?= $(shell realpath ./build/)
|
||||||
|
|
||||||
export CFLAGS_ADDITIONAL
|
export CFLAGS_ADDITIONAL
|
||||||
export CC
|
export CC
|
||||||
|
export BASE_PATH
|
||||||
|
export BUILD_DIR
|
||||||
|
|
||||||
# Flags
|
# Flags
|
||||||
CFLAGS = -Werror -Wextra -Wall -Wno-unused-command-line-argument -MMD -I./includes -I./output/include -I./stdme/output/include -rdynamic -Wl,-E
|
CFLAGS = -Werror -Wextra -Wall -Wno-unused-command-line-argument -MMD -I./includes -I./output/include -I./stdme/output/include -rdynamic -Wl,-E
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue