adda icon indicating copy to clipboard operation
adda copied to clipboard

Further improvement of makefiles

Open GoogleCodeExporter opened this issue 9 years ago • 7 comments

There are a few ideas:
1) It would be nice to have compilation goals like 'install' and 'dist'. So 
that it would look more standard from a GNU-point of view.
2) It is not clear whether makefiles will work if executed from a different 
directory. Should be tested.
3) Inclusion of dependencies causes make to scan some makefiles twice, 
including variable processing (e.g. in mpi/Makefile). It is logical to separate 
this two processes completely.

Original issue reported on code.google.com by yurkin on 6 Sep 2010 at 6:20

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter

It is also a good idea to change values of internal variables to lowercase to 
distinguish them from those, which are designed to be specified from outside 
(command line or environment).

Original comment by yurkin on 8 Sep 2010 at 11:32

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter

Original comment by yurkin on 10 Jun 2011 at 2:04

  • Added labels: Usability

GoogleCodeExporter avatar Aug 12 '15 07:08 GoogleCodeExporter

A related idea is to use configure scripts as was discussed in #81

myurkin avatar Sep 13 '18 08:09 myurkin

Another related idea is to create packages for ADDA (automatically compiled), for which GitHub has recently added internal support.

myurkin avatar Oct 14 '20 05:10 myurkin

A related (potential) idea is to use CMake instead of configure - not sure what is better.

myurkin avatar Nov 14 '20 09:11 myurkin

Use of CMake is a must for conveniently using other toolchains on Windows, like Intel Compiler on top of Visual Studio. If we do it ourselves, we need to:

  • change some compilation options (i.e. -QMD and -Qstd=c99 instead of -MD and -std=c99, respectively)
  • use .obj extension instead of .o for object files
  • rework specification of paths to libraries (e.g. LIB environmental variable instead of -L... flags) or give full path to libraries together with their names.
  • specify full library file name (*.lib) instead of -l... flags
  • if compiling Fortran sources, the calling names of corresponding functions from in C files need to be changed from function_ to FUNCTION (this can be made by macros) or using ISO_C_BINDING inside Fortran sources.

I have managed to perform such simulation in the simplest seq mode using a special batch file src/iw_compile.bat, but it would be hard to enable this inside the current Makefile keeping compatibility with all existing modes.

Still, I do not see any immediate value in supporting this toolchain on Windows.

myurkin avatar Mar 05 '21 07:03 myurkin

Here are minimalistic examples of CMake files to compile ADDA (seq and ocl modes) with static linking of Fortran libraries, contributed by Michel Gross. While they are definitely simpler than basic makefiles, it is still not clear, whether CMake can (and how easy) incorporate all the complexity (and various modes) of current ADDA makefiles.

cmakelists_fortran.txt CMakeLists_ocl.txt CMakeLists_adda.txt

myurkin avatar Jul 05 '24 15:07 myurkin