From 29b331b4375c1e07fee0e943ec90c3a855b6d428 Mon Sep 17 00:00:00 2001 From: Guo Wenxue <guowenxue@gmail.com> Date: Fri, 08 Sep 2023 09:59:40 +0800 Subject: [PATCH] Update socketd example project --- project/socketd/makefile | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/project/socketd/makefile b/project/socketd/makefile index 2c72631..4036f46 100644 --- a/project/socketd/makefile +++ b/project/socketd/makefile @@ -12,7 +12,7 @@ #******************************************************************************* PRJ_PATH=$(shell pwd) -APP_NAME = client +APP_NAME = sock_client BUILD_ARCH=$(shell uname -m) ifneq ($(findstring $(BUILD_ARCH), "x86_64" "i386"),) @@ -24,9 +24,6 @@ # common CFLAGS for our source code CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized -D_GNU_SOURCE - -# sub-directory need to entry and compile -SUBDIR=booster sqlite # sub-directory compiled to a library and need to link SRCS=booster @@ -40,18 +37,20 @@ CFLAGS+=-I ${PRJ_PATH}/sqlite/install/include LDFLAGS+=-L ${PRJ_PATH}/sqlite/install/lib LDFLAGS+=-lsqlite3 - LDFLAGS+=-lpthread +# sub-directory need to entry and compile +SUBDIR=${SRCS} sqlite + all: entry subdir - ${CROSS_COMPILE}gcc ${CFLAGS} client.c -o client ${LDFLAGS} + ${CROSS_COMPILE}gcc ${CFLAGS} sock_client.c -o sock_client ${LDFLAGS} entry: @echo "Building ${APP_NAME} on ${BUILD_ARCH}" subdir: @for dir in ${SUBDIR} ; do if [ ! -e $${dir} ] ; then ln -s ../$${dir}; fi; done - @for dir in ${SUBDIR} ; do make -C $${dir} ; done + @for dir in ${SUBDIR} ; do make CFLAGS="${CFLAGS}" -C $${dir} ; done install: cp ${APP_NAME} /tftp -- Gitblit v1.9.1