In order to build a two car carport from wood you need to use pressure treated lumber. The easiest way to build a carport without having to do math calculations is to attach a ledger to the side of an exterior wall using lag bolts which are bolts used to fasten wood to concrete or masonry. Then use joist hangers to hold the joists which will slope down to allow for snow and rain runoff. Joist hangers are metal casings that support the ends of joists. In this case your joists will be sloping down so you need set the ledger board that you attached to your wall at least 2-10 inches higher than the height of the posts supporting the other end.
Determine the space needed to fit both cars and mark the spots where you plan to place your posts. Ten feet from the wall should do it. Place your posts at least six feet apart. Dig a hole at least 18 inches deep. Place the posts in the holes and use a spirit level to make sure the post is perfectly vertical. Fill the hole with concrete and let it set for at least 48 hours.
Mark the spot on the exterior wall where want to place the ledger board. Remember to place it higher than the height of the posts so the joists can slope down. Bolt the ledger to the wall with lag bolts.
Attach two pieces of 2x6 running the length of the posts to the side of each post using wood screws. This will act as the beam supporting your joists.
Mark the ledger board with the desired joist spacing. Fasten the joist hangers by nailing them onto the ledger through the prefabricated holes in the joist hanger. Slide the 2x6 joist in the hanger and place a nail on each hole on the side of the hanger to secure the joist.
Cover the roof with exterior grade plywood using galvanised nails. Place a pair of h-clips in between each seam. H-clips are h shaped clips that join to pieces of plywood to give the seam extra strength.
Cover the roof with asphalt shingles working your way up the roof. Make sure you are covering the tar strip on each shingle. The tar strip is a thin strip of tar that runs along the top of the shingle so that the when heated, the tar will act as an adhesive on the shingle above it.