# 
# $Id$
# 
# [ Description ]
# 
# Makefile
# 
# DIR_MORPHEO must be defined

Execute_loop			= yes

ifndef Behavioural
include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
endif
ifndef Read_unit
include				$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Makefile.deps
endif
ifndef Functionnal_unit
include				$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Makefile.deps
endif
ifndef Load_store_unit
include				$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/Makefile.deps
endif
ifndef Write_unit
include				$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Makefile.deps
endif
ifndef Register_unit
include				$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Makefile.deps
endif
ifndef Read_unit_to_Execution_unit
include				$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/Makefile.deps
endif
ifndef Execution_unit_to_Write_unit
include				$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/Makefile.deps
endif

#-----[ Directory ]----------------------------------------

Execute_loop_DIR		=	$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop

#-----[ Library ]------------------------------------------

Execute_loop_LIBRARY		= 	-lExecute_loop				\
					$(Behavioural_LIBRARY)			\
					$(Read_unit_LIBRARY)			\
					$(Functionnal_unit_LIBRARY)		\
					$(Load_store_unit_LIBRARY)		\
					$(Write_unit_LIBRARY)			\
					$(Register_unit_LIBRARY)		\
					$(Read_unit_to_Execution_unit_LIBRARY)	\
					$(Execution_unit_to_Write_unit_LIBRARY)	


Execute_loop_DIR_LIBRARY	=	-L$(Execute_loop_DIR)/lib			\
					$(Behavioural_DIR_LIBRARY)			\
					$(Behavioural_DIR_LIBRARY)			\
					$(Read_unit_DIR_LIBRARY)			\
					$(Functionnal_unit_DIR_LIBRARY)			\
					$(Load_store_unit_DIR_LIBRARY)			\
					$(Write_unit_DIR_LIBRARY)			\
					$(Register_unit_DIR_LIBRARY)			\
					$(Read_unit_to_Execution_unit_DIR_LIBRARY)	\
					$(Execution_unit_to_Write_unit_DIR_LIBRARY)	


#-----[ Rules ]--------------------------------------------

Execute_loop_library		:
				@\
				$(MAKE) Behavioural_library;			\
				$(MAKE) Read_unit_library;			\
				$(MAKE) Functionnal_unit_library;		\
				$(MAKE) Load_store_unit_library;		\
				$(MAKE) Write_unit_library;			\
				$(MAKE) Register_unit_library;			\
				$(MAKE) Read_unit_to_Execution_unit_library;	\
				$(MAKE) Execution_unit_to_Write_unit_library;	\
				$(MAKE) --directory=$(Execute_loop_DIR) --makefile=Makefile;

Execute_loop_library_clean	:
				@\
				$(MAKE) Behavioural_library_clean;			\
				$(MAKE) Read_unit_library_clean;			\
				$(MAKE) Functionnal_unit_library_clean;			\
				$(MAKE) Load_store_unit_library_clean;			\
				$(MAKE) Write_unit_library_clean;			\
				$(MAKE) Register_unit_library_clean;			\
				$(MAKE) Read_unit_to_Execution_unit_library_clean;	\
				$(MAKE) Execution_unit_to_Write_unit_library_clean;	\
				$(MAKE) --directory=$(Execute_loop_DIR) --makefile=Makefile clean;
