From 68826376ee5f47783c644c6604f4411ec747cd7e Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Fri, 14 Nov 2025 23:52:16 +0800
Subject: [PATCH] Add UDP DNS client source code

---
 project/2.socketd/makefile |   67 +++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/project/2.socketd/makefile b/project/2.socketd/makefile
new file mode 100644
index 0000000..9335e9a
--- /dev/null
+++ b/project/2.socketd/makefile
@@ -0,0 +1,67 @@
+#********************************************************************************
+#      Copyright:  (C) 2023 LingYun IoT System Studio
+#                  All rights reserved.
+#
+#       Filename:  Makefile
+#    Description:  This file is the project top Makefie
+#
+#        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"
+#
+#*******************************************************************************
+
+PRJ_PATH=$(shell pwd)
+APP_NAME = socket_client socket_server
+
+BUILD_ARCH=$(shell uname -m)
+ifneq ($(findstring $(BUILD_ARCH), "x86_64" "i386"),)
+    CROSS_COMPILE=arm-linux-gnueabihf-
+endif
+
+# C source files in top-level directory
+SRCFILES = $(wildcard *.c)
+
+# common CFLAGS for our source code
+CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized -D_GNU_SOURCE
+
+# C source file in sub-directory
+SRCS=booster
+SRCS_PATH=$(patsubst %,${PRJ_PATH}/%,$(SRCS))
+CFLAGS+=$(patsubst %,-I%,$(SRCS_PATH))
+LDFLAGS+=$(patsubst %,-L%,$(SRCS_PATH))
+LIBS=$(patsubst %,-l%,$(SRCS))
+LDFLAGS+=${LIBS}
+
+# Open source libraries
+CFLAGS+=-I ${PRJ_PATH}/openlibs/install/include
+LDFLAGS+=-L ${PRJ_PATH}/openlibs/install/lib
+
+# libraries
+libs=openlibs ${SRCS}
+LDFLAGS+=-lsqlite3
+
+LDFLAGS+=-lpthread
+
+all: entry subdir
+	${CROSS_COMPILE}gcc ${CFLAGS} socket_client.c -o socket_client ${LDFLAGS}
+	${CROSS_COMPILE}gcc ${CFLAGS} socket_server.c -o socket_server ${LDFLAGS}
+
+entry:
+	@echo "Building ${APP_NAME} on ${BUILD_ARCH}"
+
+subdir:
+	@for dir in ${libs} ;  do CFLAGS="${CFLAGS}" make -C $${dir}; done
+
+install:
+	cp ${APP_NAME} /tftp
+
+clean:
+	@for dir in ${SRCS} ; do if [ -e $${dir} ] ; then make clean -C $${dir}; fi; done
+	@rm -f ${APP_NAME}
+
+distclean:
+	@for dir in ${libs} ; do if [ -e $${dir} ] ; then make clean -C $${dir}; fi; done
+	@rm -f ${APP_NAME}
+	@rm -f cscope.* tags
+

--
Gitblit v1.9.1