blob: 485e9434b399dbb898904a0fb23522970008c2ec [file] [log] [blame]
Felipe Franciosif8ef2772019-07-02 14:06:42 +01001#
2# Copyright (c) 2019 Nutanix Inc. All rights reserved.
3#
4# Authors: Thanos Makatos <thanos@nutanix.com>
5# Swapnil Ingle <swapnil.ingle@nutanix.com>
6# Felipe Franciosi <felipe@nutanix.com>
7#
8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions are met:
10# * Redistributions of source code must retain the above copyright
11# notice, this list of conditions and the following disclaimer.
12# * Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution.
15# * Neither the name of Nutanix nor the names of its contributors may be
16# used to endorse or promote products derived from this software without
17# specific prior written permission.
Felipe Franciosi08d1f382019-11-02 05:53:53 +000018#
Felipe Franciosif8ef2772019-07-02 14:06:42 +010019# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22# ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
23# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29#
30
Daniel P. Berrangé11ccc962022-05-05 18:37:52 +010031BUILD_DIR = $(CURDIR)/build
Felipe Franciosif8ef2772019-07-02 14:06:42 +010032
Daniel P. Berrangé11ccc962022-05-05 18:37:52 +010033.PHONY: all install test coverity pre-push clean tags
Felipe Franciosif8ef2772019-07-02 14:06:42 +010034
Daniel P. Berrangé11ccc962022-05-05 18:37:52 +010035all:
36 test -d $(BUILD_DIR) || meson $(BUILD_DIR)
37 ninja -C $(BUILD_DIR)
John Levon02dda312021-02-04 10:07:53 +000038
Daniel P. Berrangé11ccc962022-05-05 18:37:52 +010039install:
40 ninja -C $(BUILD_DIR) install
John Levondf72df52021-05-25 15:09:03 +010041
Daniel P. Berrangé11ccc962022-05-05 18:37:52 +010042test: all
43 meson test -C $(BUILD_DIR)
John Levon76fb4e22020-11-25 17:33:25 +000044
Daniel P. Berrangé93709c02022-05-05 12:10:09 +010045pre-push:
46 .github/workflows/pull_request.sh
John Levon96d4f112020-12-02 12:20:45 +000047
Daniel P. Berrangé93709c02022-05-05 12:10:09 +010048coverity:
49 .github/workflows/coverity.sh
John Levon3111d8e2021-10-20 16:36:53 +010050
John Levondf72df52021-05-25 15:09:03 +010051clean:
Felipe Franciosif8ef2772019-07-02 14:06:42 +010052 rm -rf $(BUILD_DIR)
53
Daniel P. Berrangé11ccc962022-05-05 18:37:52 +010054tags: all
55 ninja -C $(BUILD_DIR) ctags