From cfdcbd734b4ede4933c87cbe4c44f8aa855b910d Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 27 May 2024 17:29:46 +0800
Subject: [PATCH] add test example code in booster

---
 project/booster/test/makefile |   64 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/project/booster/test/makefile b/project/booster/test/makefile
new file mode 100644
index 0000000..45b59cc
--- /dev/null
+++ b/project/booster/test/makefile
@@ -0,0 +1,64 @@
+#*********************************************************************************
+#      Copyright:  (C) 2022 Guo Wenxue
+#                  All rights reserved.
+#
+#       Filename:  Makefile
+#    Description:  This Makefile used to compile all the C source code file in current
+#                  folder to respective excutable binary files.
+#
+#        Version:  1.0.0(03/15/2022~)
+#                  Author:  Guo Wenxue <guowenxue@gmail.com>
+#      ChangeLog:  1, Release initial version on "03/15/2022 01:29:33 PM"
+#
+#********************************************************************************/
+
+PWD=$(shell pwd)
+LIB_PATH=$(shell dirname ${PWD})
+LIB_NAME=$(shell basename ${LIB_PATH})
+INSTPATH=/tftp
+
+#ARCH ?= i386
+#ARCH?=arm926t
+ARCH?=arm920t
+
+#LINK_MODE=STATIC
+MODE=PRODUCTION
+DEBUG=1
+
+INSTPATH=/tftp
+
+#CROSS_COMPILE=aarch64-linux-gnu-
+
+export CC=${CROSS_COMPILE}gcc
+export CXX=${CROSS_COMPILE}g++
+export AR=${CROSS_COMPILE}ar
+export AS=${CROSS_COMPILE}as
+export RANLIB=${CROSS_COMPILE}ranlib
+export STRIP=${CROSS_COMPILE}strip
+
+SRCS = $(wildcard ${VPATH}/*.c)
+OBJS = $(patsubst %.c,%.o,$(SRCS))
+
+SRCFILES = $(wildcard *.c)
+BINARIES=$(SRCFILES:%.c=%)
+
+CFLAGS+=-I${LIB_PATH}
+LDFLAGS+=-L${LIB_PATH} -l${LIB_NAME}
+
+all: binaries install
+
+binaries:  ${BINARIES}
+
+%:  %.c
+	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
+
+install:
+	cp $(BINARIES) ${INSTPATH}
+
+clean:
+	@rm -f *.o *.lo $(BINARIES)
+
+distclean: clean
+	@rm -f  tags cscope*
+
+.PHONY: clean entry

--
Gitblit v1.9.1