From 74d93589a9de6c6c5158f122a2f73f6877a6317f Mon Sep 17 00:00:00 2001 From: Guo Wenxue <guowenxue@gmail.com> Date: Wed, 26 Jun 2019 00:50:03 +0800 Subject: [PATCH] update mqttd program, fix rpi build bug for strcasestr() --- mqttd/makefile | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/mqttd/makefile b/mqttd/makefile index 31257c4..e29019b 100644 --- a/mqttd/makefile +++ b/mqttd/makefile @@ -34,31 +34,34 @@ export AS=${CROSS_COMPILE}as export RANLIB=${CROSS_COMPILE}ranlib export STRIP=${CROSS_COMPILE}strip -export CFLAGS +export CFLAGS+=-D_GNU_SOURCE 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 -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,8 @@ clean: @make clean -C hal + @make clean -C etc + @make clean -C lylib @rm -f version.h @rm -f *.o $(IMAGE_NAME) @rm -rf *.gdb *.a *.so *.elf* -- Gitblit v1.9.1