3 # Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
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
14 # the documentation and/or other materials provided with the
16 # * Neither the name of Intel Corporation nor the names of its
17 # contributors may be used to endorse or promote products derived
18 # from this software without specific prior written permission.
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 include $(RTE_SDK)/mk/rte.vars.mk
36 ARCH_DIR ?= $(RTE_ARCH)
37 VPATH += $(RTE_SDK)/lib/librte_eal/common
38 VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
40 CFLAGS += -I$(SRCDIR)/include
41 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
42 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
43 CFLAGS += $(WERROR_FLAGS) -O3
49 EXPORT_MAP := rte_eal_version.map
53 # specific to bsdapp exec-env
54 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) := eal.c
55 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_memory.c
56 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_hugepage_info.c
57 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_thread.c
58 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_pci.c
59 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_debug.c
60 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_lcore.c
61 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_timer.c
62 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_interrupts.c
63 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_alarm.c
66 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_lcore.c
67 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
68 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
69 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
70 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
71 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_vdev.c
72 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_pci.c
73 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_pci_uio.c
74 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
75 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_tailqs.c
76 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_errno.c
77 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_cpuflags.c
78 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_string_fns.c
79 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_hexdump.c
80 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_devargs.c
81 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_bus.c
82 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_dev.c
83 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_options.c
84 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_thread.c
85 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_proc.c
86 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_malloc.c
87 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += malloc_elem.c
88 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += malloc_heap.c
89 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_keepalive.c
90 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_service.c
93 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_cpuflags.c
94 SRCS-$(CONFIG_RTE_ARCH_X86) += rte_spinlock.c
96 CFLAGS_eal_common_cpuflags.o := $(CPUFLAGS_LIST)
98 CFLAGS_eal.o := -D_GNU_SOURCE
99 #CFLAGS_eal_thread.o := -D_GNU_SOURCE
100 CFLAGS_eal_log.o := -D_GNU_SOURCE
101 CFLAGS_eal_common_log.o := -D_GNU_SOURCE
103 # workaround for a gcc bug with noreturn attribute
104 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
105 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
106 CFLAGS_eal_thread.o += -Wno-return-type
107 CFLAGS_eal_hpet.o += -Wno-return-type
110 INC := rte_interrupts.h
112 SYMLINK-$(CONFIG_RTE_EXEC_ENV_BSDAPP)-include/exec-env := \
113 $(addprefix include/exec-env/,$(INC))
115 include $(RTE_SDK)/mk/rte.lib.mk