
128 Cal.App.3d 583 (1981)
177 Cal. Rptr. 268
LEO F. PIAZZA PAVING COMPANY, Cross-complainant and Appellant,
v.
FOUNDATION CONSTRUCTORS, INC., Cross-defendant and Respondent.
Docket No. 46613.
Court of Appeals of California, First District, Division Two.
October 6, 1981.
*586 COUNSEL
James D. Biernat and Richard B. Barrett for Cross-complainant and Appellant.
Ropers, Majeski, Kohn, Bentley, Wagner & Kane and Michael J. Brady for Cross-defendant and Respondent.
OPINION
TAYLOR, P.J.
Leo F. Piazza Paving Company (Piazza), one joint venturer on prime contract, appeals from summary judgment[1] granted to Foundation Constructors, Inc. (Foundation), a subcontractor, on Piazza's first amended cross-complaint seeking express indemnity in a personal injury action filed by Searls (Foundation's employee) against Piazza and Lew Jones (the other joint venturer). The only question on appeal is whether Piazza was a party to the express indemnity clause of the subcontract between Jones and Foundation. For the reasons set forth below, we have concluded that Piazza was not; therefore, the summary judgment must be affirmed.
The facts as set forth in Foundation's affidavits are as follows:
On June 27, 1972, Santa Clara County (County), as owner, entered into a prime contract with Jones, a joint venture, for the improvement of the Almaden Expressway. The prime contract defined the "contractor" *587 as Piazza-Jones. Subsequently, on August 2, 1972, Piazza and Jones entered into a joint venture agreement. Paragraph 2 divided the work so that Jones was to perform bid items 40 through 57, other bid items as specified and supplemental work as assigned, as well as all of the structural concrete work; Piazza was to perform the balance. Paragraph 3 provided for a division of payments so that each joint venturer was to receive payment for the items allocated by Paragraph 2.
Paragraph 4 provided that each was to hold the joint venture harmless for any and all liability or responsibility as to the bid items so divided. Each joint venturer was bound between itself and the other joint venturer to the performance of its bid items. Profits and losses were to be strictly applied between the joint venturers as if each were a single unit. Neither was entitled to share in any overall profit or the profit of the other. Paragraph 4 further provided: "Neither shall be entitled to share in any overall profit or any profit made by the other, and each Joint Venturer shall bear its own loss, if any." (Italics added.)
Paragraph 8 stated that the joint venture would carry comprehensive bodily injury and other insurance. Each joint venturer was to pay its portion of the premium in the proportion that the amount of its work bore to the total paid by the County. Each joint venturer was also to carry its own workmen's compensation insurance.
Paragraph 13 provided that within the limits prescribed by the County, each joint venturer may subcontract any particular bid items and "shall remain fully responsible therefor" (italics added).
On August 25, 1972, Jones entered into a standard form subcontract with the Foundation for the performance of prime contract item numbers 47 and 48, the furnishing and driving of concrete piling. The prime contract was incorporated by reference. The subcontract designated Jones as "contractor" and Foundation as "subcontractor." The subcontract obligated Foundation to strict conformance with the conditions of the prime contract "that are familiar to the subcontractor." Paragraph I provided that Foundation would indemnify, save harmless and defend the owner and contractor for any occurrence, fault or negligence of the subcontractor.
On May 16, 1974, Arden B. Searls, a Foundation employee, was injured when he fell from an auger at the construction site. Searls *588 instituted the underlying civil action against Piazza and Jones, individually, and as joint venturers. Pursuant to its subcontract, Foundation undertook its contractual obligations to indemnify Jones for any liability.
On October 15, 1976, Piazza filed a first amended cross-complaint for indemnity against Foundation predicated on the theory that the subcontract created a direct contractual relationship between Piazza and Foundation. Piazza alleged that it was entitled to the benefit from the express indemnity provisions, as the term "contractor," as used in paragraph I of the subcontract referred to the joint venture.
In its motion for summary judgment, Foundation urged that express contractual indemnity was owed only to Jones, who was the "contractor" specified by the terms of the subcontract. No counteraffidavits were filed,[2] and the trial court granted Foundation's motion for summary judgment.
As there are no counteraffidavits, we are relegated, therefore, to a determination of whether Foundation's affidavits are sufficiently supportive of the summary judgment (Goldstein v. Hoffman (1963) 213 Cal. App.2d 803, 810 [29 Cal. Rptr. 334].[3]
(1) In the absence of counteraffidavits, the court is required to grant a motion for summary judgment where the affidavits of the moving party satisfy the following requirements: 1) the affidavits must contain facts sufficient to entitle the moving parties to a judgment, i.e., facts establishing every element necessary to sustain a judgment; 2) the facts must be set forth with particularity, all requisite evidentiary facts must be stated, and not the ultimate facts or conclusions of law; and 3) each *589 of the affiants must show that if sworn as a witness he can testify competently to the evidentiary facts contained in the affidavit (Goldstein, supra, p. 811). (2) Neither the trial court nor the appellate court may weigh evidence (Freidberg v. Freidberg (1970) 9 Cal. App.3d 754, 763 [88 Cal. Rptr. 451]). Therefore, affidavits need only disclose evidence supporting a possible cause of action, they need not prove it (McHugh v. Howard (1958) 165 Cal. App.2d 169, 174 [331 P.2d 674]).
(3) When no affidavits are filed in opposition to a motion for summary judgment, the court is entitled to accept as true the facts alleged in the movant's affidavits, provided they are within the personal knowledge of the affiant and are facts to which he could competently testify (Beech Aircraft Corp. v. Superior Court (1976) 61 Cal. App.3d 501, 520 [132 Cal. Rptr. 541]; Kimball v. County of Santa Clara (1972) 24 Cal. App.3d 780, 784 [101 Cal. Rptr. 353]; Goldstein v. Hoffman, supra, 213 Cal. App.2d 803, 811).
(4) Where no triable issues of fact are presented, and the sole remaining question is one of law, it may appropriately be determined on a motion for summary judgment (Wilson v. Wilson (1960) 54 Cal.2d 264, 269 [5 Cal. Rptr. 317, 352 P.2d 725]; Rader v. Thrasher (1972) 22 Cal. App.3d 883, 887 [99 Cal. Rptr. 670]; Burke Concrete Accessories, Inc. v. Superior Court (1970) 8 Cal. App.3d 773, 775 [87 Cal. Rptr. 619]).
(5) In reviewing a summary judgment, we are limited to the facts shown in the affidavits and those admitted and uncontested in the pleadings. We determine only whether the facts so shown give rise to a triable issue of fact (Albertini v. Schaefer (1979) 97 Cal. App.3d 822, 828 [159 Cal. Rptr. 98]; Jacobs v. Retail Clerks Union, Local 1222 (1975) 49 Cal. App.3d 959, 966-977 [123 Cal. Rptr. 309]; Lord v. County of Marin (1963) 214 Cal. App.2d 25, 28 [29 Cal. Rptr. 248]; Dudum v. City of San Mateo (1959) 167 Cal. App.2d 593, 598 [334 P.2d 968]). (6) Further, a motion for summary judgment is addressed to the sound discretion of the trial court. In the absence of a clear showing of abuse of discretion, the judgment will not be disturbed on appeal (Brewer v. Home Owners Auto Finance Co. (1970) 10 Cal. App.3d 337, 341 [89 Cal. Rptr. 231]).
The record indicates that Foundation's affidavits included the relevant portions of depositions of its president, L.F. Cavin, its attorney, R.G. Simpson, and construction manager, J.L. Hilton, as well as Piazza's *590 president at the time of the accident, J.P. Silvestri and Piazza's project supervisor, G.A. Wynn.
Silvestri testified that the joint venture agreement with Jones explicitly segregated the duties of the joint venturer so that Piazza was responsible only for its own work. Piazza had no obligation or responsibility for the work performed by any of Jones' subcontractors. Piazza had no knowledge of, and had never seen, the subcontract executed by Jones and Foundation. Wynn indicated that he was not familiar with Foundation and had no contact with any of Foundation's employees, as they "were Jones sub and were completely under Jones supervision."
Cavin, who negotiated the subcontract for Foundation with Jones, averred that: 1) no representations were made that Jones entered the subcontract on behalf of the joint venture; 2) Piazza was not a party to the subcontract; and 3) Foundation entered no agreement with Piazza and never intended that Piazza be a party to the subcontract. Hilton confirmed Foundation's understanding that the subcontract was only with Jones.
(7a) Piazza argues that the trial court erroneously relied on the above quoted extrinsic evidence to construe the ambiguous term "contractor" as used in paragraph I of the subcontract. However, here there was no conflict in the extrinsic evidence or any indication that there was any ambiguity in the term as used in the subcontract. As Piazza failed to file any counteraffidavits, the trial court was entitled to accept Foundation's facts as true.
Here, the requisite evidentiary facts were stated with sufficient particularity to indicate that the facts are within the personal knowledge of the affiants who could competently testify to those facts if called as witnesses (Coyne v. Krempels (1950) 36 Cal.2d 257, 262 [223 P.2d 244]; Goldstein v. Hoffman, supra, 213 Cal. App.2d 803, 814).
(8) Piazza erroneously attempts to rely on its complaint to counter Foundation's affidavits in support of the motion for summary judgment. Failure to file affidavits cannot be remedied by resort to the pleadings (Coyne v. Krempels, supra, p. 263). The adverse party must file an affidavit in opposition showing sufficient facts to substantiate his allegations (McHugh v. Howard, supra, 165 Cal. App.2d 169, 174). The party opposing a motion for summary judgment has an affirmative duty to show that triable issues of fact exist (Chern v. Bank of America *591 (1976) 15 Cal.3d 866, 873 [127 Cal. Rptr. 110, 544 P.2d 1310]). As Piazza failed to do so here, Foundation's affidavits were uncontroverted.[4]
(9) As the trial court's construction of the agreements in favor of Foundation was a question of law, we are not bound by its construction (Gribaldo, Jacobs, Jones & Associates v. Agrippina Versicherunges A.G. (1970) 3 Cal.3d 434, 445-446 [91 Cal. Rptr. 6, 476 P.2d 406]). Our duty is to reexamine the instruments and to reach an independent determination of their construction and effect (Consolidated Theatres, Inc. v. Theatrical Stage Employees Union (1968) 69 Cal.2d 713, 724 [73 Cal. Rptr. 213, 447 P.2d 325]; Larsen v. Johannes (1970) 7 Cal. App.3d 491, 496 [86 Cal. Rptr. 744]).
(10) An indemnity agreement is to be construed like any other contract with a view to determining the actual intention of the parties (Gribaldo, supra, 3 Cal.3d 434, 442; Herman Christensen & Sons, Inc. v. Paris Plastering Co. (1976) 61 Cal. App.3d 237, 245 [132 Cal. Rptr. 86]; J.A. Payton v. Kuhn-Murphy, Inc. (1967) 253 Cal. App.2d 278, 281 [61 Cal. Rptr. 575]). The paramount rule governing the interpretation of contracts is to give effect to the mutual intention of the parties as it existed at the time of contracting, so far as it is ascertainable and lawful (Houge v. Ford (1955) 44 Cal.2d 706, 713 [285 P.2d 257]). The contention of the parties must, in the first instance, be derived from the language of the entire contract. Each clause is to be considered in light of all other clauses (Indenco, Inc. v. Evans (1962) 201 Cal. App.2d 369, 374 [20 Cal. Rptr. 90]). The words, phrases and sentences employed are to be construed in light of the objectives and fundamental purposes of the parties to the agreement. A contract entered into for the mutual benefit of the parties is to be interpreted so as to give effect to the main purpose of the contract and not to defeat the mutual objective of the parties (Healy Tibbitts Constr. Co. v. Employers' Surplus Lines Ins. Co. (1977) 72 Cal. App.3d 741, 748 [140 Cal. Rptr. 375, 97 A.L.R.3d 1258]).
*592 (7b) Here, each of the three documents, the subcontract, the prime contract and the joint venture agreement, when viewed individually, are not ambiguous. Piazza argues that the incorporation of the prime contract into the subcontract is the controlling factor in determining Foundation's liability to indemnify Piazza. However, a subcontract and prime contract are considered and construed as one (Holbrook v. Fazio (1948) 84 Cal. App.2d 700, 701 [191 P.2d 123]) only when documents are executed contemporaneously by the same parties (Harm v. Frasher (1960) 181 Cal. App.2d 405, 412-413 [5 Cal. Rptr. 367]).
Here, however, we are to discern and give effect to the mutual intent of the parties at the time of the execution of three agreements that were not executed contemporaneously and by different parties. Thus, Piazza's status turns upon whether: 1) Jones entered the subcontract on behalf of the joint venture; and 2) Foundation knew that Jones represented the joint venture at the time the subcontract was executed.
In order to ascertain the intent of the parties to the subcontract, all three documents must be construed so as to give effect to every part of each (Katemis v. Westerlind (1953) 120 Cal. App.2d 537, 542 [261 P.2d 553]; Hawes v. Lux (1931) 111 Cal. App. 21, 23-24 [294 P. 1080]). The intention of the parties is to be gathered from all the instruments taken together. The recitals in each may be explained or corrected by reference to any other (Hawes, supra, p. 24).
In examining the pertinent provisions of each agreement, we note that the joint venture agreement specifically provided that each venturer would "hold the Joint Venture harmless from any and all liability, ... or responsibility with respect to the bid items so divided ... as if the work of each were a single unit... each Joint Venture shall bear its own loss, if any" (italics added). The agreement also provided that each joint venturer may subcontract particular bid items provided that each venturer remain fully responsible therefor. Thus, when Jones, in an individual capacity, subsequently entered into the subcontract with Foundation, it bargained for and received an indemnity provision that protected only Jones from liability.
Thus, the present case differs significantly from J.A. Payton v. Kuhn-Murphy, Inc., supra, 253 Cal. App.2d 278. In Payton, the court was asked to interpret an indemnity provision in a subcontract signed by one of a group of joint venturers. The court concluded that the subcontractor had examined the prime contract between the owner and the joint *593 venturers and could not fail to know that "contractor," as recited in the subcontract, was comprised of joint venturers. Thus, in Payton, the subcontractor knew that his signature bound and provided a benefit to the joint venture.
Here, the subcontract recites that Foundation was familiar with the general contract. This means no more than that Foundation knew and understood the general specifications of the work which it was to perform. Viewing this provision in light of Jones' expressly limited obligations under the joint venture agreement, we hold that the term "contractor," as used in paragraph I, referred only to Jones and did not include Piazza.
The summary judgment in favor of Foundation is affirmed; the purported appeal from the order granting the motion for summary judgment is dismissed.
Miller, J., and Smith, J., concurred.
NOTES
[1]  Only the summary judgment is appealable, as the order granting the summary judgment is a nonappealable preliminary order (Code Civ. Proc., § 437c; Integral Land Corp. v. Anderson (1944) 62 Cal. App.2d 770 [145 P.2d 364]). Here, the order and the judgment were combined in a single document and the notice of appeal was taken from both. The purported appeal from the order granting the summary judgment must be dismissed.
[2]  Piazza filed only a memorandum in opposition to Foundation's motion. Code of Civil Procedure section 437c provides, so far as pertinent, that "The motion shall be supported or opposed by affidavits, declarations, admissions, answers to interrogatories, depositions and matters of which judicial notice shall be ... taken" (italics added).
[3]  As Piazza's memorandum in opposition to the motion was neither an affidavit nor a declaration, we must assume that Piazza either cannot dispute the truth of Foundation's affidavits or cannot controvert them (Seltzer v. Seltzer (1969) 276 Cal. App.2d 137, 140 [80 Cal. Rptr. 688]; International Oil & Metal Corp. v. State of California (1962) 204 Cal. App.2d 565, 570 [22 Cal. Rptr. 568]). The facts set forth in the supporting affidavits are not brought into dispute by allegations in the pleadings of the opposing party and, therefore, are undenied (Truslow v. Woodruff (1967) 252 Cal. App.2d 158, 164 [60 Cal. Rptr. 304]).
[4]  Piazza also erroneously maintains that after overruling a demurrer, the court could not entertain a subsequent motion for summary judgment. The purpose of a demurrer is to test the legal sufficiency of a pleading, not to test the evidence or other extrinsic matters (McHugh v. Howard, supra, 165 Cal. App.2d 169, 173-174). Summary judgment, on the other hand, provides a method by which, if the pleadings are not defective, the court may determine whether the triable issues apparently raised by them are real or merely the product of an adept pleading. The question, therefore, is not whether the defendant states a good defense in his answer, but whether he can show that the answer is not an attempt to use formal pleadings as a means to delay the recovery of just demands (Coyne v. Krempels, supra, 36 Cal.2d 257, 262).
