From 6a924a29cefbea27a101790343137db819b361be Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 26 Jun 2019 00:08:35 +0800
Subject: [PATCH] update mqttd to add configure file parser support

---
 mqttd/makefile |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/mqttd/makefile b/mqttd/makefile
index 31257c4..932c4c9 100644
--- a/mqttd/makefile
+++ b/mqttd/makefile
@@ -37,28 +37,31 @@
 export CFLAGS
 export LDFLAGS
 
-CFLAGS+=-Ihal
-LDFLAGS+=-L hal -lhal
+
+CFLAGS+=-Ihal -Ietc -Ilylib 
+LDFLAGS+=-L hal -lhal -Letc -letc -Llylib -llylib
+
+LDFLAGS+=-lmosquitto -lpthread -lm
 
 SRCFILES = $(wildcard *.c)
 IMAGE_NAME=$(shell basename ${PWD})
 
-all: entry MQTT Modules binary
+all: entry modules binary
 entry: 
 	@echo " ";
 	@echo " =========================================================";
 	@echo " **        Compile \"${BINARIES}\" for ${ARCH}         ";
 	@echo " =========================================================";
 
-Modules:
+modules:
 	make -C hal
+	make -C lylib
+	make ${CFLAGS} -C etc
+	cd ${MQTT_LIBPATH} && bash build.sh
 
 binary:  ${SRCFILES}
 	$(CC) $(CFLAGS) -o ${IMAGE_NAME} $^ ${LDFLAGS}
 	@echo " Compile over"
-
-MQTT:
-	cd ${MQTT_LIBPATH} && bash build.sh
 
 tag: 
 	@ctags --c-kinds=+defglmnstuvx --langmap=c:.c.h.ho.hem.het.hec.hev.him.hit.hic.hiv -R .  
@@ -69,6 +72,7 @@
 
 clean: 
 	@make clean -C hal
+	@make clean -C lylib
 	@rm -f version.h 
 	@rm -f *.o $(IMAGE_NAME) 
 	@rm -rf *.gdb *.a *.so *.elf*

--
Gitblit v1.9.1