vpath % C:/ti/ipc_3_50_03_05/packages/
vpath %.c C:/ti/ccs910/xdctools_3_55_02_22_core/packages/

CCOPTS = -mcpu=cortex-a53+fp+simd -mabi=lp64 -mcmodel=large -mstrict-align -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -g    -Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections   -Dfar= -D__DYNAMIC_REENT__  

BUILD_DEFS =  -Dti_sdo_ipc_MessageQ_traceFlag__D=FALSE -Dti_sdo_ipc_family_ti81xx_InterruptDucati_videoProcId__D=65535 -Dti_sdo_ipc_family_ti81xx_InterruptDucati_hostProcId__D=65535 -Dti_sdo_ipc_family_ti81xx_InterruptDucati_vpssProcId__D=65535 -Dti_sdo_ipc_family_ti81xx_InterruptDucati_dspProcId__D=65535 -Dti_sdo_ipc_family_ti81xx_InterruptDucati_ducatiCtrlBaseAddr__D=1073745920 -Dti_sdo_ipc_family_ti81xx_InterruptDucati_mailboxBaseAddr__D=1208778752

INCS = -IC:/ti/ipc_3_50_03_05/packages -IC:/ti/bios_6_75_02_00/packages -IC:/ti/pdk_am65xx_1_0_5/packages -IC:/ti/uia_2_30_01_02/packages

CC = C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/bin/aarch64-elf-gcc -c -MD -MF $@.dep $(CCOPTS) -I C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/arm-none-eabi/include
ASM = C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/bin/aarch64-elf-gcc -c -x assembler-with-cpp $(CCOPTS) -I C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/arm-none-eabi/include
AR = C:/ti/gcc-linaro-7.2.1-2017.11-i686-mingw32_aarch64-elf/bin/aarch64-elf-ar  cr

DEL = cmd.exe /q /c del /f
CP = cmd.exe /q /c copy /Y
MKDIR = mkdir

define RM
	$(if $(wildcard $1),$(DEL) $1,:)
endef

define ASSEMBLE
	@echo asma53fg $< ...
	@$(ASM) $(BUILD_DEFS) -I "C:/ti/ccs910/xdctools_3_55_02_22_core/packages/" -Dxdc_target_types__=C:/ti/bios_6_75_02_00/packages/gnu/targets/arm/std.h -Dxdc_target_name__=A53F $(INCS) $<
endef

define COMPILE
	@echo cla53fg $< ...
	@$(CC) $(BUILD_DEFS) -I "C:/ti/ccs910/xdctools_3_55_02_22_core/packages/" -Dxdc_target_types__=C:/ti/bios_6_75_02_00/packages/gnu/targets/arm/std.h -Dxdc_target_name__=A53F $(INCS) $<
endef


all: ipc.aa53fg


ti_sdo_utils_NameServer.o: ti/sdo/utils/NameServer.c makefile
	@-$(call RM, ti_sdo_utils_NameServer.o)
	$(COMPILE) -o ti_sdo_utils_NameServer.o
ti_sdo_utils_NameServerRemoteNull.o: ti/sdo/utils/NameServerRemoteNull.c makefile
	@-$(call RM, ti_sdo_utils_NameServerRemoteNull.o)
	$(COMPILE) -o ti_sdo_utils_NameServerRemoteNull.o
ti_sdo_utils_MultiProc.o: ti/sdo/utils/MultiProc.c makefile
	@-$(call RM, ti_sdo_utils_MultiProc.o)
	$(COMPILE) -o ti_sdo_utils_MultiProc.o
ti_sdo_utils_List.o: ti/sdo/utils/List.c makefile
	@-$(call RM, ti_sdo_utils_List.o)
	$(COMPILE) -o ti_sdo_utils_List.o
ti_sdo_ipc_GateMP.o: ti/sdo/ipc/GateMP.c makefile
	@-$(call RM, ti_sdo_ipc_GateMP.o)
	$(COMPILE) -o ti_sdo_ipc_GateMP.o
ti_sdo_ipc_MessageQ.o: ti/sdo/ipc/MessageQ.c makefile
	@-$(call RM, ti_sdo_ipc_MessageQ.o)
	$(COMPILE) -o ti_sdo_ipc_MessageQ.o
ti_sdo_ipc_SharedRegion.o: ti/sdo/ipc/SharedRegion.c makefile
	@-$(call RM, ti_sdo_ipc_SharedRegion.o)
	$(COMPILE) -o ti_sdo_ipc_SharedRegion.o
ti_sdo_ipc_ListMP.o: ti/sdo/ipc/ListMP.c makefile
	@-$(call RM, ti_sdo_ipc_ListMP.o)
	$(COMPILE) -o ti_sdo_ipc_ListMP.o
ti_sdo_ipc_Ipc.o: ti/sdo/ipc/Ipc.c makefile
	@-$(call RM, ti_sdo_ipc_Ipc.o)
	$(COMPILE) -o ti_sdo_ipc_Ipc.o
ti_sdo_ipc_Notify.o: ti/sdo/ipc/Notify.c makefile
	@-$(call RM, ti_sdo_ipc_Notify.o)
	$(COMPILE) -o ti_sdo_ipc_Notify.o
ti_sdo_ipc_gates_GateHWSpinlock.o: ti/sdo/ipc/gates/GateHWSpinlock.c makefile
	@-$(call RM, ti_sdo_ipc_gates_GateHWSpinlock.o)
	$(COMPILE) -o ti_sdo_ipc_gates_GateHWSpinlock.o
ti_sdo_ipc_gates_GateMPSupportNull.o: ti/sdo/ipc/gates/GateMPSupportNull.c makefile
	@-$(call RM, ti_sdo_ipc_gates_GateMPSupportNull.o)
	$(COMPILE) -o ti_sdo_ipc_gates_GateMPSupportNull.o
ti_sdo_ipc_notifyDrivers_NotifyDriverShm.o: ti/sdo/ipc/notifyDrivers/NotifyDriverShm.c makefile
	@-$(call RM, ti_sdo_ipc_notifyDrivers_NotifyDriverShm.o)
	$(COMPILE) -o ti_sdo_ipc_notifyDrivers_NotifyDriverShm.o
ti_sdo_ipc_family_am65xx_NotifySciClient.o: ti/sdo/ipc/family/am65xx/NotifySciClient.c makefile
	@-$(call RM, ti_sdo_ipc_family_am65xx_NotifySciClient.o)
	$(COMPILE) -o ti_sdo_ipc_family_am65xx_NotifySciClient.o
ti_sdo_ipc_family_am65xx_NotifySetup.o: ti/sdo/ipc/family/am65xx/NotifySetup.c makefile
	@-$(call RM, ti_sdo_ipc_family_am65xx_NotifySetup.o)
	$(COMPILE) -o ti_sdo_ipc_family_am65xx_NotifySetup.o
ti_sdo_ipc_family_am65xx_InterruptHost.o: ti/sdo/ipc/family/am65xx/InterruptHost.c makefile
	@-$(call RM, ti_sdo_ipc_family_am65xx_InterruptHost.o)
	$(COMPILE) -o ti_sdo_ipc_family_am65xx_InterruptHost.o
ti_sdo_ipc_transports_TransportShm.o: ti/sdo/ipc/transports/TransportShm.c makefile
	@-$(call RM, ti_sdo_ipc_transports_TransportShm.o)
	$(COMPILE) -o ti_sdo_ipc_transports_TransportShm.o
ti_sdo_ipc_transports_TransportShmSetup.o: ti/sdo/ipc/transports/TransportShmSetup.c makefile
	@-$(call RM, ti_sdo_ipc_transports_TransportShmSetup.o)
	$(COMPILE) -o ti_sdo_ipc_transports_TransportShmSetup.o
ti_sdo_ipc_nsremote_NameServerRemoteNotify.o: ti/sdo/ipc/nsremote/NameServerRemoteNotify.c makefile
	@-$(call RM, ti_sdo_ipc_nsremote_NameServerRemoteNotify.o)
	$(COMPILE) -o ti_sdo_ipc_nsremote_NameServerRemoteNotify.o
ti_sdo_ipc_heaps_HeapMemMP.o: ti/sdo/ipc/heaps/HeapMemMP.c makefile
	@-$(call RM, ti_sdo_ipc_heaps_HeapMemMP.o)
	$(COMPILE) -o ti_sdo_ipc_heaps_HeapMemMP.o

ipc.aa53fg: ti_sdo_utils_NameServer.o ti_sdo_utils_NameServerRemoteNull.o ti_sdo_utils_MultiProc.o ti_sdo_utils_List.o ti_sdo_ipc_GateMP.o ti_sdo_ipc_MessageQ.o ti_sdo_ipc_SharedRegion.o ti_sdo_ipc_ListMP.o ti_sdo_ipc_Ipc.o ti_sdo_ipc_Notify.o ti_sdo_ipc_gates_GateHWSpinlock.o ti_sdo_ipc_gates_GateMPSupportNull.o ti_sdo_ipc_notifyDrivers_NotifyDriverShm.o ti_sdo_ipc_family_am65xx_NotifySciClient.o ti_sdo_ipc_family_am65xx_NotifySetup.o ti_sdo_ipc_family_am65xx_InterruptHost.o ti_sdo_ipc_transports_TransportShm.o ti_sdo_ipc_transports_TransportShmSetup.o ti_sdo_ipc_nsremote_NameServerRemoteNotify.o ti_sdo_ipc_heaps_HeapMemMP.o
	@echo ara53fg $^ ...
	@-$(call RM, $@)
	@$(AR) $@ $^


clean:
	@-$(call RM, ipc.aa53fg)
	@-$(call RM, BIOS.o)
	@-$(call RM, ti_sdo_utils_NameServer.o)
	@-$(call RM, ti_sdo_utils_NameServerRemoteNull.o)
	@-$(call RM, ti_sdo_utils_MultiProc.o)
	@-$(call RM, ti_sdo_utils_List.o)
	@-$(call RM, ti_sdo_ipc_GateMP.o)
	@-$(call RM, ti_sdo_ipc_MessageQ.o)
	@-$(call RM, ti_sdo_ipc_SharedRegion.o)
	@-$(call RM, ti_sdo_ipc_ListMP.o)
	@-$(call RM, ti_sdo_ipc_Ipc.o)
	@-$(call RM, ti_sdo_ipc_Notify.o)
	@-$(call RM, ti_sdo_ipc_gates_GateHWSpinlock.o)
	@-$(call RM, ti_sdo_ipc_gates_GateMPSupportNull.o)
	@-$(call RM, ti_sdo_ipc_notifyDrivers_NotifyDriverShm.o)
	@-$(call RM, ti_sdo_ipc_family_am65xx_NotifySciClient.o)
	@-$(call RM, ti_sdo_ipc_family_am65xx_NotifySetup.o)
	@-$(call RM, ti_sdo_ipc_family_am65xx_InterruptHost.o)
	@-$(call RM, ti_sdo_ipc_transports_TransportShm.o)
	@-$(call RM, ti_sdo_ipc_transports_TransportShmSetup.o)
	@-$(call RM, ti_sdo_ipc_nsremote_NameServerRemoteNotify.o)
	@-$(call RM, ti_sdo_ipc_heaps_HeapMemMP.o)
