From 1e563e2b731d928942f43e1341c8c50b0faf1c01 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Fri, 31 May 2024 11:39:31 +0800
Subject: [PATCH] APPS:IGKBoard-IMX6ULL: Add test-apps source code:
---
drivers/test-apps/makefile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/drivers/test-apps/makefile b/drivers/test-apps/makefile
new file mode 100644
index 0000000..94dc8b9
--- /dev/null
+++ b/drivers/test-apps/makefile
@@ -0,0 +1,50 @@
+
+# Cross compiler
+CROSS_COMPILE=arm-linux-gnueabihf-
+CC=${CROSS_COMPILE}gcc
+AR=${CROSS_COMPILE}ar
+
+# libgpiod compile install path
+LIBGPIOD_PATH=libgpiod/install
+
+# compile flags and link flags
+CFLAGS+=-I ${LIBGPIOD_PATH}/include
+LDFLAGS+=-L ${LIBGPIOD_PATH}/lib -lgpiod
+
+INSTALL_BINS=can_test
+
+all: libs
+ ${CC} hello.c -o hello
+ ${CC} ${CFLAGS} leds.c -o leds ${LDFLAGS}
+ ${CC} keypad.c -o keypad
+ ${CC} ds18b20.c -o ds18b20
+ ${CC} pwm.c -o pwm
+ ${CC} pwm_play.c -o pwm_play
+ ${CC} sht20_fops.c -o sht20_fops
+ ${CC} sht20_ioctl.c -o sht20_ioctl
+ ${CC} spi_test.c -o spi_test
+ ${CC} ttyS_test.c -o ttyS_test -lpthread
+ ${CC} can_test.c -o can_test
+ @make install
+
+libs:
+ make -C libgpiod CROSS_COMPILE=${CROSS_COMPILE}
+
+clean:
+ @rm -f hello
+ @rm -f leds
+ @rm -f keypad
+ @rm -f ds18b20
+ @rm -f pwm
+ @rm -f pwm_play
+ @rm -f sht20_fops
+ @rm -f sht20_ioctl
+ @rm -f spi_test
+ @rm -f ttyS_test
+ @rm -f can_test
+
+distclean: clean
+ make clean -C libgpiod
+
+install:
+ cp ${INSTALL_BINS} /tftp
--
Gitblit v1.9.1