From 72fea370ff20ecb2494ab985c4431b4bd691e7cd Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 17 Nov 2025 15:11:05 +0800
Subject: [PATCH] update lighted program
---
project/lightd/hal/makefile | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/project/lightd/hal/makefile b/project/lightd/hal/makefile
index 608137a..3525db8 100644
--- a/project/lightd/hal/makefile
+++ b/project/lightd/hal/makefile
@@ -1,15 +1,36 @@
+#********************************************************************************
+# 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 )
+PWD=$(shell pwd)
+
+BUILD_ARCH=$(shell uname -m)
+ifneq ($(findstring $(BUILD_ARCH), "x86_64" "i386"),)
+ CROSS_COMPILE?=arm-linux-gnueabihf-
+endif
+
+#CROSS_COMPILE=
LIBNAME=$(shell basename ${PWD} )
TOPDIR=$(shell dirname ${PWD} )
all: clean
@rm -f *.o
- @${CROSSTOOL}gcc ${CFLAGS} -I${TOPDIR} -c *.c
- ${CROSSTOOL}ar -rcs lib${LIBNAME}.a *.o
+ @${CROSS_COMPILE}gcc ${CFLAGS} -I${TOPDIR} -c *.c
+ ${CROSS_COMPILE}ar -rcs lib${LIBNAME}.a *.o
clean:
@rm -f *.o
@rm -f *.a
+distclean:
+ @make clean
--
Gitblit v1.9.1