# OUTPUT type # 1 - .out # 2 - .a # 3 - .so OUTPUT_TYPE = 2 OUTPUT_NAME = app SUB_DIRS = ping smart_grid/cco smart_grid/common smart_grid/common/swc_lib smart_grid/common/flash smart_grid/driver smart_grid/driver/cco smart_grid/driver/sta smart_grid/protocol/tools smart_grid/protocol smart_grid/sta SUB_DIRS += demo dev_test ppm_detect chaokongbao smart_grid_extend/src smart_meter/src tput sg_ctrl brm/src utils smart_grid_extend/cco smart_grid_extend/sta ADD_INCLUDE += ping smart_grid/inc smart_grid/inc/internal ../export/inc/socket ../export/inc/swc_lib ../import/lwip/lwip/src/include ../import/lwip/ports/include dev_test ppm_detect chaokongbao smart_grid_extend/inc smart_meter/inc tput sg_ctrl brm/inc ADD_INCLUDE += ../export/inc/crypto utils ifeq ($(APP), 2) SUB_DIRS += iot_plc_uart ADD_INCLUDE += iot_plc_uart endif ifeq ($(APP), 4) SUB_DIRS += grapp ADD_INCLUDE += grapp endif ifeq ($(APP), 7) SUB_DIRS += grapp ADD_INCLUDE += grapp SUB_DIRS += led_ctrl_app/controller ADD_INCLUDE += led_ctrl_app/controller endif ifeq ($(APP), 8) SUB_DIRS += grapp grapp/lwmqtt/src grapp/httpd/src grapp/ge_socket/src ADD_INCLUDE += grapp grapp/lwmqtt grapp/lwmqtt/include grapp/httpd/inc grapp/ge_socket/inc ../import/lwip/lwip/src/apps/httpd SUB_DIRS += iot_ge_lwip_app endif ifeq ($(APP), 9) SUB_DIRS += grapp ADD_INCLUDE += grapp ADD_INCLUDE += iot_ge_ext_app iot_ge_ext_app/ext_ports/lora iot_ge_ext_app/ext_ports/ble iot_ge_ext_app/ext_ports/zigbee SUB_DIRS += iot_ge_ext_app iot_ge_ext_app/ext_ports/lora iot_ge_ext_app/ext_ports/ble iot_ge_ext_app/ext_ports/zigbee endif ifeq ($(APP), 10) SUB_DIRS += grapp grapp/lwmqtt/src grapp/httpd/src grapp/ge_socket/src ADD_INCLUDE += grapp grapp/lwmqtt grapp/lwmqtt/include grapp/httpd/inc grapp/ge_socket/inc SUB_DIRS += chargepile ADD_INCLUDE += chargepile endif ifeq ($(APP), 12) SUB_DIRS += demo_lwip ADD_INCLUDE += demo_lwip/demo endif ifeq ($(APP), 13) SUB_DIRS += grapp grapp/lwmqtt/src grapp/httpd/src grapp/ge_socket/src ADD_INCLUDE += grapp grapp/lwmqtt grapp/lwmqtt/include grapp/httpd/inc grapp/ge_socket/inc SUB_DIRS += iot_ge_modbus_app ADD_INCLUDE += iot_ge_modbus_app endif ifeq ($(APP), 14) SUB_DIRS += bsrm ADD_INCLUDE += bsrm endif ifeq ($(APP), 15) SUB_DIRS += sniffer/src ADD_INCLUDE += sniffer/inc endif ifeq ($(APP), 16) SUB_DIRS += bsrm ADD_INCLUDE += bsrm endif ifeq ($(APP), 17) SUB_DIRS = iot_cuscore_demo_app utils ADD_INCLUDE += iot_cuscore_demo_app utils endif ifeq ($(APP), 18) SUB_DIRS += iot_cus_at_app/at iot_cus_at_app/common iot_cus_at_app/driver iot_cus_at_app/customer ADD_INCLUDE += iot_cus_at_app/at iot_cus_at_app/common iot_cus_at_app/driver iot_cus_at_app/customer endif ifeq ($(APP), 19) SUB_DIRS += iot_sniffer/src ADD_INCLUDE += iot_sniffer/inc endif ifeq ($(APP), 20) SUB_DIRS += iot_sunsolar_app/src ADD_INCLUDE += iot_sunsolar_app/inc endif ifeq ($(APP), 22) SUB_DIRS += grapp grapp/lwmqtt/src grapp/httpd/src grapp/ge_socket/src ADD_INCLUDE += grapp grapp/lwmqtt grapp/lwmqtt/include grapp/httpd/inc grapp/ge_socket/inc ../import/lwip/lwip/src/apps/httpd iot_micro_cctt_app/cctt/iot SUB_DIRS += iot_micro_cctt_app endif ifeq ($(APP), 23) SUB_DIRS = iot_cuscore_at_app utils ADD_INCLUDE += iot_cuscore_at_app utils endif ifeq ($(APP), 24) SUB_DIRS += iot_cus_at_app/common iot_cus_at_app/driver iot_cus_at_app/proto iot_cus_at_app/customer iot_cus_at_app/proto/app_device ADD_INCLUDE += iot_cus_at_app/common iot_cus_at_app/driver iot_cus_at_app/proto iot_cus_at_app/customer iot_cus_at_app/proto/app_device endif ifeq ($(APP), 25) SUB_DIRS += iot_cus_at_app/at iot_cus_at_app/common iot_cus_at_app/driver ADD_INCLUDE += iot_cus_at_app/at iot_cus_at_app/common iot_cus_at_app/driver iot_micro_cctt_app/cctt iot_micro_cctt_app/cctt/at iot_micro_cctt_app/comm SUB_DIRS += iot_micro_cctt_app endif ifeq ($(APP), 26) SUB_DIRS += iot_dlt645_app/common iot_dlt645_app/driver iot_dlt645_app/proto iot_dlt645_app/customer iot_dlt645_app/customer/dlt645 iot_dlt645_app/customer/solar ADD_INCLUDE += iot_dlt645_app/common iot_dlt645_app/driver iot_dlt645_app/proto iot_dlt645_app/customer iot_dlt645_app/customer/dlt645 iot_dlt645_app/customer/solar endif # predefined macro ifeq ($(APP), 4) ifeq ($(iot_ckq), 1) PRE_MARCO += IOT_GE_CKQ_MODE_ENABLE=1 endif endif ifeq ($(cco), 1) DISABLE_BACKTRACE = 0 else ifeq ($(release_build), 1) DISABLE_BACKTRACE = 1 else DISABLE_BACKTRACE = 1 endif endif # lib dir ADD_LIBDIR = # lib need to ld together ADD_LIB = extra_work = echo cp $(OUTPUT_FULL_NAME) $(TOPDIR)/export/lib;\ cp $(OUTPUT_FULL_NAME) $(TOPDIR)/export/lib;\ $(STRIP) --strip-debug $(TOPDIR)/export/lib/*.a ######################################################## #leave the lines below un-modified ######################################################## ifdef TOPDIR include $(TOPDIR)/build/makefile.cfg else include $(CURDIR)/build/makefile.cfg TOPDIR = $(CURDIR) export TOPDIR endif # display the obj files and output name debug: @echo TOPDIR=$(TOPDIR) @echo OUTPUT_DIR=$(OUTPUT_DIR) @echo OUTPUT_MAP=$(OUTPUT_MAP) @echo OUTPUT_LIB=$(OUTPUT_FULL_NAME) @echo DEPS=$(DEPS) @echo OBJECTS=$(OBJECTS) @echo SRCS=$(SRCS) @echo OBJECTS folder=$(foreach dirname, $(SUB_DIRS), $(addprefix $(BIN_DIR)/, $(dirname))) @echo output_name=$(OUTPUT_FULL_NAME) @echo LINK_LIBS=$(LINK_LIBS) @echo MAKEDEP=$(MAKEDEP) @echo CC=$(CC)