Compliling multiple Haxe code files to Emscripten via javascript

Emscripten is only a toolchain to go from llvm to js/web assembly, you don’t target it.

So I think you mean you want to target web assembly?

In that case yes you need to use hxcpp and emscripten to do that.
https://groups.google.com/d/msg/haxelang/Pcm38LPFjW0/Q3-WXk2oBQAJ has some steps to show how to do that, though it might be a little outdated.
See Build a .wasm Class using WebAssembly for some more information.