11bd4fe43Sopenharmony_ci# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 21bd4fe43Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 31bd4fe43Sopenharmony_ci# you may not use this file except in compliance with the License. 41bd4fe43Sopenharmony_ci# You may obtain a copy of the License at 51bd4fe43Sopenharmony_ci# 61bd4fe43Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 71bd4fe43Sopenharmony_ci# 81bd4fe43Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 91bd4fe43Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 101bd4fe43Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 111bd4fe43Sopenharmony_ci# See the License for the specific language governing permissions and 121bd4fe43Sopenharmony_ci# limitations under the License. 131bd4fe43Sopenharmony_ci 141bd4fe43Sopenharmony_ciinclude $(MAIN_TOPDIR)/build/make_scripts/config.mk 151bd4fe43Sopenharmony_ci-include $(MAIN_TOPDIR)/$(MODULE_DIR)/srcs.mk 161bd4fe43Sopenharmony_ciinclude $(MAIN_TOPDIR)/$(MODULE_DIR)/module_config.mk 171bd4fe43Sopenharmony_ci 181bd4fe43Sopenharmony_ciOBJDIR = $(MAIN_TOPDIR)/$(OBJ_PATH)/$(MODULE_DIR) 191bd4fe43Sopenharmony_ci 201bd4fe43Sopenharmony_ciID_CFG_FILE = $(MAIN_TOPDIR)/$(MODULE_DIR)/file_id.cfg 211bd4fe43Sopenharmony_ci 221bd4fe43Sopenharmony_ciLIB_NAME = lib$(LIB).a 231bd4fe43Sopenharmony_ciSRCS = $($(LIB)_srcs) 241bd4fe43Sopenharmony_ciLIBOUT = $(MAIN_TOPDIR)/$(LIB_PATH)/$(MODULE_DIR)/$(LIB_NAME) 251bd4fe43Sopenharmony_ci 261bd4fe43Sopenharmony_ciifdef SRC_FILES 271bd4fe43Sopenharmony_ciOBJ_SRCS := $(filter %.c, $(SRC_FILES)) 281bd4fe43Sopenharmony_ciASM_SRCS := $(filter %.S, $(SRC_FILES)) 291bd4fe43Sopenharmony_cielse 301bd4fe43Sopenharmony_ciOBJ_SRCS := $(foreach dir, $(SRCS), $(wildcard $(dir)/*.c)) 311bd4fe43Sopenharmony_ciASM_SRCS := $(foreach dir, $(SRCS), $(wildcard $(dir)/*.S )) 321bd4fe43Sopenharmony_ciendif 331bd4fe43Sopenharmony_ci 341bd4fe43Sopenharmony_ciOBJ_SRCS := $(filter-out %/ethernetif.c, $(OBJ_SRCS)) 351bd4fe43Sopenharmony_ciOBJS = $(patsubst %.c, $(OBJDIR)/%.o, $(OBJ_SRCS)) 361bd4fe43Sopenharmony_ciASM_OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(ASM_SRCS)) 371bd4fe43Sopenharmony_ci 381bd4fe43Sopenharmony_ciall: $(LIBOUT) 391bd4fe43Sopenharmony_ciinclude $(MAIN_TOPDIR)/build/make_scripts/lib.mk 401bd4fe43Sopenharmony_ci 411bd4fe43Sopenharmony_ciclean: 421bd4fe43Sopenharmony_ci $(Q)$(foreach x, $(OBJS) $(ASM_OBJS) $(LIBOUT), \ 431bd4fe43Sopenharmony_ci if [ -d $(dir $x) ]; \ 441bd4fe43Sopenharmony_ci then $(RM) $(dir $x); \ 451bd4fe43Sopenharmony_ci echo clean dir $(dir $x) success; \ 461bd4fe43Sopenharmony_ci fi;) 471bd4fe43Sopenharmony_ci 481bd4fe43Sopenharmony_ci.PHONY: all clean 491bd4fe43Sopenharmony_ci 50