CFLAGS = -D BOARD_HEADER="<hal/micro/cortexm3/em35x/board/dev0680.h>" -D PLATFORM_HEADER="<hal/micro/cortexm3/compiler/iar.h>" -D CORTEXM3 -D CORTEXM3_EM357 -D PHY_EM3XX \
-D BOARD_DEV0680 -D CONFIGURATION_HEADER="<app/mfglib/mfg-lib-sample-configuration.h>" \
-D EMBER_SERIAL1_TX_QUEUE_SIZE=128 -D EMBER_SERIAL1_RX_QUEUE_SIZE=64 -D EMBER_SERIAL0_DEBUG \
-lC E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/ \
--diag_suppress Pa050 -o E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/ --debug --endian=little --cpu=Cortex-M3 -e --fpu=None \
--dlib_config E:/IARSystems/EmbeddedWorkbench5.4Evaluation/arm/INC/DLib_Config_Normal.h 

LFLAG = -o E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/mfg-sample-app.out \
--map E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/mfg-sample-app.map \
--log initialization,modules,sections,veneers --log_file E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/mfg-sample-app.log \
--config E:/em35x/app/mfglib/ewb-em357/../../../hal/micro/cortexm3/em35x/em357/iar-cfg.icf --diag_suppress Lp012 --entry halEntryPoint \

AFLAG = -OE:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/ -s+ -M'<>' -w+ -r -DBOARD_HEADER="<hal/micro/cortexm3/em35x/board/dev0680.h>" 
AFLAG1= -DPLATFORM_HEADER="<hal/micro/cortexm3/compiler/iar.h>" -DCORTEXM3 -DCORTEXM3_EM357 -DPHY_EM3XX -DBOARD_DEV0680 -DCONFIGURATION_HEADER="<app/mfglib/mfg-lib-sample-configuration.h>"      
AFLAG2= -DEMBER_SERIAL1_MODE=EMBER_SERIAL_FIFO -DEMBER_SERIAL1_TX_QUEUE_SIZE=128 -DEMBER_SERIAL1_RX_QUEUE_SIZE=64 -DEMBER_SERIAL0_DEBUG 
AFLAG3= -LE:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/ -t2 --cpu Cortex-M3 --fpu None -IE:/IARSystems/EmbeddedWorkbench5.4Evaluation/arm/INC/ -IE:/em35x/hal/micro/cortexm3/
AFLAG4= -IE:/em35x/app/mfglib/ewb-em357/../../../ -IE:/em35x/app/mfglib/ewb-em357/../../../STACK/ -IE:/em35x/app/mfglib/ewb-em357/../../../HAL/ 

INCLUDES = -I E:/em35x/app/util/serial/ -I E:/em35x/ \
-I E:/em35x/app/mfglib/ewb-em357/../../../ -I E:/em35x/app/mfglib/ewb-em357/../../../STACK/ \
-I E:/em35x/app/mfglib/ewb-em357/../../../HAL/ -I E:/IARSystems/EmbeddedWorkbench5.4Evaluation/arm/INC/ -Ohz 

CC = "E:\IARSystems\EmbeddedWorkbench5.4Evaluation\arm\bin\iccarm.exe"
LNK = "E:\IARSystems\EmbeddedWorkbench5.4Evaluation\arm\bin\ilinkarm.exe"  
ASM = "E:\IARSystems\EmbeddedWorkbench5.4Evaluation\arm\bin\iasmarm.exe"

ROOT_DIR = E:/em35x
BUILD_DIR = E:/em35x/build
END_DIR = E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680

OBJ = $(END_DIR)/mfg-sample.o $(END_DIR)/ember-configuration.o $(END_DIR)/adc.o $(END_DIR)/bootloader-interface-app.o $(END_DIR)/bootloader-interface-standalone.o $(END_DIR)/bootloader-interface.o \
$(END_DIR)/button.o $(END_DIR)/buzzer.o $(END_DIR)/cstartup-iar-common.o $(END_DIR)/diagnostic.o $(END_DIR)/led.o $(END_DIR)/mfg-token.o $(END_DIR)/micro-common.o $(END_DIR)/micro.o $(END_DIR)/sleep.o \
$(END_DIR)/token-def.o $(END_DIR)/token.o $(END_DIR)/uart.o $(END_DIR)/crc.o $(END_DIR)/endian.o $(END_DIR)/mem-util.o $(END_DIR)/random.o $(END_DIR)/sim-eeprom.o $(END_DIR)/cli.o \
$(END_DIR)/serial.o $(END_DIR)/faults.o $(END_DIR)/isr-stubs.o $(END_DIR)/mpu.o 


VPATH = E:/em35x/app/mfglib/:E:/em35x/hal/:E:/em35x/hal/micro/cortexm3/:E:/em35x/hal/micro/generic/:E:/em35x/app/util/serial/:E:/em35x/hal/micro/cortexm3/:E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/
vpath = E:/em35x/app/mfglib/:E:/em35x/hal/:E:/em35x/hal/micro/cortexm3/:E:/em35x/hal/micro/generic/:E:/em35x/app/util/serial/:E:/em35x/hal/micro/cortexm3/:E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/

SRC = E:/em35x/app/mfglib/mfg-sample.c E:/em35x/hal/ember-configuration.c E:/em35x/hal/micro/cortexm3/adc.c E:/em35x/hal/micro/cortexm3/bootloader-interface-app.c \
E:/em35x/hal/micro/cortexm3/bootloader-interface-standalone.c E:/em35x/hal/micro/cortexm3/bootloader-interface.c E:/em35x/hal/micro/cortexm3/button.c \
E:/em35x/hal/micro/cortexm3/buzzer.c E:/em35x/hal/micro/cortexm3/cstartup-iar-common.c E:/em35x/hal/micro/cortexm3/diagnostic.c E:/em35x/hal/micro/cortexm3/led.c \
E:/em35x/hal/micro/cortexm3/mfg-token.c E:/em35x/hal/micro/cortexm3/micro-common.c E:/em35x/hal/micro/cortexm3/micro.c E:/em35x/hal/micro/cortexm3/sleep.c \
E:/em35x/hal/micro/cortexm3/token-def.c E:/em35x/hal/micro/cortexm3/token.c E:/em35x/hal/micro/cortexm3/uart.c E:/em35x/hal/micro/generic/crc.c \
E:/em35x/hal/micro/generic/endian.c E:/em35x/hal/micro/generic/mem-util.c E:/em35x/hal/micro/generic/random.c E:/em35x/hal/micro/generic/sim-eeprom.c \
E:/em35x/app/util/serial/cli.c E:/em35x/app/util/serial/serial.c E:/em35x/hal/micro/cortexm3/em35x/mpu.c

LIB = $(BUILD_DIR)/alarm-library-cortexm3-iar-em357-em3xx/alarm-library.a $(BUILD_DIR)/binding-table-stub-library-cortexm3-iar-em357-em3xx/binding-table-stub-library.a 
LIB1= $(BUILD_DIR)/cbke-stub-library-cortexm3-iar-em357-em3xx/cbke-stub-library.a $(BUILD_DIR)/end-device-bind-stub-library-cortexm3-iar-em357-em3xx/end-device-bind-stub-library.a 
LIB2= $(BUILD_DIR)/hal-library-cortexm3-iar-em357-em3xx/hal-library.a $(BUILD_DIR)/mfglib-library-cortexm3-iar-em357-em3xx/mfglib-library.a 
LIB3= $(BUILD_DIR)/security-library-core-cortexm3-iar-em357-em3xx/security-library-core.a $(BUILD_DIR)/security-library-link-keys-stub-cortexm3-iar-em357-em3xx/security-library-link-keys-stub.a
LIB4= $(BUILD_DIR)/zigbee-pro-stack-cortexm3-iar-em357-em3xx/zigbee-pro-stack.a

%.d: %.c
  @set -e; rm -f $@; \
  $(CC) -M $(CFLAG) $< > $@.$$$$; \
  sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
  rm -f $@.$$$$

-include $(sources:.c=.d)

%.d: %.s79
  @set -e; rm -f $@; \
  $(LNK) -M $(AFLAG) $< > $@.$$$$; \
  sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
  rm -f $@.$$$$

-include $(sources:.s79=.d)

OBJ = $(SRC:.c=.o) E:/em35x/hal/micro/cortexm3/faults.o E:/em35x/hal/micro/cortexm3/isr-stubs.o 

mfg-sample-app.out : $(OBJ)
  $(LNK) $(LFLAG) $(LIB) $(LIB1) $(LIB2) $(LIB3) $(LIB4) $(OBJ)

%.o : %.s79 
  $(ASM) $(AFLAG) $(AFLAG1) $(AFLAG2) $(AFLAG3) $(AFLAG4) $< 

%.o : %.c
  $(CC) $(CFLAGS) $(INCLUDES) $<