From 80686e6bc4cb17e9d856647084725203fa63ebe6 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 19 Aug 2024 16:47:42 +0800
Subject: [PATCH] Add LCD API examples

---
 hal/lcd/drm/makefile |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/hal/lcd/drm/makefile b/hal/lcd/drm/makefile
new file mode 100644
index 0000000..76f206c
--- /dev/null
+++ b/hal/lcd/drm/makefile
@@ -0,0 +1,50 @@
+#*********************************************************************************
+#      Copyright:  (C) 2022 Avnet. All rights reserved.
+#         Author:  Guo Wenxue<wenxue.guo@avnet.com>
+#
+#       Filename:  Makefile
+#    Description:  This Makefile used to compile all the C source code file in
+#                  current folder to a excutable binary file.
+#
+#********************************************************************************/
+
+PRJ_PATH=$(shell pwd)
+APP_NAME = drm_test
+
+CROSS_COMPILE=arm-linux-gnueabihf-
+
+# C source files in top-level directory
+SRCFILES = $(wildcard *.c)
+
+# common CFLAGS for our source code
+CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized
+
+# CFLAGS and LDFLAGS for opensource library in libs
+CFLAGS+=-I ${PRJ_PATH}
+CFLAGS+=-I ${PRJ_PATH}/libs/install/include/
+CFLAGS+=-I ${PRJ_PATH}/libs/install/include/libdrm
+LDFLAGS+=-L ${PRJ_PATH}/libs/install/lib
+LDFLAGS+=-L ${PRJ_PATH}/libs/install/lib
+
+LIBS+=-ldrm
+
+.PHONY:libs
+all: libs binary
+
+libs:
+	cd libs && ./build.sh ${CROSS_COMPILE}
+
+modules:
+	@set -e; for d in ${DIRS}; do $(MAKE) CROSS_COMPILE=${CROSS_COMPILE} CFLAGS="${CFLAGS}" -C $${d}; done
+
+binary:  ${SRCFILES}
+	$(CROSS_COMPILE)gcc $(CFLAGS) -o ${APP_NAME} $^ ${LDFLAGS} ${LIBS}
+	@echo " Compile over"
+
+#set -e; for d in ${DIRS}; do $(MAKE) clean -C $${d}; done
+clean:
+	@rm -f *.o $(APP_NAME)
+
+distclean: clean
+	@rm -rf cscope* tags
+	@cd libs && ./build.sh distclean

--
Gitblit v1.9.1