File: INSTALL

package info (click to toggle)
c2x 2.35a%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,020 kB
  • sloc: ansic: 19,816; makefile: 54; sh: 1
file content (92 lines) | stat: -rw-r--r-- 2,716 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
This version of c2x is intended to be built with spglib
( https://github.com/atztogo/spglib/releases ).
It has been tested with spglib 1.9.9 and 1.12.2.

The build of c2x itself is controlled by its Makefile. This can be edited,
and then one simply types "make" and the result should be an
executable in the current directory.

There are three options for spglib

1/ Compile without it. Not really recommended, as c2x will lose
some functionality. For this simply do not define SPGLIB in the
makefile (i.e. comment out references to "-DSPGLIB").

2/ Use a pre-installed system spglib. It should not be
necessary to set CPPFLAGS and LDFLAGS, for presumably the relevant
header files and library files will be found automatically.

3/ Download and compile your own version of SPGLIB. This is how
c2x is developed. In this case one needs to build a static
version of the spglib library. For some versions of spglib this can
be achieved with

./configure --disable-shared ; make

Further notes on compiling spglib can be found at the end of this
file.

The only two files from spglib that c2x needs to build are
spglib.h and libsymspg.a. One approach is to copy them from the spglib
build tree to the c2x build tree (they are probably found as
src/spglib.h and src/.libs/libsymspg.a after a building spglib, and
then set

CPPFLAGS=-I.
LDFLAGS=-L.

otherwise replace the above two dots with the path to the directory
containing the include file and the library respectively.


C2x itself should build straightforwardly with an ANSI C compiler.

If one wishes to validate one's build of c2x, a basic test suite is
available at www.c2x.org.uk.

MJR 1/2017, 2/2019


Further notes on compiling spglib
=================================

With aclocal / autotools
------------------------

The following recipe worked with spglib 1.9.9, 1.10.3 and 1.11.2.

curl -o spglib.zip https://codeload.github.com/atztogo/spglib/zip/master
unzip spglib.zip 
cd spglib-master
aclocal
autoheader
libtoolize
touch INSTALL NEWS README AUTHORS
automake -acf
autoconf
./configure --disable-shared
make

Then

cp src/spglib.h src/.libs/libsymspg.a [c2x build directory]

allows one to build with the makefile as supplied.

Without aclocal / autotools
---------------------------

If you lack aclocal / autoheader / etc., which is likely to be the case
if you are using MacOS, then the following recipe might also work.
It has been tested with spglib 1.9.9, 1.10.3 and 1.12.2.

curl -o spglib.zip https://codeload.github.com/atztogo/spglib/zip/master
unzip spglib.zip 
cd spglib-master/src
cp [c2x build directory]/Makefile.spglib Makefile
[if using spglib 1.9.9 comment out MORE_OBJS line]
make
cp spglib.h libsymspg.a [c2x build directory]