-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
executable file
·152 lines (111 loc) · 3.94 KB
/
makefile
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#||BUILD FLAGS||#
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#Generates moc files from headers for QT applications
BUILD_MOCS = 0
#Generates dynamic (shared object) and static (archive) from non-main objects
BUILD_LIB = 1
#Generates binary from all objects
BUILD_BIN = 0
#Generates test application
BUILD_TESTS = 1
#Runs pre-build scripts
RUN_PREBUILD = 1
#Runs post-build scripts
RUN_POSTBUILD = 0
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#||EXTERNALS||#
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
GOOGLETEST_INC = 3rdparty/googletest/inc
GOOGLETEST_LIB = 3rdparty/googletest/gen/debug/lib/static/libgtest.a
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#||BUILD CONFIG||#
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
######################
## Compiler Options ##
######################
#Compiler
CC = g++
#Compiler options
OPTS = -Wall -std=c++14 -fPIC
RELEASE_OPTS = -O3
DEBUG_OPTS = -g
#Static library archiver
LG = ar
#Static archiver options
LGOPTS = -r
#Project source file extensions
SRCTYPES = cpp cc c
#Project header file extensions
HTYPES = h hpp
###########################
## Project Configuration ##
###########################
PROJECT = BSignals
VERSION = 2.0.0-alpha.1
#Define Flags
DEFINE = LINUX
#Pre-Build Scripts
PREBUILD = +$(MAKE) -C 3rdparty/googletest
#Post-Build Scripts
POSTBUILD =
############################
# Directory Configuration ##
############################
# Project Directories
SRCDIR = src
INCDIR = inc
TESTDIR = test
#Generated Directories
GENDIR = gen
####################################
# External Dependencies and Paths ##
####################################
# External Include Directories
EXTINC =
# External/System Libraries
LIBDIRS =
LIBS = pthread
#Additional Source files to compile
ADDSRC =
# External Links
LINKS =
#Additional files/folders to clean
CLEANFILES =
###########################
# Unit Test Dependencies ##
###########################
#Unit testing library
TESTLIB = $(GOOGLETEST_LIB)
#Unit testing library include path
TESTINC = $(GOOGLETEST_INC)
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#||ADDITIONAL OPTIONS||#
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# debug - builds with debug options by default (can be manually specified by invoking the debug target)
# release - builds with release options by default (can be manually specified by invoking the release target)
BUILD_TYPE = release
# 0 = Include only INCDIR
# 1 = Recursively include all directories in INCDIR
RECURSIVELY_INCLUDE_LOCAL = 0
# 0 = Include only directories listed in EXTINC
# 1 = Recursively include all directories for each directory specified in extinc
RECURSIVELY_INCLUDE_EXTERNAL = 0
# 0 = Don't include main object file in generated libraries
# 1 = Include main object file in generated libraries
MAIN_OBJECT_IN_LIBRARIES = 0
# 0 = The project contains no main method (i.e. exclusively a library)
# 1 = The project contains at least one main method
PROJECT_CONTAINS_MAIN = 0
# If they exist, sources with main methods can be explicitly specified here.
# This saves compilation time, as the makefile will no longer need to
# search the object files for the main symbol
EXPLICIT_MAIN_SOURCE =
# 0 = Binary names are generated from the project name and the main source file name(s)
# 1 = Binary names are generated from the project name only (only valid when there is 1 main source)
# 2 = Binary source names are generated from the main source file name(s) only
BINARY_NAMING_CONVENTION = 0
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#||BUILD SCRIPT||#
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
include core.mk