The source code I am working with was originally written for the Intel Fortran compiler so it has preprocessor directives such as
!DEC$ATTRIBUTES DLLEXPORT::MYDLL
!DEC$ATTRIBUTES STDCALL::MYSUBROUTINE
!DEC$ATTRIBUTES ALIAS: 'MYENTRYPOINT'::MYSUBROUTINE
How do I convert this to work with gfortran.
Mainly I want to be able to define and name entry points. Right now when I compile with gfortran every subroutine gets exposed as an entry point. Also the entry point name are all lower case with a underscore at the end.
GFortran supports some attributes, see
http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html#GNU-Fortran-Compiler-Directives
For changing the symbol name, you can use the bind(C, name=) specifier of ISO_C_BINDING, see e.g.
http://gcc.gnu.org/onlinedocs/gfortran/Interoperable-Subroutines-and-Functions.html#Interoperable-Subroutines-and-Functions
http://gcc.gnu.org/onlinedocs/gfortran/Interoperable-Global-Variables.html#Interoperable-Global-Variables