#                           $Id: makefile,v 1.2 2004/06/26 12:09:26 yamasaki Exp $
P_FLAGS0  = -DVDB
LOWER_MODULES = m_Const_Parameters.o m_ArraySize_Parameters.o

UPPER_MODULES =  m_Control_Parameters.o  m_Charge_File.o  m_Files.o   m_Timing.o\
m_Crystal_Structure.o       m_FFT.o              m_Kpoints.o\
m_PlaneWaveBasisSet.o  m_Electronic_Structure.o 

F_SUBROUTINES = Initialization.o      InputData_Analysis.o \
Preparation.o  rd_WFs_doFFT_and_solve_eq.o  Finalization.o \
miscellaneous.o 

F_OTHERSUBS   = stm_main.o bottom_Subroutines.o

FFT           = jrcat_ft_stm.o

OBJECTSF77 =  decfft_ent.o

TARGET   = stm

default:
	@${MAKE} -f makefile `uname -s`

SunOS sun:
	@echo Making for the architecture `uname -s`
	@${MAKE} -f makefile.`uname -s`\
		LOWER_MODULES="${LOWER_MODULES}" UPPER_MODULES="${UPPER_MODULES}"\
		F_SUBROUTINES="${F_SUBROUTINES}" F_OTHERSUBS="${F_OTHERSUBS}"\
		OBJECTSF77="${OBJECTSF77} ${FFT}" TARGET="${TARGET}"\
		P_FLAGS0="${P_FLAGS0}"

OSF1 dec:
	@echo Making for the architecture `uname -s`
	@${MAKE} -f makefile.`uname -s`\
		LOWER_MODULES="${LOWER_MODULES}" UPPER_MODULES="${UPPER_MODULES}"\
		F_OTHERSUBS="${F_OTHERSUBS}" F_SUBROUTINES="${F_SUBROUTINES}"\
		OBJECTSF77="${OBJECTSFFT} ${FFT}" TARGET="${TARGET}"\
		P_FLAGS0="${P_FLAGS0}"

UNIX_System_V vpp:
	echo Making for the architecture `uname -s`
	/usr/ccs/bin/make -f makefile.UNIX_System_V\
		LOWER_MODULES="${LOWER_MODULES}" UPPER_MODULES="${UPPER_MODULES}"\
		F_SUBROUTINES="${F_SUBROUTINES}" F_OTHERSUBS="${F_OTHERSUBS}"\
		OBJECTSF77="${OBJECTSFFT} ${FFT}" TARGET="${TARGET}"\
		P_FLAGS0="${P_FLAGS0}"

Linux_intel intel INTEL ifc intel32:
	@echo Making for the architecture `uname -s`
	${MAKE} -f makefile.`uname -s`_intel \
		LOWER_MODULES="${LOWER_MODULES}" UPPER_MODULES="${UPPER_MODULES}" \
		F_SUBROUTINES="${F_SUBROUTINES}" F_OTHERSUBS="${F_OTHERSUBS}" \
		OBJECTSF77="${OBJECTSFFT} ${FFT}" TARGET="${TARGET}" \
		P_FLAGS0="${P_FLAGS0}"

Linux_intel2 intel2 INTEL2 ifort:
	@echo Making for the architecture `uname -s`
	${MAKE} -f makefile.`uname -s`_intel2 \
		LOWER_MODULES="${LOWER_MODULES}" UPPER_MODULES="${UPPER_MODULES}" \
		F_SUBROUTINES="${F_SUBROUTINES}" F_OTHERSUBS="${F_OTHERSUBS}" \
		OBJECTSF77="${OBJECTSFFT} ${FFT}" TARGET="${TARGET}" \
		P_FLAGS0="${P_FLAGS0}"

clean:
	\rm -f ${LOWER_MODULES} ${UPPER_MODULES} ${F_SUBROUTINES} ${F_OTHERSUBS}  *.mod ${TARGET}

install:
	mv ${TARGET} ../bin/

