This repository has been archived by the owner on Oct 1, 2022. It is now read-only.
/
config.mk
106 lines (79 loc) · 2.39 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# See LICENSE file for license and copyright information
PROJECT = libflush
ARCH = x86
LIBFLUSH_VERSION_MAJOR = 0
LIBFLUSH_VERSION_MINOR = 0
LIBFLUSH_VERSION_REV = 1
VERSION = ${LIBFLUSH_VERSION_MAJOR}.${LIBFLUSH_VERSION_MINOR}.${LIBFLUSH_VERSION_REV}
# If the API changes, the API version and the ABI version have to be bumped.
LIBFLUSH_VERSION_API = 1
# If the ABI breaks for any reason, this has to be bumped.
LIBFLUSH_VERSION_ABI = 1
# Rules for the SOMAJOR and SOMINOR.
# Before a release check perform the following checks against the last release:
# * If a function has been removed or the paramaters of a function have changed
# bump SOMAJOR and set SOMINOR to 0.
# * If any of the exported datastructures have changed in a incompatible way
# bump SOMAJOR and set SOMINOR to 0.
# * If a function has been added bump SOMINOR.
SOMAJOR = 1
SOMINOR = 0
SOVERSION = ${SOMAJOR}.${SOMINOR}
# pkg-config binary
PKG_CONFIG ?= pkg-config
# paths
PREFIX ?= /usr
LIBDIR ?= ${PREFIX}/lib
INCLUDEDIR ?= ${PREFIX}/include
DEPENDDIR=.depend
BUILDDIR ?= build/${ARCH}
BUILDDIR_RELEASE ?= ${BUILDDIR}/release
BUILDDIR_DEBUG ?= ${BUILDDIR}/debug
BUILDDIR_GCOV ?= ${BUILDDIR}/gcov
BINDIR ?= bin
# libs
FIU_INC ?= $(shell ${PKG_CONFIG} --cflags libfiu)
FIU_LIB ?= $(shell ${PKG_CONFIG} --libs libfiu) -ldl
INCS =
LIBS = -lm
# flags
CFLAGS += -std=gnu11 -pedantic -Wall -Wextra -fPIC -O3 $(INCS)
# linker flags
LDFLAGS += -fPIC
# debug
DFLAGS = -O0 -g
# compiler
CC ?= gcc
# archiver
AR ?= ar
# strip
SFLAGS ?= -s
# gcov & lcov
GCOV_CFLAGS=-fprofile-arcs -ftest-coverage -fno-inline -fno-inline-small-functions -fno-default-inline
GCOV_LDFLAGS=-fprofile-arcs
LCOV_OUTPUT=gcov
LCOV_EXEC=lcov
LCOV_FLAGS=--base-directory . --directory ${BUILDDIR_GCOV} --capture --rc \
lcov_branch_coverage=1 --output-file ${BUILDDIR_GCOV}/$(PROJECT).info
GENHTML_EXEC=genhtml
GENHTML_FLAGS=--rc lcov_branch_coverage=1 --output-directory ${LCOV_OUTPUT} ${BUILDDIR_GCOV}/$(PROJECT).info
# libfiu
WITH_LIBFIU ?= 0
FIU_RUN ?= fiu-run -x
# set to something != 0 if you want verbose build output
VERBOSE ?= 0
# enable colors
COLOR ?= 1
# android
ANDROID_PLATFORM ?= android-21
# thread safe
WITH_PTHREAD ?= 0
# pagemap access
HAVE_PAGEMAP_ACCESS ?= 1
# time sources
TIME_SOURCES = (register perf monotonic_clock thread_counter)
TIME_SOURCE ?= register
# use eviction instead of flush
USE_EVICTION ?= 0
# Define device
DEVICE_CONFIGURATION ?= default