# É½Âê: arare ÍÑ Makefile
#
# ÍúÎò: 2005-04-10 ¿ù»³¹Ì°ìÏ¯
#       2005-09-05 ¾®¹âÀµ»Ì

include ../../Mkinclude

.SUFFIXES: .o .f90

OBJS = \
	arare.o \
	init.o \
	randomset.o

all: arare init randomset

arare: $(OBJS) 
	$(FC) arare.o 	-o arare \
	-L$(LIBDIR) -l$(LIBNAME) \
	-I$(MODDIR) -I$(GTOOLMODDIR) \
	-L$(GTOOLLIBDIR) -l$(GTOOLLIB) \
	-L$(NETCDFLIBDIR) -l$(NETCDFLIB) \
	-L$(LAPACKLIBDIR) -l$(LAPACKLIB) \

init: $(OBJS)
	$(FC) init.o 	-o arare-init \
	-L$(LIBDIR) -l$(LIBNAME) \
	-I$(MODDIR) -I$(GTOOLMODDIR) \
	-L$(GTOOLLIBDIR) -l$(GTOOLLIB) \
	-L$(NETCDFLIBDIR) -l$(NETCDFLIB) \
	-L$(LAPACKLIBDIR) -l$(LAPACKLIB) \

randomset:
	$(FC) randomset.f90 -o randomset \
	-L$(LIBDIR) -l$(LIBNAME) \
	-I$(MODDIR) -I$(GTOOLMODDIR) \
	-L$(GTOOLLIBDIR) -l$(GTOOLLIB) \
	-L$(NETCDFLIBDIR) -l$(NETCDFLIB) \
	-L$(LAPACKLIBDIR) -l$(LAPACKLIB) \

$(OBJS): %.o: %.f90
	$(FC) -c $<  -I$(GTOOLMODDIR) -I$(MODDIR)

clean:
	$(RM) *.o arare arare-init randomset
