# $Id: makefile.Linux_intel,v 1.1.1.1 2004/06/26 11:21:37 yamasaki Exp $
#
.SUFFIXES:
.SUFFIXES: .o .F .f .F90 .f90 .c .mod

#----*----> for Intel Compiler
MPIHOME = /opt/intel/mpich
#F90   = $(MPIHOME)/bin/mpif90
F90 = ifort -g -O2 -traceback
#F90LD = $(MPIHOME)/bin/mpif90
F90LD = ifort -g -O2 -traceback
F77   = ifort -g -O2 -traceback
#F77   = $(MPIHOME)/bin/mpif77

FFLAG = -c -static -I$(MPIHOME)/include -w90 -w95 -W0

CPP    = /usr/bin/cpp -P -C -traditional

CC    = cc
CFLAGS = -O -DINTEL

SYSTEM  = Linux
P_FLAGS = -DLinux $(P_FLAGS0)
#P_FLAGS = -DLinux $(P_FLAGS0) -D_USE_LAPACK_
#P_FLAGS = -DLinux $(P_FLAGS0) -D_BLUGEL_SORT_
#P_FLAGS = -DLinux $(P_FLAGS0) -D_SIMPLE_SORT_


OBJECTSF90 = \
$(LOWER_MODULES) \
$(UPPER_MODULES) \
$(F_SUBROUTINES) \
$(F_OTHERSUBS)


OBJECTS = $(OBJECTSF90) $(OBJECTSF77)

$(TARGET) : $(OBJECTS)
	$(F90LD) $(OBJECTS) -o $@

$(UPPER_MODULES) $(F_SUBROUTINES):$(@:.o=.f90)


.f90.o:
	$(F90) $(FFLAG) $*.f90

.F90.o:
	$(F90) $(FFLAG) $*.F90

.f.o:
	$(F90) $(FFLAG) $*.f

.F.o:
	$(F90) $(FFLAG) $*.F

$(OBJ_INPUTPARSE):$(@:.o=.c) $(@:.o=.h)
	$(CC) $(CFLAGS) -c $(@:.o=.c)
