From 4ea61c1941ce77b3b919e9088c3291a04d20533a Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 18 Nov 2025 16:02:58 +0800
Subject: [PATCH] update apue makefile for -Wall

---
 project/4.mqttd/makefile |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/project/4.mqttd/makefile b/project/4.mqttd/makefile
index 0eaa3c7..6b13ffc 100644
--- a/project/4.mqttd/makefile
+++ b/project/4.mqttd/makefile
@@ -12,7 +12,7 @@
 #*******************************************************************************
 
 PRJ_PATH=$(shell pwd)
-APP_NAME = mqttd
+APP_NAME = iotd
 
 BUILD_ARCH=$(shell uname -m)
 ifneq ($(findstring $(BUILD_ARCH), "x86_64" "i386"),)
@@ -26,7 +26,7 @@
 CFLAGS = -Wall -Wshadow -Wundef -Wmaybe-uninitialized -D_GNU_SOURCE
 
 # C source file in sub-directory
-SRCS=booster
+SRCS=booster modules
 SRCS_PATH=$(patsubst %,${PRJ_PATH}/%,$(SRCS))
 CFLAGS+=$(patsubst %,-I%,$(SRCS_PATH))
 LDFLAGS+=$(patsubst %,-L%,$(SRCS_PATH))
@@ -44,13 +44,13 @@
 LDFLAGS+=-lpthread
 
 all: entry subdir
-	${CROSS_COMPILE}gcc ${CFLAGS} mqttd.c -o ${APP_NAME} ${LDFLAGS}
+	${CROSS_COMPILE}gcc ${CFLAGS} ${SRCFILES} -o ${APP_NAME} ${LDFLAGS}
 
 entry:
 	@echo "Building ${APP_NAME} on ${BUILD_ARCH}"
 
 subdir:
-	@for dir in ${libs} ;  do CFLAGS="${CFLAGS}" make -C $${dir}; done
+	@for dir in ${libs} ;  do CFLAGS="${CFLAGS}" make -C $${dir} ; done
 
 install:
 	cp ${APP_NAME} /tftp

--
Gitblit v1.9.1