I don't know if this helps you, but this was my batch file for windows to compile pak64. I don't use it anymore, because I've made my own pak64 with its own directory structure, but it used to work until a year ago. I know you are on a different operating system, but you will get the meaning, I think. It was called makeobj64.bat, but I can't attach *.bat files...
It expects the following directory structure:
install (with this batch file and makeobj.exe in it)
install\pak64.combuijs (empty directory)
pak64 (with the whole source of pak64)
After running the batch file, you move the pak64.combuijs directory to your simutrans directory (the one with simutrans.exe in it). It worked for me, I hope you can make it work for you!