1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2015 Intel Corporation
4 include $(RTE_SDK)/mk/rte.vars.mk
8 ARCH_DIR ?= $(RTE_ARCH)
9 VPATH += $(RTE_SDK)/lib/librte_eal/common
10 VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR)
12 CFLAGS += -DALLOW_EXPERIMENTAL_API
13 CFLAGS += -I$(SRCDIR)/include
14 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
15 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
16 CFLAGS += $(WERROR_FLAGS) -O3
21 LDLIBS += -lrte_kvargs
23 EXPORT_MAP := ../../rte_eal_version.map
27 # specific to bsdapp exec-env
28 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) := eal.c
29 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_cpuflags.c
30 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_memory.c
31 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_hugepage_info.c
32 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_thread.c
33 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_debug.c
34 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_memalloc.c
35 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_lcore.c
36 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_timer.c
37 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_interrupts.c
38 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_alarm.c
39 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_dev.c
42 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_lcore.c
43 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_timer.c
44 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memzone.c
45 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_log.c
46 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_launch.c
47 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memalloc.c
48 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_memory.c
49 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_tailqs.c
50 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_errno.c
51 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_cpuflags.c
52 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_hypervisor.c
53 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_string_fns.c
54 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_hexdump.c
55 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_devargs.c
56 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_class.c
57 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_bus.c
58 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_dev.c
59 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_options.c
60 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_thread.c
61 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_proc.c
62 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_fbarray.c
63 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += eal_common_uuid.c
64 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_malloc.c
65 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += malloc_elem.c
66 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += malloc_heap.c
67 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += malloc_mp.c
68 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_keepalive.c
69 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_service.c
70 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_reciprocal.c
73 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_cpuflags.c
74 SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_hypervisor.c
75 SRCS-$(CONFIG_RTE_ARCH_X86) += rte_spinlock.c
76 SRCS-y += rte_cycles.c
78 CFLAGS_eal_common_cpuflags.o := $(CPUFLAGS_LIST)
80 CFLAGS_eal.o := -D_GNU_SOURCE
81 #CFLAGS_eal_thread.o := -D_GNU_SOURCE
82 CFLAGS_eal_log.o := -D_GNU_SOURCE
83 CFLAGS_eal_common_log.o := -D_GNU_SOURCE
85 # workaround for a gcc bug with noreturn attribute
86 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
87 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
88 CFLAGS_eal_thread.o += -Wno-return-type
89 CFLAGS_eal_hpet.o += -Wno-return-type
92 INC := # no bsdapp specific headers
94 SYMLINK-$(CONFIG_RTE_EXEC_ENV_BSDAPP)-include/exec-env := \
95 $(addprefix include/exec-env/,$(INC))
97 include $(RTE_SDK)/mk/rte.lib.mk