RaspberrPi project source code
Guo Wenxue
2024-12-29 8517494b239d652ea9a24457faa13f88f55979b9
commit | author | age
d6b4a7 1 #********************************************************************************
G 2 #      Copyright:  (C) 2023 LingYun IoT System Studio
3 #                  All rights reserved.
4 #
5 #       Filename:  Makefile
6 #    Description:  This file used compile all the source code to static library
7 #
8 #        Version:  1.0.0(11/08/23)
9 #         Author:  Guo Wenxue <guowenxue@gmail.com>
10 #      ChangeLog:  1, Release initial version on "11/08/23 16:18:43"
11 #
12 #*******************************************************************************
13
14 PWD=$(shell pwd)
15 LIBNAME=$(shell basename ${PWD} )
16 TOPDIR=$(shell dirname ${PWD} )
17
18 BUILD_ARCH=$(shell uname -m)
19 ifneq ($(findstring $(BUILD_ARCH), "x86_64" "i386"),)
20     CROSS_COMPILE?=arm-linux-gnueabihf-
21 endif
22
23 OPENLIBS_INCPATH=${TOPDIR}/openlibs/install/include
24 OPENLIBS_LIBPATH=${TOPDIR}/openlibs/install/lib
25
26 CFLAGS+=-I${OPENLIBS_INCPATH} -I${TOPDIR}/booster
27
28 all: clean
29     @rm -f *.o
30     ${CROSS_COMPILE}gcc ${CFLAGS} -c *.c
31     ${CROSS_COMPILE}ar -rcs  lib${LIBNAME}.a *.o
32
33 clean:
34     @rm -f *.o
35     @rm -f *.a
36
37 distclean:
38     @make clean