-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
68 lines (48 loc) · 2 KB
/
config
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
# =================================================================================
# ================================== DIRECTORIES ==================================
# =================================================================================
TARGET := debug
SRCDIR := src
TESDIR := test
___OBJDIR___ := obj
___BINDIR___ := bin
___LIBDIR___ := lib
OBJDIR := ${___OBJDIR___}/${TARGET}
BINDIR := ${___BINDIR___}/${TARGET}
LIBDIR := ${___LIBDIR___}/${TARGET}
# =================================================================================
# =================================== COMPILER ====================================
# =================================================================================
CC := gcc
# =================================================================================
# ===================================== FLAGS =====================================
# =================================================================================
IFLAGS = -Iinclude -Itest
CFLAGS = -pedantic -Wextra -Wall -std=c99 -D_GNU_SOURCE -Werror -MMD
LFLAGS = -L${LIBDIR} '-Wl,-rpath,$$ORIGIN/../../${LIBDIR}' -lcheck_pic -pthread -lrt -lm -lsubunit -lprovided -lbsd
RFLAGS = --banner
VFLAGS =
ifeq (${TARGET},debug)
CFLAGS += -g
LFLAGS +=
IFLAGS +=
RFLAGS += --verbose --unit-tests
VFLAGS +=
else
CFLAGS += -O2 -DNDEBUG
LFLAGS +=
IFLAGS +=
RFLAGS +=
VFLAGS +=
endif
%/parser_f.etu.o: CFLAGS += -w
%/parser_b.etu.o: CFLAGS += -w
# =================================================================================
# ==================================== TARGETS ====================================
# =================================================================================
.PHONY: all build clean rebuild mrproper
.SUFFIXES:
all: build
# =================================================================================
# =================================================================================
# =================================================================================