If the contribution be made under a contract with the owner and for an agreed price, the lien as against him shall be for the sum so agreed upon together with the cost of any additional material or work agreed upon, otherwise, and in all cases as against others than the owner, it shall be for the reasonable value of the work done, and of the skill, material, and machinery furnished.
SDCL 44-9-6