xref: /dpdk/examples/vhost/Makefile (revision 98a7ea33)
1b82da759SHuawei Xie#   BSD LICENSE
2b82da759SHuawei Xie#
3b82da759SHuawei Xie#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
4b82da759SHuawei Xie#   All rights reserved.
5b82da759SHuawei Xie#
6b82da759SHuawei Xie#   Redistribution and use in source and binary forms, with or without
7b82da759SHuawei Xie#   modification, are permitted provided that the following conditions
8b82da759SHuawei Xie#   are met:
9b82da759SHuawei Xie#
10b82da759SHuawei Xie#     * Redistributions of source code must retain the above copyright
11b82da759SHuawei Xie#       notice, this list of conditions and the following disclaimer.
12b82da759SHuawei Xie#     * Redistributions in binary form must reproduce the above copyright
13b82da759SHuawei Xie#       notice, this list of conditions and the following disclaimer in
14b82da759SHuawei Xie#       the documentation and/or other materials provided with the
15b82da759SHuawei Xie#       distribution.
16b82da759SHuawei Xie#     * Neither the name of Intel Corporation nor the names of its
17b82da759SHuawei Xie#       contributors may be used to endorse or promote products derived
18b82da759SHuawei Xie#       from this software without specific prior written permission.
19b82da759SHuawei Xie#
20b82da759SHuawei Xie#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21b82da759SHuawei Xie#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22b82da759SHuawei Xie#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23b82da759SHuawei Xie#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24b82da759SHuawei Xie#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25b82da759SHuawei Xie#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26b82da759SHuawei Xie#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27b82da759SHuawei Xie#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28b82da759SHuawei Xie#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29b82da759SHuawei Xie#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30b82da759SHuawei Xie#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31b82da759SHuawei Xie
32b82da759SHuawei Xieifeq ($(RTE_SDK),)
33b82da759SHuawei Xie$(error "Please define RTE_SDK environment variable")
34b82da759SHuawei Xieendif
35b82da759SHuawei Xie
36*98a7ea33SJerin Jacob# Default target, can be overridden by command line or environment
37b82da759SHuawei XieRTE_TARGET ?= x86_64-native-linuxapp-gcc
38b82da759SHuawei Xie
39b82da759SHuawei Xieinclude $(RTE_SDK)/mk/rte.vars.mk
40b82da759SHuawei Xie
41b82da759SHuawei Xieifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
42b82da759SHuawei Xie$(info This application can only operate in a linuxapp environment, \
43b82da759SHuawei Xieplease change the definition of the RTE_TARGET environment variable)
44b82da759SHuawei Xieall:
45b82da759SHuawei Xieelse
46b82da759SHuawei Xie
47b82da759SHuawei Xie# binary name
48b82da759SHuawei XieAPP = vhost-switch
49b82da759SHuawei Xie
50b82da759SHuawei Xie# all source are stored in SRCS-y
51ca059fa5SYuanhan LiuSRCS-y := main.c virtio_net.c
52b82da759SHuawei Xie
53b82da759SHuawei XieCFLAGS += -O2 -D_FILE_OFFSET_BITS=64
54b82da759SHuawei XieCFLAGS += $(WERROR_FLAGS)
5567b6d303SRavi KerurCFLAGS += -D_GNU_SOURCE
56b82da759SHuawei Xie
57b82da759SHuawei Xieinclude $(RTE_SDK)/mk/rte.extapp.mk
58b82da759SHuawei Xie
59b82da759SHuawei Xieendif
60