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

Write_unit			= yes

ifndef Behavioural
include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
endif
ifndef Write_queue
include 			$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/Makefile.deps
endif
ifndef Execute_queue
include 			$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.deps
endif

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

Write_unit_DIR			=	$(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit

#-----[ Library ]------------------------------------------
Write_unit_LIBRARY		= 	-lWrite_unit		\
					$(Behavioural_LIBRARY)	\
					$(Write_queue_LIBRARY)	\
					$(Execute_queue_LIBRARY)

Write_unit_DIR_LIBRARY		=	-L$(Write_unit_DIR)/lib		\
					$(Behavioural_DIR_LIBRARY)	\
					$(Write_queue_DIR_LIBRARY)	\
					$(Execute_queue_DIR_LIBRARY)

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

Write_unit_library		:
				@\
				$(MAKE) Behavioural_library;		\
				$(MAKE) Write_queue_library;		\
				$(MAKE) Execute_queue_library;		\
				$(MAKE) --directory=$(Write_unit_DIR) --makefile=Makefile;

Write_unit_library_clean	:
				@\
				$(MAKE) Behavioural_library_clean;	\
				$(MAKE) Write_queue_library_clean;	\
				$(MAKE) Execute_queue_library_clean;	\
				$(MAKE) --directory=$(Write_unit_DIR) --makefile=Makefile clean;
