## Makefile (D. Strubbe May 2010)
##

PREFIX=../..
include $(PREFIX)/Common/common-rules.mk

OBJS = $(GLOBALOBJS) $(COMMON)/wfn_rho_vxc_io.o $(COMMON)/check_inversion.o $(COMMON)/sort.o

default: bgw2para

bgw2para: bgw2para$(FLAVOR).x rho2cd.x

bgw2para$(FLAVOR).x: bgw2para.o iolib.o band.o $(COMMON)/input_utils.o $(COMMON)/blas.o $(OBJS)
	$(LINK) $(FOPTS) -o $@ $^ $(LAPACKLIB)
	$(INSTALL_CMD)

rho2cd.x: rho2cd.o $(OBJS)
	$(LINK) $(FOPTS) -o $@ $^
	$(INSTALL_CMD)

bgw2para.o : $(COMMON)/wfn_rho_vxc_io_m.mod iolib_m.mod band_m.mod $(COMMON)/input_utils_m.mod
rho2cd.o : $(COMMON)/wfn_rho_vxc_io_m.mod
iolib.o iolib_m.mod : $(GLOBALMODS)
band.o band_m.mod : $(GLOBALMODS) iolib_m.mod
