#############################################################
# MARTe2 Integrated Components
#############################################################

TARGET?=x86-linux
MAKEDEFAULTDIR?=$(MARTe2_DIR)/MakeDefaults

export TARGET
export MAKEDEFAULTDIR

all: core apps test
	echo  done all

apps:
	$(MAKE) -C Source/Applications/StreamHub -f Makefile.gcc

core:
	$(MAKE) -C Source/Components/Interfaces/UDPStream -f Makefile.gcc
	$(MAKE) -C Source/Components/DataSources/UDPStreamer -f Makefile.gcc
	$(MAKE) -C Source/Components/DataSources/UDPStreamerClient -f Makefile.gcc
	$(MAKE) -C Source/Components/GAMs/SineArrayGAM -f Makefile.gcc
	$(MAKE) -C Source/Components/GAMs/TimeArrayGAM -f Makefile.gcc
	$(MAKE) -C Source/Components/Interfaces/TCPLogger -f Makefile.gcc
	$(MAKE) -C Source/Components/Interfaces/DebugService -f Makefile.gcc

test:
	$(MAKE) -C Test/Components/DataSources/UDPStreamer -f Makefile.gcc
	$(MAKE) -C Test/Applications/StreamHub -f Makefile.gcc
	$(MAKE) -C Test/GTest -f Makefile.gcc
	$(MAKE) -C Test/Integration -f Makefile.gcc

clean:
	$(MAKE) -C Source/Applications/StreamHub -f Makefile.gcc clean
	$(MAKE) -C Source/Components/Interfaces/UDPStream -f Makefile.gcc clean
	$(MAKE) -C Source/Components/DataSources/UDPStreamer -f Makefile.gcc clean
	$(MAKE) -C Source/Components/DataSources/UDPStreamerClient -f Makefile.gcc clean
	$(MAKE) -C Source/Components/GAMs/SineArrayGAM -f Makefile.gcc clean
	$(MAKE) -C Source/Components/GAMs/TimeArrayGAM -f Makefile.gcc clean
	$(MAKE) -C Source/Components/Interfaces/TCPLogger -f Makefile.gcc clean
	$(MAKE) -C Source/Components/Interfaces/DebugService -f Makefile.gcc clean
	$(MAKE) -C Test/Components/DataSources/UDPStreamer -f Makefile.gcc clean
	$(MAKE) -C Test/Applications/StreamHub -f Makefile.gcc clean
	$(MAKE) -C Test/GTest -f Makefile.gcc clean
	$(MAKE) -C Test/Integration -f Makefile.gcc clean
