-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.mk
65 lines (49 loc) · 1.47 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
# variables:
VERSION=0.233.2
ARCH=$(shell uname -m)
CXXFLAGS = -Wall -Wextra -Wdeprecated-declarations -Wno-psabi -std=c++17 -pthread \
-ggdb -fno-finite-math-only -Wno-psabi
# -Wconversion
# -Werror
ifeq ($(OS),Windows_NT)
DLLEXT=.dll
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
DLLEXT=.so
EXTERNALS += alsa
CXXFLAGS += -fext-numeric-literals
else
DLLEXT=.dylib
endif
endif
ifeq "$(ARCH)" "x86_64"
CXXFLAGS += -msse -msse2 -mfpmath=sse
ifneq "$(UNAME_S)" "Darwin"
CXXFLAGS += -ffast-math
endif
endif
CPPFLAGS = -std=c++17
PREFIX = /usr/local
GITMODIFIED=$(shell test -z "`git status --porcelain -uno`" || echo "-modified")
COMMITHASH=$(shell git log -1 --abbrev=7 --pretty='format:%h')
LATEST_RELEASETAG=$(shell git tag -l "release*" |tail -1)
COMMIT_SINCE_RELEASE=$(shell git rev-list --count $(LATEST_RELEASETAG)..)
FULLVERSION=$(VERSION).$(COMMIT_SINCE_RELEASE)-$(COMMITHASH)$(GITMODIFIED)
mkfile_name := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_path := $(subst $(notdir $(mkfile_name)),,$(mkfile_name))
HAS_LSL:=$(shell $(mkfile_path)/check_for_lsl)
HAS_OPENMHA:=$(shell $(mkfile_path)/check_for_openmha)
HAS_OPENCV2:=$(shell $(mkfile_path)/check_for_opencv2)
HAS_OPENCV4:=$(shell $(mkfile_path)/check_for_opencv4)
HAS_WEBKIT:=$(shell $(mkfile_path)/check_for_webkit)
BUILD_DIR = build
SOURCE_DIR = src
export VERSION
export SOURCE_DIR
export BUILD_DIR
export CXXFLAGS
export HAS_LSL
export HAS_OPENMHA
export HAS_OPENCV2
export HAS_WEBKIT