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

Two_Level_Branch_Predictor			= yes

ifndef Behavioural
include $(DIR_MORPHEO)/Behavioural/Makefile.deps
endif
ifndef Branch_History_Table
include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.deps
endif
ifndef Pattern_History_Table
include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.deps
endif
ifndef Two_Level_Branch_Predictor_Glue
include $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.deps
endif

#-----[ Library ]------------------------------------------
Two_Level_Branch_Predictor_LIBRARY		= 	-lTwo_Level_Branch_Predictor			\
							$(Two_Level_Branch_Predictor_Glue_LIBRARY)	\
							$(Branch_History_Table_LIBRARY)			\
							$(Pattern_History_Table_LIBRARY)		\
							$(Behavioural_LIBRARY)	

Two_Level_Branch_Predictor_DIR_LIBRARY		=	-L$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/lib	\
							$(Two_Level_Branch_Predictor_Glue_DIR_LIBRARY)	\
							$(Branch_History_Table_DIR_LIBRARY)		\
							$(Pattern_History_Table_DIR_LIBRARY)		\
							$(Behavioural_DIR_LIBRARY)

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

Two_Level_Branch_Predictor_library		: 
						@\
						$(MAKE) Behavioural_library;\
						$(MAKE) Branch_History_Table_library;\
						$(MAKE) Pattern_History_Table_library;\
						$(MAKE) Two_Level_Branch_Predictor_Glue_library;\
						$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor --makefile=Makefile ;
	
Two_Level_Branch_Predictor_library_clean	: 
						@\
						$(MAKE) Behavioural_library_clean;\
						$(MAKE) Branch_History_Table_library_clean;\
						$(MAKE) Pattern_History_Table_library_clean;\
						$(MAKE) Two_Level_Branch_Predictor_Glue_library_clean;\
						$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor --makefile=Makefile clean;
