From b0053f87034ff358b7ccadc7f2d9643e9a7767e7 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Thu, 30 Apr 2020 16:15:09 +0800
Subject: [PATCH] update tlv project for server

---
 prj1_tlv/makefile |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/prj1_tlv/makefile b/prj1_tlv/makefile
new file mode 100644
index 0000000..1246642
--- /dev/null
+++ b/prj1_tlv/makefile
@@ -0,0 +1,42 @@
+
+APP1_NAME=tlv_client
+APP2_NAME=tlv_server
+
+#CROSSTOOL?=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-
+CC=${CROSSTOOL}gcc
+LD=${CROSSTOOL}ld
+AS=${CROSSTOOL}as
+AR=${CROSSTOOL}ar
+
+# subdirectory
+SUBDIR1=lylib
+
+# Compile flags
+CFLAGS=-Wall -Werror
+CFLAGS+=-I${SUBDIR1}
+
+# Linker flags
+LDFLAGS=-L${SUBDIR1} -l${SUBDIR1} 
+LDFLAGS+=-lpthread
+
+
+all: banner lib${SUBDIR1}
+	${CC} ${CFLAGS} tlv_client.c -o ${APP1_NAME} ${LDFLAGS}
+	${CC} ${CFLAGS} tlv_server.c -o ${APP2_NAME} ${LDFLAGS}
+
+banner:
+	@echo "Start to compile ${SRC} by ${CC}"
+
+lib${SUBDIR1}:
+	@make CROSSTOOL=${CROSSTOOL} -C ${SUBDIR1}
+
+clean: 
+	@make clean -C ${SUBDIR1}
+	rm -f ${APP1_NAME} ${APP2_NAME}
+
+distclean: clean
+	@make distclean -C ${SUBDIR1}
+	@rm -f *.o
+	@rm -f cscope* tags
+	@rm -f *.log
+

--
Gitblit v1.9.1