-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.mk
69 lines (45 loc) · 1.46 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
ifndef SETTINGS_MK
SETTINGS_MK := 1
# ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::TARGET::
NAME = executablename
ifeq ($(MAKECMDGOALS), bonus)
NAME = executablename_bonus
endif
UNAME = $(shell uname)
# ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::SOURCE::
# You can add more subfolders using the same pattern.
# $S is the path to the source folder. Do not forget to add a '\'
# at the end of each line, but not the last one.
SRC = $(addprefix $Ssubfolder, \
nameofyourfile.c \
nameofyourfile1.c) \
$(addprefix $Sothersubfoler, \
nameofyourfile.c \
nameofyourfile1.c)
ifeq ($(MAKECMDGOALS), bonus)
SRC = $(addprefix $Ssubfolder_bonus, \
nameofyourfile_bonus.c \
nameofyourfile1_bonus.c) \
$(addprefix $Sothersubfoler_bonus, \
nameofyourfile_bonus.c \
nameofyourfile1_bonus.c)
endif
# :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::COMPILERS::
CC = gcc
ifeq ($(UNAME), Darwin)
CC = clang
endif
CFLAGS = -Wall -Wextra -Werror
AR = ar
ARFLAGS = rcs
# :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::LIBRARY::
# If you are using a library, set IS_LIB to true.
IS_LIB = false
LIB = $Llibft.a
# :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::FT_PRINTF::
IS_PTF = false
PTF = $Plibftprintf.a
# ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::MINILIBX::
IS_MLX = false
MLX = $Mlibmlx_$(UNAME).a
endif