It's easier than you think! But remember that ECL generates C code, and passes that (and your user compiler flags) to your CC.
In particular to accomodate ECL, asdf has a specific function for doing-what-ecl-wants which is asdf:make-build . It works reliably as documented in the ECL manual's examples, and the asdf manual. It's also possible to build by directly using ECL's extensions (that asdf:make-build uses behind the scenes - basically compile-file has the &allow-other-keys :system-p t which spits out an .o object rather than a .fas fasl.).
Consider this Makefile ("Makefile") :
https://gopher.floodgap.com/gopher/gw.lite?=tilde.institute+70+302f7e73637265777...
for this project (web proxies of source) :
https://gopher.floodgap.com/gopher/gw.lite?=tilde.institute+70+312f7e73637265777...