-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.rpmbuild
64 lines (54 loc) · 1.94 KB
/
Makefile.rpmbuild
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
#############################################################
#
# Copyright 2015 EFDA | European Joint Undertaking for ITER
# and the Development of Fusion Energy ("Fusion for Energy")
#
# Licensed under the EUPL, Version 1.1 or - as soon they
# will be approved by the European Commission - subsequent
# versions of the EUPL (the "Licence");
# You may not use this work except in compliance with the
# Licence.
# You may obtain a copy of the Licence at:
#
# http://ec.europa.eu/idabc/eupl
#
# Unless required by applicable law or agreed to in
# writing, software distributed under the Licence is
# distributed on an "AS IS" basis,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied.
# See the Licence for the specific language governing
# permissions and limitations under the Licence.
#
# $Id: Makefile.gcc 3 2015-01-15 16:26:07Z aneto $
#
#############################################################
TARGET=rpmbuild
ROOT_DIR=.
FOLDERSX?=Source.x Makefile.x86-linux.x Makefile.inc.x
MARTe2_MAKEDEFAULT_DIR?=$(MARTe2_DIR)/MakeDefaults
#If not set try to get the project version from a git tag (in the format vx.y, i.e. assuming it starts with v)
M2_RPM_VERSION?=$(shell git tag | sort -V | tail -1 | cut -c2-)
M2_RPM_NAME?=MARTe2_Components
M2_RPM_ID?=marte2-components
M2_RPM_BUILD_OPTIONS?=core
M2_RPM_REQUIRES?=marte2-core
M2_RPM_SPEC_FILE_PATH=$(MARTe2_DIR)/Resources/RPM/
include $(MARTe2_MAKEDEFAULT_DIR)/MakeStdLibDefs.$(TARGET)
all: $(OBJS) $(BUILD_DIR)/$(M2_RPM_ID)-$(M2_RPM_VERSION).rpm check-env
echo $(OBJS)
test:
make -f Makefile.$(TARGET) \
M2_RPM_ID=$(M2_RPM_ID)-test \
FOLDERSX='$(FOLDERSX) Test.x' \
M2_RPM_REQUIRES?=marte2-components \
M2_RPM_SRC_DIR=Test \
M2_RPM_BIN_LIST=MainGTest.ex \
M2_RPM_LIB_LIST='*Test.a' \
M2_RPM_PROFILE_D="" \
M2_RPM_BUILD_OPTIONS=all
check-env:
ifndef MARTe2_DIR
$(error MARTe2_DIR is undefined)
endif
include $(MARTe2_MAKEDEFAULT_DIR)/MakeStdLibRules.$(TARGET)