1 #/******************************************************************************
3 #* Copyright (c) 2019 Intel.
5 #* Licensed under the Apache License, Version 2.0 (the "License");
6 #* you may not use this file except in compliance with the License.
7 #* You may obtain a copy of the License at
9 #* http://www.apache.org/licenses/LICENSE-2.0
11 #* Unless required by applicable law or agreed to in writing, software
12 #* distributed under the License is distributed on an "AS IS" BASIS,
13 #* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 #* See the License for the specific language governing permissions and
15 #* limitations under the License.
17 #*******************************************************************************/
22 $(error "Please define RTE_SDK environment variable")
25 RTE_TARGET := x86_64-native-linuxapp-icc
26 RTE_INC := $(RTE_SDK)/$(RTE_TARGET)/include
27 #include $(RTE_SDK)/mk/rte.vars.mk
30 ETH_DIR := $(PWD)/ethernet
34 MLOG_DIR=$(XRAN_DIR)/../mlog
37 CFLAGS += -std=gnu11 -Wall -wd9 -Wno-deprecated-declarations -Wextra -Werror -qopt-report-phase:all -qopt-zmm-usage=high \
43 -Wimplicit-function-declaration \
46 -no-inline-max-total-size \
48 -I$(API_DIR) -I$(ETH_DIR) -I$(MLOG_DIR)/source -I$(RTE_INC) -g -O3
51 CFLAGS += -DMLOG_ENABLED
53 SRC = $(ETH_DIR)/ethdi.c \
54 $(ETH_DIR)/ethernet.c \
55 $(SRC_DIR)/xran_up_api.c \
56 $(SRC_DIR)/xran_sync_api.c \
57 $(SRC_DIR)/xran_timer.c \
58 $(SRC_DIR)/xran_cp_api.c \
59 $(SRC_DIR)/xran_transport.c \
60 $(SRC_DIR)/xran_common.c \
61 $(SRC_DIR)/xran_ul_tables.c \
62 $(SRC_DIR)/xran_main.c
64 FLEX_C_CRAN_LIB = libxran.a
66 OBJ = $(foreach file,$(SRC),$(file:.c=.o))
72 $(CC) $(CFLAGS) -I$(API_DIR) -c $< -o $@
75 flex_lib:$(FLEX_C_CRAN_LIB)
77 $(FLEX_C_CRAN_LIB): $(OBJ)
80 install: $(FLEX_C_CRAN_LIB)
82 @mv $(FLEX_C_CRAN_LIB) ./bin
85 @rm -rf $(FLEX_C_CRAN_LIB) $(OBJ) ./bin/$(FLEX_C_CRAN_LIB)
87 #include $(RTE_SDK)/mk/rte.extlib.mk