Check local building authorities to see what permits are required, and for any regulations on materials and construction details. Identify a place on the house wall to attach a roof, depending on the size and height. Locate wall framing such as studs, rim joists and wall plates to secure the roof. Find enough sturdy framing to support the weight of the roof connection.
Install a horizontal ledger, usually a 2-by-6 or 2-by-8-board, on the wall. Use a tape measure and level to set it at the same height as the beam on the columns or posts supporting the outside edge of the roof and the same width. Remove siding if necessary to get a flat surface for the ledger. Nail it temporarily in place with a hammer and 16d framing nails. Mark the spots on the ledger for house framing, studs, wall caps or rim joists.
Drill holes through the ledger into the house framing with a power drill and 3/8-inch bit. Fasten the ledger with 1/2-inch lag bolts, driven with a ratchet wrench, long enough to penetrate any siding and sheathing and at least 1 1/2-inches into the framing. Remove the nails once the ledger is secured.
Set a pair of rafters on top of the outside roof framing, which should have an outer band the same height and width as the ledger and side bands connecting those into a frame. Nail the rafter to the roof framing, but let the tops rest lightly together. Set another pair of rafters on the house wall atop the ledger board. Fasten the bottoms of the rafters with framing nails, but let the tops rest against each other.
Slide a ridge board between the two sets of rafters from underneath. Use a level to get it level and nail the rafters to it from each side on each set of rafters. Locate wall studs along the slope of the rafters on the house wall; drill pilot holes and fasten them with lag bolts into every stud. Add a vertical support post on each end, a 2-by-4-inch board cut to fit between the bottom of the ridge board and the ledger board and top of the outer wall.