blob: 7cf0ddb24526c00bdb1e942e4f288596a5675654 [file] [log] [blame]
BUILD_ROOT = $(shell pwd)/..
include $(BUILD_ROOT)/Make.defines
LOCAL_PATH=$(BUILD_ROOT)/libmbtk_mqtt
INC_DIR += -I. \
-I$(LOCAL_PATH)/MQTTPacket
LIB_DIR +=
LIBS += -llog -lmbtk_lib -lmbtk_net -lmbtk_http
CFLAGS += -shared -Wl,-shared,-Bsymbolic
DEFINE +=
MY_FILES_PATH:=$(LOCAL_PATH)
#MY_FILES_PATH += $(LOCAL_PATH)/MQTTPacket
#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
#MY_FILES_PATH += $(LOCAL_PATH)/ql
#endif
#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
#endif
LOCAL_SRC_FILES = $(wildcard MQTTPacket/*.c) $(wildcard *.c)
OBJS = $(patsubst %.c, %.o, $(LOCAL_SRC_FILES))
$(info OBJS = $(OBJS))
dtarget := $(OUT_DIR)/lib/libmbtk_mqtt.so
all: $(dtarget)
$(dtarget): $(OBJS)
$(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
%.o:%.c
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
%.o:%.cpp
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
clean:
rm -f $(OBJS) $(dtarget)