LIBA_TARGET 		:= libmid.a

$(call Append_Conditional, LIB_SRCS_EXCLUDE, midware.c)
$(call Append_Conditional, SRCS_kk_midware, midware.c)
$(call Append_Conditional, TARGET, kk_midware)

CFLAGS 			+= -I$(TOP_DIR)/common/nanomsg/include
CFLAGS 			+= -I$(TOP_DIR)/common/ev/include
CFLAGS 			+= -I$(TOP_DIR)/common/api
CFLAGS 			+= -I$(TOP_DIR)/common/sqlite
CFLAGS 			+= -I$(TOP_DIR)/common/zlog
CFLAGS 			+= -I$(TOP_DIR)/src/tsl/tsl_handle
LDFLAGS         += -lapi_com -liot_cjson -lkk_tsl
LDFLAGS         += -lm  -lkk_hal -lzlog
LDFLAGS         += -lsqlite -ldl
ifeq ($(CONFIG_VENDOR),ubuntu)
	LDFLAGS         += -L$(TOP_DIR)/common/nanomsg -lnanomsg_ubuntu -lanl
	LDFLAGS         += -L$(TOP_DIR)/common/ev  -lev_ubuntu  
else
	LDFLAGS         += -L$(TOP_DIR)/common/nanomsg -lnanomsg -lanl
	LDFLAGS         += -L$(TOP_DIR)/common/ev  -lev  
endif