The paper presents the optimization of the sustainable profit in the production of hall buildings. It focuses on single-story halls with either steel or timber frames. The discrete class of optimization is performed with mixed-integer nonlinear programming. The Modified Outer-Approximation/ Equality-Relaxation algorithm is used. Separate optimization models are developed for steel and timber structures, each with two different objectives: sustainable and economic profits, which are subjected to design and dimensioning constraints. The material costs of the structure are defined in detail, while the transportation, machinery and labor costs are calculated as a function of the material costs. The sustainable profit includes eco costs of global warming. A numerical example at the end of the article shows the optimization of sustainable and economic profits in the construction of a hall structure. The calculated sustainable and economic profits in the case of the steel structure are higher than the profits of the timber frame structure due to the high cost of glulam in the market. Nevertheless, the eco costs of global warming in the case of timber construction show a much smaller relative increase compared to the material costs.