| 1 |
# Warning: dependences on .h files are not given. If you change |
| 2 |
# these, type "make clean; make" |
| 3 |
|
| 4 |
OBJS=check2xsf.o check_read.o xsf_write.o molecule_fix.o cube_write.o \ |
| 5 |
cell_read.o periodic_table.o basis.o super.o xplor_write.o \ |
| 6 |
pdb_write.o cell_write.o dx_write.o vasp_write.o pdb_read.o \ |
| 7 |
xyz_write.o cml_write.o fdf_write.o gpfa.o rotate.o chdiff_read.o \ |
| 8 |
esp_read.o interpolate.o line_write.o shelx_read.o shelx_write.o \ |
| 9 |
fbin_write.o ident_sym.o primitive.o ksym.o f15.o cif_write.o \ |
| 10 |
cube_read.o cif_read.o c2x2spg.o sort_atoms.o py_write.o \ |
| 11 |
xsf_read.o vasp_read.o denfmt_write.o denfmt_read.o parse.o \ |
| 12 |
dipole.o fort34_read.o crystal_read.o abinit_read.o abinit_write.o \ |
| 13 |
abinit_in_read.o fdf_read.o qe_write.o qe_read.o parity.o potential.o \ |
| 14 |
qe_rho_read.o qe_xml_read.o dict.o charge.o qe_psi_read.o print_cell.o \ |
| 15 |
bands_write.o geom_write.o xv_read.o rho_read.o tube.o ccp4_write.o \ |
| 16 |
xc.o band_process.o gcoeff_write.o wavecar_write.o bxsf_write.o \ |
| 17 |
bands_read.o xyz_read.o gcoeff_read.o elk_write.o elk_read.o \ |
| 18 |
geom_read.o npy_read.o npy_write.o file_read.o data_combine.o \ |
| 19 |
dx_read.o mol_read.o mol_write.o zones.o grad.o band_plot.o \ |
| 20 |
dos.o bravais_sc.o phonon_read.o |
| 21 |
|
| 22 |
|
| 23 |
# Recommended: -DSPGLIB |
| 24 |
|
| 25 |
# For SPGLIB (1.8.3 or greater) |
| 26 |
|
| 27 |
DEFS=-DSPGLIB |
| •28 |
CPPFLAGS+=-I. |
| 29 |
# Add "-fopenmp" to next line if the linker complains about various |
| 30 |
# missing threads |
| •31 |
LDFLAGS?=-L. |
| 32 |
LIBS=-lsymspg |
| 33 |
|
| 34 |
# To compile without SPGLIB, set all of the above to be empty |
| 35 |
|
| 36 |
#DEFS= |
| 37 |
#CPPFLAGS= |
| 38 |
#LDFLAGS= |
| 39 |
#LIBS= |
| 40 |
|
| 41 |
# Linux or MacOS / x86_64 / gcc |
| 42 |
# For better optimisation on x86_64, add -mavx2 assuming modern hardware |
| •43 |
CFLAGS?=-Wall -Wno-unused-result -O2 -g |
| 44 |
CFLAGS+=$(DEFS) |
| 45 |
|
| 46 |
# Linux / IA32 / gcc |
| 47 |
#CFLAGS=-Wall -Wno-unused-result -O -D_FILE_OFFSET_BITS=64 $(DEFS) -g |
| 48 |
# Tru64 |
| 49 |
#CFLAGS=-O -std1 |
| 50 |
# Solaris |
| 51 |
#CFLAGS=-O -xarch=native64 |
| 52 |
|
| 53 |
CC=gcc |
| 54 |
|
| 55 |
c2x: c2xsf.h $(OBJS) |
| 56 |
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o c2x $(OBJS) -lm $(LIBS) |
| 57 |
|
| 58 |
check2xsf.o: c2xsf.h |
| 59 |
|
| 60 |
bravais_sc.o: specials_sc.h |
| 61 |
|
| 62 |
# Debian likes "rm -f" |
| 63 |
clean: |
| 64 |
-rm -f c2x $(OBJS) |
| 65 |
|