# 表題: arare 用 Makefile
#
# 履歴: 2005-01-28 杉山耕一朗
#     : 2005-01-31 小高正嗣
#     : 2006-09-12 小高正嗣

include ../../Mkinclude

.SUFFIXES: .f90 .o 

CSS = ../../$(CSSDIR)

OBJS = \
	debugset.o \
	fileset.o \
	timeset.o \
	gridset.o \
	basicset.o \
	storeset.o 

MAIN =  test-setup.o

all: $(OBJS) 
	$(RUNLIB) $(LIBDIR)/lib$(LIBNAME).a ./*.o ; \
	$(CP) ./*.mod  $(MODDIR); \

test: $(OBJS) $(MAIN) 
	$(FC) $(OBJS) $(MAIN) -o test  \
	-L$(LIBDIR) -l$(LIBNAME) \
	-I$(MODDIR) -I$(GTOOLMODDIR) \
	-L$(GTOOLLIBDIR) -l$(GTOOLLIB) \
	-L$(NETCDFLIBDIR) -l$(NETCDFLIB) \

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

clean: 
	-$(RM) *.o *.mod 

clean.test: clean
	-$(RM) test *~
