Being pedantic, you should NOT be using scripts but functions for everything. So step 1 is convert everything to functions.
Or is there a method to directly convert the matlab file which calls these functions
You can do this, simply pick it as the entry point function in MATLAB Coder app and the dependencies will come along (you can choose to keep them separate or inline in settings). If you want the other functions to be valid entry points then you could add them too, but that does not seem to be the case.