
${CONSTITUENT}LIB :: $(${CONSTITUENT}shstamp)
	@echo "------> ${CONSTITUENT} : library ok"

$(${CONSTITUENT}arc) :: ${OBJS}
	$(lib_echo) library
	$(lib_silent) $(ar) /out:$(bin)${CONSTITUENT}.arc @<<
${OBJS}
<<
	echo "" >$(${CONSTITUENT}stamp)

$(${CONSTITUENT}shstamp) :: $(${CONSTITUENT}arc) requirements $(use_requirements) $(${CONSTITUENT}stamps)
	$(make_shlib) $(tag) ${CONSTITUENT} $(cpplinkflags) $(${CONSTITUENT}_shlibflags)
	if exist $(bin)${CONSTITUENT}.dll echo "" >$(${CONSTITUENT}shstamp)

${CONSTITUENT}clean ::
	$(cleanup_echo) #objects
	$(cleanup_silent) for %f in (${OBJS}) do if exist %f del %f
	$(cleanup_silent) if exist $(bin)${CONSTITUENT}.arc del $(bin)${CONSTITUENT}.arc
	$(cleanup_silent) if exist $(bin)${CONSTITUENT}.lib del $(bin)${CONSTITUENT}.lib
	$(cleanup_silent) if exist $(bin)${CONSTITUENT}.def del $(bin)${CONSTITUENT}.def
	$(cleanup_silent) if exist $(bin)${CONSTITUENT}.exp del $(bin)${CONSTITUENT}.exp
	$(cleanup_silent) if exist $(bin)${CONSTITUENT}.dll del $(bin)${CONSTITUENT}.dll
	$(cleanup_silent) if exist $(bin)${CONSTITUENT}.pdb del $(bin)${CONSTITUENT}.pdb


install_dir = $(CMTINSTALLAREA)\$(tag)\lib
${CONSTITUENT}installlibname = $(library_prefix)${CONSTITUENT}$(library_suffix).lib
${CONSTITUENT}installdllname = $(library_prefix)${CONSTITUENT}$(library_suffix).dll
${CONSTITUENT}installpdbname = $(library_prefix)${CONSTITUENT}$(library_suffix).pdb

${CONSTITUENT} :: ${CONSTITUENT}install

install :: ${CONSTITUENT}install

!IF "$(vsCONFIG)" == "Debug" 
${CONSTITUENT}install :: $(${CONSTITUENT}shstamp) $(install_dir)\$(${CONSTITUENT}installlibname) $(install_dir)\$(${CONSTITUENT}installdllname) $(install_dir)\$(${CONSTITUENT}installpdbname)
	@if NOT "$(CMTINSTALLAREA)"=="" echo "installation done"

!ELSE

${CONSTITUENT}install :: $(${CONSTITUENT}shstamp) $(install_dir)\$(${CONSTITUENT}installlibname) $(install_dir)\$(${CONSTITUENT}installdllname)
	@if NOT "$(CMTINSTALLAREA)"=="" echo "installation done"
!ENDIF

$(install_dir)\$(${CONSTITUENT}installlibname) :: $(bin)$(${CONSTITUENT}installlibname)
	@if NOT "$(CMTINSTALLAREA)"=="" $(cmt_install_action) "$(PACKAGE_ROOT)\$(tag)" "$(${CONSTITUENT}installlibname)" "$(install_dir)"

$(install_dir)\$(${CONSTITUENT}installdllname) :: $(bin)$(${CONSTITUENT}installdllname)
	@if NOT "$(CMTINSTALLAREA)"=="" $(cmt_install_action) "$(PACKAGE_ROOT)\$(tag)" "$(${CONSTITUENT}installdllname)" "$(install_dir)"

$(install_dir)\$(${CONSTITUENT}installpdbname) :: $(bin)$(${CONSTITUENT}installpdbname)
	@if NOT "$(CMTINSTALLAREA)"=="" $(cmt_install_action) "$(PACKAGE_ROOT)\$(tag)" "$(${CONSTITUENT}installpdbname)" "$(install_dir)"

${CONSTITUENT}clean :: ${CONSTITUENT}uninstall

uninstall :: ${CONSTITUENT}uninstall

${CONSTITUENT}uninstall ::
	@if NOT "$(CMTINSTALLAREA)"=="" $(cmt_uninstall_action) "$(PACKAGE_ROOT)\$(tag)" "$(${CONSTITUENT}installlibname)" "$(install_dir)"
	@if NOT "$(CMTINSTALLAREA)"=="" $(cmt_uninstall_action) "$(PACKAGE_ROOT)\$(tag)" "$(${CONSTITUENT}installdllname)" "$(install_dir)"




