RaspberrPi project source code
guowenxue
2024-03-14 7fa125e56f1de17c2f6aeb9a410ff02ac4e78e85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#********************************************************************************
#      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)
LIBNAME=$(shell basename ${PWD} )
TOPDIR=$(shell dirname ${PWD} )
 
BUILD_ARCH=$(shell uname -m)
ifneq ($(findstring $(BUILD_ARCH), "x86_64" "i386"),)
    CROSS_COMPILE?=arm-linux-gnueabihf-
endif
 
OPENLIBS_INCPATH=${TOPDIR}/openlibs/install/include
OPENLIBS_LIBPATH=${TOPDIR}/openlibs/install/lib
 
CFLAGS+=-I${OPENLIBS_INCPATH} -I${TOPDIR}/booster
 
all: clean
    @rm -f *.o
    ${CROSS_COMPILE}gcc ${CFLAGS} -c *.c
    ${CROSS_COMPILE}ar -rcs  lib${LIBNAME}.a *.o
 
clean:
    @rm -f *.o
    @rm -f *.a
 
distclean:
    @make clean