[Nexus-developers] Makefiles and NeXus libraries

Ray Osborn ROsborn at anl.gov
Mon Jun 3 22:42:58 BST 2002


To get the new list off to a productive start, I thought I would ask for
opinions on a couple of changes I was considering posting to the CVS server.
I have finally produced a working Fortran 90 version of the API (only nine
months late), so I would like to get version 2.1.0 officially released soon.

The first change is to the component makefiles, e.g. makefile_hdf4, to add

#Edit "makefile_options" to set compiler flags
include makefile_options

The new file, "makefile_options" includes all the standard Fortran and C
compile and link options, as well as the locations of the HDF libraries and
NeXus source files.  This localizes all the site-specific information, while
preserving the flexibility of what versions to compile.  Of course, this
will become redundant when we go over to an autoconf version, but it looks
as if we should wait until we have released 2.1.0 before doing that.

The second change is to how we treat the Fortran versions.  Since the
Fortran 77 and Fortran 90 versions put the same symbols in the library, we
either have to choose which one we use in advance, or build two separate
libraries.  I think the latter makes sense, i.e., we build libNeXus.a and
libNeXus90.a.  The first will be the default version (and the only one that
C programmers need), while the second will only be built if an explicit
Makefile option is given, e.g., make f90.  Since F90 compilers are not so
universal, I think this makes more sense.

The above implies that we go back to having just libNeXus.a, not
libNeXus45.a.  We could have libNeXus4.a and libNeXus5.a if it is really
necessary to know from the name alone what has been linked, but the number
of potential permutations starts getting rather long.  I would prefer that
libNeXus.a becomes the default again (which should have both HDF4 and HDF5
linked).

Finally, I would like to simplify the test files.  I think we only need
napi4_test.c, napi5_test.c, napif_test.f, and napi_test_read.c (ignoring the
F90 one for now).  Their names will tell you what version NeXus files they
will produce, not how they were linked.  I think that file names like
hdf45_4test.c are getting too complicated for the average user (like me).
Presumably, the tester will know what he/she has linked, and will test the
appropriate files.

Any thoughts?  I will probably leave the actual posts until Wednesday, so
that Freddie is back (unless he is missing the Golden Jubilee).

Regards,
Ray
-- 
Dr Ray Osborn                Tel: +1 (630) 252-9011
Materials Science Division   Fax: +1 (630) 252-7777
Argonne National Laboratory  E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845





More information about the NeXus-developers mailing list