xref: /dpdk/examples/rxtx_callbacks/Makefile (revision e7bc40da)
1*e7bc40daSBruce Richardson#   BSD LICENSE
2*e7bc40daSBruce Richardson#
3*e7bc40daSBruce Richardson#   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
4*e7bc40daSBruce Richardson#   All rights reserved.
5*e7bc40daSBruce Richardson#
6*e7bc40daSBruce Richardson#   Redistribution and use in source and binary forms, with or without
7*e7bc40daSBruce Richardson#   modification, are permitted provided that the following conditions
8*e7bc40daSBruce Richardson#   are met:
9*e7bc40daSBruce Richardson#
10*e7bc40daSBruce Richardson#     * Redistributions of source code must retain the above copyright
11*e7bc40daSBruce Richardson#       notice, this list of conditions and the following disclaimer.
12*e7bc40daSBruce Richardson#     * Redistributions in binary form must reproduce the above copyright
13*e7bc40daSBruce Richardson#       notice, this list of conditions and the following disclaimer in
14*e7bc40daSBruce Richardson#       the documentation and/or other materials provided with the
15*e7bc40daSBruce Richardson#       distribution.
16*e7bc40daSBruce Richardson#     * Neither the name of Intel Corporation nor the names of its
17*e7bc40daSBruce Richardson#       contributors may be used to endorse or promote products derived
18*e7bc40daSBruce Richardson#       from this software without specific prior written permission.
19*e7bc40daSBruce Richardson#
20*e7bc40daSBruce Richardson#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21*e7bc40daSBruce Richardson#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*e7bc40daSBruce Richardson#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23*e7bc40daSBruce Richardson#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24*e7bc40daSBruce Richardson#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25*e7bc40daSBruce Richardson#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26*e7bc40daSBruce Richardson#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27*e7bc40daSBruce Richardson#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28*e7bc40daSBruce Richardson#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*e7bc40daSBruce Richardson#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30*e7bc40daSBruce Richardson#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*e7bc40daSBruce Richardson
32*e7bc40daSBruce Richardsonifeq ($(RTE_SDK),)
33*e7bc40daSBruce Richardson$(error "Please define RTE_SDK environment variable")
34*e7bc40daSBruce Richardsonendif
35*e7bc40daSBruce Richardson
36*e7bc40daSBruce Richardson# Default target, can be overridden by command line or environment
37*e7bc40daSBruce RichardsonRTE_TARGET ?= x86_64-native-linuxapp-gcc
38*e7bc40daSBruce Richardson
39*e7bc40daSBruce Richardsoninclude $(RTE_SDK)/mk/rte.vars.mk
40*e7bc40daSBruce Richardson
41*e7bc40daSBruce Richardson# binary name
42*e7bc40daSBruce RichardsonAPP = rxtx_callbacks
43*e7bc40daSBruce Richardson
44*e7bc40daSBruce Richardson# all source are stored in SRCS-y
45*e7bc40daSBruce RichardsonSRCS-y := main.c
46*e7bc40daSBruce Richardson
47*e7bc40daSBruce RichardsonCFLAGS += $(WERROR_FLAGS)
48*e7bc40daSBruce Richardson
49*e7bc40daSBruce Richardson# workaround for a gcc bug with noreturn attribute
50*e7bc40daSBruce Richardson# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
51*e7bc40daSBruce Richardsonifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
52*e7bc40daSBruce RichardsonCFLAGS_main.o += -Wno-return-type
53*e7bc40daSBruce Richardsonendif
54*e7bc40daSBruce Richardson
55*e7bc40daSBruce RichardsonEXTRA_CFLAGS += -O3 -g -Wfatal-errors
56*e7bc40daSBruce Richardson
57*e7bc40daSBruce Richardsoninclude $(RTE_SDK)/mk/rte.extapp.mk
58