-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.mk
50 lines (41 loc) · 1.51 KB
/
settings.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# **************************************************************************** #
# #
# :::::::: #
# settings.mk :+: :+: #
# +:+ #
# By: mraasvel <[email protected]> +#+ #
# +#+ #
# Created: 2021/04/13 22:09:02 by mraasvel #+# #+# #
# Updated: 2021/04/14 16:46:10 by mraasvel ######## odam.nl #
# #
# **************************************************************************** #
ifndef SETTINGS_MK
SETTINGS_MK = 1
# Executable
NAME := minishell
# Directories
SDIR := src
ODIR := obj/
DDIR := dep/
IDIR := includes
LDIR := libs
LFTDIR := $(LDIR)/libft
# Files
SRC := $(shell find $(SDIR) -name "*.c" -type f)
OBJ := $(patsubst $(SDIR)/%.c,$(ODIR)%.o,$(SRC))
DEP := $(patsubst $(SDIR)/%.c,$(DDIR)%.d,$(SRC))
# Compilation
CC = gcc
CFLAGS = -Wall -Wextra -Werror
LFLAGS := -ltermcap -L$(LFTDIR) -lft
IFLAGS := -I$(IDIR) -I$(LFTDIR)
ifeq ($(shell uname -s),Linux)
DFLAGS := -O0 -g -fsanitize=address -fsanitize=leak
else
DFLAGS := -O0 -g -fsanitize=address
endif
# Debug Flags
CFLAGS += $(DFLAGS)
# Commands
RM = rm -f
endif