This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config.mk
63 lines (52 loc) · 1.75 KB
/
Config.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
#* ************************************************************************** *#
#* *#
#* ::: :::::::: *#
#* Config.mk :+: :+: :+: *#
#* +:+ +:+ +:+ *#
#* By: mgautier <mgautier@student.42.fr> +#+ +:+ +#+ *#
#* +#+#+#+#+#+ +#+ *#
#* Created: 2017/10/19 15:26:46 by mgautier #+# #+# *#
#* Updated: 2017/12/13 17:08:51 by mgautier ### ########.fr *#
#* *#
#* ************************************************************************** *#
SHELL = /bin/bash
DEBUGGER := lldb
CC := gcc
AR := ar
LD := ld
MKDIR := mkdir
RMDIR := rmdir
SED := sed
LN := ln -f
TOUCH := touch
RANLIB := ranlib
FILE_CHAR_RANGE := a-z0-9._
STANDARD = c11
SYSTEM = $(shell uname)
# Compiler flags
ERROR_FLAGS := -Wall -Wextra -Werror -std=$(STANDARD) -pedantic-errors
DEBUG_FLAGS := -g3 -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer
SYNTAX_FLAGS := -fsyntax-only -ferror-limit=0
OPTI_CFLAGS := -flto -Ofast
OPTI_LDFLAGS := -flto
PROFILE_FLAGS :=
CFLAGS := $(CFLAGS) $(ERROR_FLAGS) $(DEBUG_FLAGS)
ARFLAGS = rc
# OS dependendant flags
ifeq ($(SYSTEM),Linux)
ARFLAGS += -U
shared_flag := -shared
else
shared_flag := -dynamiclib
endif
# Language settings
#
obj_suffix := .o
src_suffix := .c
shared_lib_suffix := so
static_lib_suffix := a
shared_lib_compile_flags := -fpic
# Makefile defaults
#
# Run command silently by default.
QUIET := @