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

ifndef Behavioural
include $(DIR_MORPHEO)/Behavioural/Makefile.deps
endif
ifndef Branch_History_Table
include $(DIR_MORPHEO)/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table/Makefile.deps
endif
ifndef Pattern_History_Table
include $(DIR_MORPHEO)/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/Makefile.deps
endif
ifndef Two_Level_Branch_Predictor_Glue
include $(DIR_MORPHEO)/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/Makefile.deps
endif

Two_Level_Branch_Predictor			= yes

#-----[ 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/Stage_1_Ifetch/Predictor/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/Stage_1_Ifetch/Predictor/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/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor --makefile=Makefile clean
