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