-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile.rpmbuild
74 lines (62 loc) · 2.36 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
64
65
66
67
68
69
70
71
72
73
#############################################################
#
# 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 MakeDefaults.x Docs.x Makefile.x86-linux.x Makefile.inc.x Resources.x Lib.x
MARTe2_MAKEDEFAULT_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
M2_RPM_ID?=marte2-core
M2_RPM_ID_RELEASE?=marte2-release
M2_RPM_BUILD_OPTIONS=gtest core
M2_RPM_SRC_DIR=Source Lib/gtest-1.7.0
M2_RPM_LIB_DIR=Build Lib/gtest-1.7.0
M2_RPM_SPEC_FILE_DIST?=marte2-repo.spec
M2_RPM_OTHER_FOLDERS?=Resources/HTTP
#Provide MakeDefaults as part of devel package
M2_RPM_OTHER_DEVEL_FOLDERS=MakeDefaults\ Resources/RPM Resources/QA
include $(MARTe2_MAKEDEFAULT_DIR)/MakeStdLibDefs.$(TARGET)
#Core version with no tests
all: $(OBJS) $(BUILD_DIR)/$(M2_RPM_ID)-$(M2_RPM_VERSION).rpm
echo $(OBJS)
#Include test artifacts
test:
make -f Makefile.$(TARGET) \
M2_RPM_ID=$(M2_RPM_ID)-test \
FOLDERSX='$(FOLDERSX) Test.x' \
M2_RPM_BUILD_OPTIONS=all \
M2_RPM_SRC_DIR=Test \
M2_RPM_BIN_LIST=MainGTest.ex \
M2_RPM_LIB_LIST='*Test.a *Test.so' \
M2_RPM_OTHER_FOLDERS="" \
M2_RPM_OTHER_DEVEL_FOLDERS="" \
M2_RPM_PROFILE_D="" \
M2_RPM_REQUIRES=marte2-core
#Yum distribution file
dist:
make -f Makefile.$(TARGET) M2_RPM_ID=$(M2_RPM_ID_RELEASE) FOLDERSX='Resources.x' M2_RPM_SPEC_FILE=$(M2_RPM_SPEC_FILE_DIST)
include $(MARTe2_MAKEDEFAULT_DIR)/MakeStdLibRules.$(TARGET)