This paper presents a three–dimensional linear numerical model for the dynamic and seismic analysis of pile-supported structures that allows to represent simultaneously the structures, pile foundations, soil profile and incident seismic waves and that, therefore, takes directly into account structure–pile–soil interaction. The use of advanced Green’s functions to model the dynamic behaviour of layered soils, not only leads to a very compact representation of the problem and a simplification in the preparation of the data files (no meshes are needed for the soil), but also allows to take into account arbitrarily complex soil profiles and problems with large numbers of elements. The seismic excitation is implemented as incident planar body waves (P or S) propagating through the layered soil from an infinitely–distant source and impinging on the site with any generic angle of incidence. The response of the system is evaluated in the frequency domain, and seismic results in time domain are then obtained using the frequency–domain method through the use of the Fast Fourier Transform. An application example using a pile-supported structure is presented in order to illustrate the capabilities of the model. Piles and columns are modelled through Timoshenko beam elements, and slabs, pile caps and shear walls are modelled using shell finite elements, so that the real flexibility of all elements can be rigorously taken into account. This example is also used to explore the influence of soil profile and angle of incidence on different variables of interest in earthquake engineering.