Makefile 1.85 KB
Newer Older
1 2 3
# Makefile for  KS_Solvers
sinclude ../make.inc

4 5 6 7 8 9 10
# the following directive prevents execution of this makefiile in parallel
# Problem is, libks_solvers.a depends upon all libdavid libcg etc, but if
# those dependencies are added explicitly to libks_solvers.a, the library
# is relinked every time, forcing relinking of many executables; if not, 
# parallel make may execute libks_solvers.a before all other lib* complete 
.NOTPARALLEL :

11 12
default: all

13
all: libdavid_rci libdavid libcg libppcg libparo libnewsolver libks_solvers.a
14

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
ALLOBJS = \
Davidson/david_param.o \
Davidson/cegterg.o \
Davidson/regterg.o \
Davidson_RCI/david_rci.o \
CG/cg_param.o \
CG/ccgdiagg.o \
CG/rcgdiagg.o \
CG/rotate_wfc_gamma.o \
CG/rotate_wfc_k.o \
PPCG/ppcg_param.o \
PPCG/ppcg_gamma.o \
PPCG/ppcg_k.o
# add here other objects, e.g. ParO/*.o NewSolver/*.o

libks_solvers.a: $(ALLOBJS)
31
	$(AR) $(ARFLAGS) $@ $?
32
	$(RANLIB) $@
33 34 35

libdavid_rci : 
	if test -d Davidson_RCI ; then \
36
	( cd Davidson_RCI ; $(MAKE) all || exit 1 ) ; fi
37 38 39

libdavid : 
	if test -d Davidson ; then \
40
        ( cd Davidson ; $(MAKE) all || exit 1 ) ; fi
41 42 43

libcg : 
	if test -d CG ; then \
44
        ( cd CG ; $(MAKE) all || exit 1 ) ; fi
45 46 47

libppcg : 
	if test -d PPCG ; then \
48
        ( cd PPCG ; $(MAKE) all || exit 1 ) ; fi
49 50 51

libparo : 
	if test -d ParO ; then \
52
        ( cd ParO ; $(MAKE) all || exit 1 ) ; fi
53 54 55

libnewsolver : 
	if test -d NewSolver ; then \
56
        ( cd NewSolver ; $(MAKE) all || exit 1 ) ; fi
57 58 59 60 61 62 63 64 65 66

clean : 
	if test -d Davidson_RCI ; then ( cd Davidson_RCI ; $(MAKE) clean ) ; fi
	if test -d Davidson     ; then ( cd Davidson ; $(MAKE) clean ) ; fi
	if test -d CG           ; then ( cd CG ; $(MAKE) clean ) ; fi
	if test -d PPCG         ; then ( cd PPCG ; $(MAKE) clean ) ; fi
	if test -d ParO         ; then ( cd ParO ; $(MAKE) clean ) ; fi
	if test -d NewSolver    ; then ( cd NewSolver ; $(MAKE) clean ) ; fi
	rm -f libks_solvers.a