-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile.atomeye
65 lines (49 loc) · 2.22 KB
/
Makefile.atomeye
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
include Makefile.config
ifeq (${HAVE_QUIP},1)
# Override with settings from QUIP Makefiles
include Makefile.${QUIP_ARCH}
include Makefile.inc
include Makefile.rules
CFLAGS += -fPIC -DHAVE_LIBATOMS
FC = ${F77}
LD = ${LINKER}
endif
export CFLAGS
export CC
export FC
export LD
ifeq (${HAVE_QUIP},1)
ATOMEYE_LIBS = ${QUIP_ROOT}/build/${QUIP_ARCH}/libatoms.a -L${QUIP_ROOT}/build/${QUIP_ARCH} -lm -lXpm -lXext -lX11 -lpng -lz -ljpeg -lhistory -lncurses -lreadline -lcurl -L/usr/local/lib/ ${SYSLIBS}
else
ATOMEYE_LIBS = -lm -lXpm -lXext -lX11 -lpng -lz -ljpeg -lhistory -lncurses -lreadline -lcurl -L/usr/local/lib/ ${SYSLIBS}
endif
export ATOMEYE_LIBS
SUBDIRS = Timer IO Scalar VecMat Min VecMat3 Atoms AX
ALLSUBDIRS = ${SUBDIRS} A3
.PHONY: all clean subdirs cleansubdirs atomeyelib
subdirs:
for dir in ${SUBDIRS}; do \
$(MAKE) -C $$dir || exit 1; \
done
$(MAKE) -C A3 i || exit 1
cleansubdirs:
for dir in ${ALLSUBDIRS}; do \
$(MAKE) -C $$dir clean; \
done
all: subdirs
atomeyelib:
for dir in ${SUBDIRS}; do \
cp $$dir/*.h include; \
$(MAKE) -C $$dir ATOMEYE_LIB=-DATOMEYE_LIB || exit 1; \
done
$(MAKE) -C A3 ATOMEYE_LIB=-DATOMEYE_LIB atomeyelib || exit 1
clean: cleansubdirs
-rm -rf AtomEye.app
AtomEye.app: all
cp -r AtomEye.app.template AtomEye.app
cp bin/A AtomEye.app/Contents/MacOS/A
install: all
cp bin/A ${HOME}/bin
[[ -d AtomEye.app ]] && cp -r AtomEye.app /Applications
static-macosx:
$(LD) A3/A.o A3/primitives.o A3/viewport.o A3/utils.o A3/xtal_shift.o A3/info.o A3/rcut_patch.o A3/scratch.o A3/geo.o A3/LeastSquareStrain.o A3/cui.o A3/cui_AX.o -o bin/A -static-libgcc -static-libgfortran -lgfortran -lgomp -Llib -lAX -lAtoms -lVecMat3 -lVecMat -lIO -lScalar -lTimer $(QUIP_ROOT)/build/$(QUIP_ARCH)/libatoms.a -lm -L/usr/local/lib/ -L/opt/local/lib -framework Accelerate -L$(QUIP_ROOT)/FoX-4.0.3/objs.$(QUIP_ARCH)/lib -lFoX_sax -lFoX_wxml -lFoX_utils -lFoX_common -lFoX_fsys -framework Accelerate /opt/local/lib/libXpm.a /opt/local/lib/libXext.a -lX11 /opt/local/lib/libpng.a /opt/local/lib/libz.a /opt/local/lib/libjpeg.a /opt/local/lib/libhistory.a /opt/local/lib/libncurses.a /opt/local/lib/libreadline.a -lcurl /opt/local/lib/libnetcdf.a /opt/local/lib/libhdf5.a /opt/local/lib/libhdf5_hl.a