How do I figure an adjusted cost base for this?

We purchased property in 1977 and lived in house until 1987 when we separated a parcel off original property and built new home where we lived until 2017.  How do I figure an adjusted cost base for this? 

Getting started

The new home will use an ACB of the building construction cost plus any additional renovation added since built. The land will use a prorated value per square foot based on the original purchase of the lot.

The original property will have a taxable capital gain using the FMV from 1987 or 1994 if Capital Gains Election was invoked on form T664 in that year.