edit descriptor model for composer rbac fix
[osm/UI.git] / Makefile
1 #
2 # Copyright 2016 RIFT.IO Inc
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # Author(s): Austin Cormier
17 # Creation Date: 07/27/2016
18 #
19 #
20
21 .PHONY : clean
22
23 makefile.top := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
24 TOP_SRC_PATH := $(makefile.top)
25 TOP_ROOT_PATH := /usr/rift
26 CMAKE_MODULE_PATH := $(TOP_ROOT_PATH)/cmake/modules
27
28 RIFT_BUILD = $(TOP_SRC_PATH)/.build
29 RIFT_ARTIFACTS = $(TOP_ROOT_PATH)/artifacts
30 RIFT_INSTALL = $(TOP_ROOT_PATH)
31 RIFT_SHELL_EXE = $(TOP_ROOT_PATH)/rift-shell -b $(RIFT_BUILD) -i $(RIFT_INSTALL) -a $(RIFT_ARTIFACTS) --
32 RELEASE_NUMBER = $(shell git describe | cut -d. -f1 | sed -e 's/^v//')
33 BUILD_NUMBER = $(shell git describe | cut -d. -f2-)
34
35
36 CONFD = XML_ONLY
37
38 BUILD_TYPE = Debug
39 NOT_DEVELOPER_TYPE = FALSE
40 COVERAGE_BUILD = FALSE
41 RIFT_AGENT_BUILD = $(CONFD)
42 PROJECT_TOP_DIR = $(TOP_ROOT_PATH)
43
44 all: rw
45
46 cmake::
47 mkdir -p $(RIFT_BUILD)
48 mkdir -p $(RIFT_ARTIFACTS)
49 mkdir -p $(RIFT_INSTALL)
50 cd $(RIFT_BUILD) && $(RIFT_SHELL_EXE) cmake $(TOP_SRC_PATH) -DCMAKE_INSTALL_PREFIX=$(TOP_ROOT_PATH) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DNOT_DEVELOPER_BUILD=$(NOT_DEVELOPER_TYPE) -DCOVERAGE_BUILD=$(COVERAGE_TYPE) -DRIFT_AGENT_BUILD=$(RIFT_AGENT_BUILD) -DPROJECT_TOP_DIR=$(PROJECT_TOP_DIR) -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -DRIFT_SUBMODULE_NAME=$(PROJECT_TOP_DIR) -DRIFT_PACKAGE_GENERATOR=DEB -DRELEASE_NUMBER=$(RELEASE_NUMBER) -DBUILD_NUMBER=$(BUILD_NUMBER)
51
52 rw: cmake
53 $(RIFT_SHELL_EXE) $(MAKE) -C $(RIFT_BUILD)
54
55 package: rw
56 $(RIFT_SHELL_EXE) $(MAKE) -C $(RIFT_BUILD) rw.package
57
58 install:
59 $(RIFT_SHELL_EXE) $(MAKE) -C $(RIFT_BUILD) install
60
61 unittest:
62 $(RIFT_SHELL_EXE) $(MAKE) -C $(RIFT_BUILD) rw.unittest
63
64 clean:
65 @echo "Cleaning up.."
66 -rm -rf .build