We present a reliable simulation strategy for estimating the surface tension, the work of adhesion, and all related macroscopic work functions of fluid/vacuum and fluid/solid interfaces, directly from the atomic-level stresses in the system. Our methodology employs efficient algorithms (developed here and from the literature) for fast and reliable simulations of high molar mass polymer melts and is applied to the well-tested molten polyethylene/graphite interface, as well to the free surface of molten polyethylene, using a united atom model for the polymer. The surface thermodynamic properties are obtained for a broad range of molar masses and temperatures and are compared to experimental data, theoretical models, and earlier simulation studies. The individual components of the stress tensor are isolated, and their profiles along the aperiodic dimension are correlated to the orientational and structural features of the polymer chains near the interfaces. The distributions of end segments in free and capped polymer films are obtained for various temperatures and molar masses. The simulation procedure, the adequacy of the models employed for the stress tensor, and the tail corrections to surface thermodynamic properties as well as subtle issues arising in simulations of polymer/solid interfaces are discussed in detail.