This paper aims at extending a novel approach based on the port-Hamiltonian formalism and able to model macro-economic systems to include a more realistic formulation of the firm (or supplier) behaviour. The firm is a profit maximising entity, naturally described in terms of a contact structure, that interconnects the markets associated to the demand and to the input factors in order to create a profit. To determine the resulting dynamics, the paper shows how to interconnect the port-Hamiltonian systems associated to each market with contact structures, i.e. how to combine power conserving interconnecting structures, namely Dirac structures (related to the Walras's Law of macro-economic), with contact structures, usually employed to describe irreversible phenomena. Beside the specific application to macro-economy, since a contact structure can be associated to a sort of "energy-based" maximisation/minimisation problem, it is also shown how to achieve such kind of interconnection via feedback control, i. e. how to shape a power-conserving interconnection to obtain a contact structure.