-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk
61 lines (46 loc) · 1.62 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
# ===========================================================================
# Generic configuration options for building the xchange library (both static
# and shared).
#
# You can include this snipplet in your Makefile also.
# ============================================================================
# Folders in which sources and header files are located, respectively
SRC ?= src
INC ?= include
# Folders for compiled objects, libraries, and binaries, respectively
OBJ ?= obj
LIB ?= lib
BIN ?= bin
# Compiler: use gcc by default
CC ?= gcc
# Add include/ directory
CPPFLAGS += -I$(INC)
# Base compiler options (if not defined externally...)
CFLAGS ?= -Os -Wall -std=c99
# Extra warnings (not supported on all compilers)
#CFLAGS += -Wextra
# Extra linker flags to use
#LDFLAGS =
# cppcheck options for 'check' target
CHECKOPTS ?= --enable=performance,warning,portability,style --language=c \
--error-exitcode=1 --std=c99 $(CHECKEXTRA)
# Exhaustive checking for newer cppcheck
#CHECKOPTS += --check-level=exhaustive
# Specific Doxygen to use if not the default one
#DOXYGEN ?= /opt/bin/doxygen
# ============================================================================
# END of user config section.
#
# Below are some generated constants based on the one that were set above
# ============================================================================
# Compiler and linker options etc.
ifeq ($(BUILD_MODE),debug)
CFLAGS += -g -DDEBUG
endif
# Link against math libs (for e.g. isnan())
LDFLAGS += -lm
# Search for files in the designated locations
vpath %.h $(INC)
vpath %.c $(SRC)
vpath %.o $(OBJ)
vpath %.d dep