-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathspglib_makefile
30 lines (22 loc) · 1.04 KB
/
spglib_makefile
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
.DEFAULT:
all: get libsymspg.a
SPG_VERSION=1.9.4
SPGLIB=spglib-$(SPG_VERSION)
ifeq ($(SPG_VERSION), master)
SPG_ARCHIVE=$(SPG_VERSION).zip
else
SPG_ARCHIVE=v$(SPG_VERSION).zip
endif
OBJ = $(SPGLIB)/src/arithmetic.o $(SPGLIB)/src/cell.o $(SPGLIB)/src/debug.o $(SPGLIB)/src/delaunay.o $(SPGLIB)/src/hall_symbol.o $(SPGLIB)/src/kgrid.o \
$(SPGLIB)/src/kpoint.o $(SPGLIB)/src/mathfunc.o $(SPGLIB)/src/niggli.o $(SPGLIB)/src/pointgroup.o $(SPGLIB)/src/primitive.o \
$(SPGLIB)/src/refinement.o $(SPGLIB)/src/site_symmetry.o $(SPGLIB)/src/sitesym_database.o $(SPGLIB)/src/spacegroup.o \
$(SPGLIB)/src/spg_database.o $(SPGLIB)/src/spglib.o $(SPGLIB)/src/spin.o $(SPGLIB)/src/symmetry.o
get:
-wget -c --timeout=2 --tries=1 -nv https://github.com/atztogo/spglib/archive/v$(SPG_VERSION).zip
-unzip -qq -u $(SPG_ARCHIVE) '$(SPGLIB)/src/*' '$(SPGLIB)/example/*'
libsymspg.a: $(OBJ)
-ar -cr $(PREFIX)/lib/libsymspg.a $(OBJ)
-mkdir -p $(PREFIX)/include/spglib
-cp $(SPGLIB)/src/spglib.h $(PREFIX)/include/spglib/spglib.h
clean:
-rm -fr $(SPGLIB)