#-----[ Variable ]-----------------------------------------
DIR_LIB				= lib
DIR_TEST			= SelfTest

OBJECTS				= $(OBJECTS_COMMON)

#-----[ Directory ]----------------------------------------
.PRECIOUS			: $(DIR_LIB)/%.a
.NOPARALLEL			: clean help

all_component			: test_env $(DIR_OBJ) $(DIR_LIB) $(OBJECTS) $(HEADERS)
				@$(MAKE) $(LIBRARY)

$(DIR_LIB)/%.a			: $(OBJECTS) $(HEADERS)
				@$(ECHO) "Archive            : $*"
				@$(AR)  -r $@ $(OBJECTS)
				@$(RANLIB) $@

$(DIR_LIB)			:
				@$(ECHO) "Create directory   : $@"
				@$(MKDIR) $@

component_clean			:
				@$(RM) $(DIR_LIB)
				
component_help			:
				@$(ECHO) " -----[ Component ]----------------------------------"
				@$(ECHO) ""
				@$(ECHO) " * all_component        : compile all c++ file and generate library"
				@$(ECHO) " * clean                : Erase all generate files"
				@$(ECHO) " * help                 : print this text"
				@$(ECHO) ""
				

help				: 
				@$(MAKE) common_help
				@$(MAKE) component_help
clean				: 
				@$(MAKE) common_clean 
				@$(MAKE) component_clean

