From d81310d55b9b7d07904c19f879f50e52fd7be489 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Mon, 06 Nov 2023 16:52:08 +0800 Subject: [PATCH] Add new code --- 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..53bd854 --- /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 -lsqlite3 + + +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