-
Notifications
You must be signed in to change notification settings - Fork 13
/
makefile.base
73 lines (61 loc) · 2.65 KB
/
makefile.base
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
## IBM_PROLOG_BEGIN_TAG
#
# eCMD for pdbg Project
#
# Copyright 2017,2018 IBM International Business Machines Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
## IBM_PROLOG_END_TAG
# makefile.base is included by any makefile directly invoked by make
# We set a couple common variables used in build
# However, the main purpose is to check if config.py has been run
# If not, it throws an error to user that they should do that
# If it has, it includes the makefile.config and we go on our merry way
# And hey, who doesn't need another level of indirection from time to time?
# *****************************************************************************
# Some basic setup for our build
# *****************************************************************************
ifeq (${MAKEFILE_BASE},)
MAKEFILE_BASE := y
# Turn off implicit source checkout rules in gmake to speed it up
%: %,v
%: RCS/%,v
%: RCS/%
%: s.%
%: SCCS/s.%
#These are needed to define a space char for substitutions later on
empty :=
space := ${empty} ${empty}
# *****************************************************************************
# Now check if makefile.config is there
# *****************************************************************************
# If the makefile.base is /home/user1/ecmd/makefile.base
# MAKEBASE_PATH will be /home/user1/ecmd
MAKEBASE_PATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
# Optionally include makefile.config, so we don't get a make error if not there
# But if it isn't there, then we'll trigger the error below
MAKEFILE_CONFIG_NAME ?= makefile.config
-include ${MAKEBASE_PATH}/${MAKEFILE_CONFIG_NAME}
# If EDBG_ROOT isn't defined, makefile.config must not have been found
# Lets help the person out and tell them how to create the file
ifndef EDBG_ROOT
$(error makefile.config not found! Please run config.py in ${MAKEBASE_PATH})
endif
# *****************************************************************************
# Some concluding base makefile info
# *****************************************************************************
# Optionally include the makefile.override, this will override anything above
-include ${EDBG_ROOT}/makefile.override
endif # MAKEFILE_BASE