#********************************************************************************
|
# Copyright: (C) 2023 LingYun IoT System Studio
|
# All rights reserved.
|
#
|
# Filename: Makefile
|
# Description: This file used compile all the source code to static library
|
#
|
# Version: 1.0.0(11/08/23)
|
# Author: Guo Wenxue <guowenxue@gmail.com>
|
# ChangeLog: 1, Release initial version on "11/08/23 16:18:43"
|
#
|
#*******************************************************************************
|
|
PWD=$(shell pwd )
|
|
CROSS_COMPILE=/opt/gcc-aarch32-10.3-2021.07/bin/arm-none-linux-gnueabihf-
|
|
LIBNAME=$(shell basename ${PWD} )
|
|
all: clean
|
@rm -f *.o
|
@${CROSS_COMPILE}gcc ${CFLAGS} -c *.c
|
${CROSS_COMPILE}ar -rcs lib${LIBNAME}.a *.o
|
|
clean:
|
@rm -f *.o *.a
|
|
test:
|
make -C testcase CROSS_COMPILE=${CROSS_COMPILE}
|
|
distclean:
|
@make clean
|
@make clean -C testcase
|
|
.PHONY: clean test distclean
|