File: Makefile

package info (click to toggle)
c2x 2.42.a%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,368 kB
  • sloc: ansic: 29,412; makefile: 61; sh: 1
file content (65 lines) | stat: -rw-r--r-- 2,082 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
# Warning: dependences on .h files are not given. If you change
# these, type "make clean; make"

OBJS=check2xsf.o check_read.o xsf_write.o molecule_fix.o cube_write.o \
     cell_read.o periodic_table.o basis.o super.o xplor_write.o \
     pdb_write.o cell_write.o dx_write.o vasp_write.o pdb_read.o \
     xyz_write.o cml_write.o fdf_write.o gpfa.o rotate.o chdiff_read.o \
     esp_read.o interpolate.o line_write.o shelx_read.o shelx_write.o \
     fbin_write.o ident_sym.o primitive.o ksym.o f15.o cif_write.o \
     cube_read.o cif_read.o c2x2spg.o sort_atoms.o py_write.o \
     xsf_read.o vasp_read.o denfmt_write.o denfmt_read.o parse.o \
     dipole.o fort34_read.o crystal_read.o abinit_read.o abinit_write.o \
     abinit_in_read.o fdf_read.o qe_write.o qe_read.o parity.o potential.o \
     qe_rho_read.o qe_xml_read.o dict.o charge.o qe_psi_read.o print_cell.o \
     bands_write.o geom_write.o xv_read.o rho_read.o tube.o ccp4_write.o \
     xc.o band_process.o gcoeff_write.o wavecar_write.o bxsf_write.o \
     bands_read.o xyz_read.o gcoeff_read.o elk_write.o elk_read.o \
     geom_read.o npy_read.o npy_write.o file_read.o data_combine.o \
     dx_read.o mol_read.o mol_write.o zones.o grad.o band_plot.o \
     dos.o bravais_sc.o phonon_read.o


# Recommended: -DSPGLIB

# For SPGLIB (1.8.3 or greater)

DEFS=-DSPGLIB
CPPFLAGS+=-I.
# Add "-fopenmp" to next line if the linker complains about various
# missing threads
LDFLAGS?=-L.
LIBS=-lsymspg

# To compile without SPGLIB, set all of the above to be empty

#DEFS=
#CPPFLAGS=
#LDFLAGS=
#LIBS=

# Linux or MacOS / x86_64 / gcc
# For better optimisation on x86_64, add -mavx2 assuming modern hardware
CFLAGS?=-Wall -Wno-unused-result -O2 -g
CFLAGS+=$(DEFS)

# Linux / IA32 / gcc
#CFLAGS=-Wall -Wno-unused-result -O -D_FILE_OFFSET_BITS=64 $(DEFS) -g
# Tru64
#CFLAGS=-O -std1
# Solaris
#CFLAGS=-O -xarch=native64

CC=gcc

c2x: c2xsf.h $(OBJS)
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o  c2x $(OBJS) -lm $(LIBS)

check2xsf.o: c2xsf.h

bravais_sc.o: specials_sc.h

# Debian likes "rm -f"
clean:
	-rm -f c2x $(OBJS)