Line 1... |
Line 1... |
1 |
######################################################################
|
1 |
######################################################################
|
2 |
### This is the configuration file where we tell make which compiler
|
2 |
### This is the configuration file where we tell make which compiler
|
3 |
### to use and whether we want to go for a debug or release version
|
3 |
### to use and whether we want to go for a debug or release version
|
4 |
######################################################################
|
4 |
######################################################################
|
5 |
|
5 |
|
6 |
# C++ compiler (may be left blank - in this case, I guess which compiler
|
6 |
### C++ compiler (may be left blank - in this case, I guess which compiler
|
7 |
# to use from a list of options.
|
7 |
### to use from a list of options.
|
- |
|
8 |
### If you must manually specify compiler, do so by naming it below.
|
8 |
CXX =
|
9 |
CXX =
|
- |
|
10 |
|
- |
|
11 |
### Use a shell script to guess the compiler if not defined
|
- |
|
12 |
ifeq ($(strip ${CXX}),)
|
- |
|
13 |
CXX = $(shell ${SOURCEROOT}/makefiles/findcompiler.sh)
|
- |
|
14 |
endif
|
9 |
|
15 |
|
10 |
# Target (debug or release)
|
16 |
### Target (debug or release)
|
11 |
# it makes more sense in some cases to specify this on the command line
|
17 |
### default is debug. The preferred way of specifying a target is to
|
12 |
# using "make TARGET=release" or by specifying the target in the environment
|
18 |
### type "make TARGET=release" on the command line.
|
13 |
# hence, I suggest you do not use this config file to specify the target.
|
19 |
ifndef TARGET
|
14 |
TARGET = debug
|
20 |
TARGET = debug
|
- |
|
21 |
endif
|
- |
|
22 |
|
15 |
#TARGET = release
|
23 |
### Define the empty string
|
- |
|
24 |
empty =
|
- |
|
25 |
|
- |
|
26 |
### Define operating system and CPU
|
- |
|
27 |
OS =$(subst ${empty} ${empty},_,$(shell uname -s))
|
- |
|
28 |
CPU =$(subst ${empty} ${empty},_,$(shell uname -m))
|
- |
|
29 |
|
- |
|
30 |
### The platform is determined by OS CPU and compiler
|
- |
|
31 |
PLATFORM = ${OS}_${CPU}_${CXX}
|
- |
|
32 |
|
- |
|
33 |
### Concatenation of platform and target yields a string used as
|
- |
|
34 |
### suffix of makefiles and in the name of the builddir.
|
- |
|
35 |
PLATFORM_TARG = ${PLATFORM}_$(TARGET)
|