#= Makefile for build of gtool5 library in UNIX like platform
#
# Authors::   Yasuhiro MORIKAWA (morikawa)
# Version::   $Id: Makefile,v 1.3 2009-03-24 03:56:10 morikawa Exp $
# Tag Name::  $Name: gtool5-20090324 $
# Copyright:: Copyright (C) GFD Dennou Club, 2004-2009. All rights reserved.
# License::   See COPYRIGHT[link:../../COPYRIGHT]
#
######################################################################
#
#== Settings

# in Config.mk, DEST_LIB, DEST_INC is defined
DIRDEPTH=../..
INCLUDEFILE = $(DIRDEPTH)/Config.mk
include $(INCLUDEFILE)

OBJS = gtool_history.o \
      historyget.o historygetattr.o \
      gtool_history_nmlinfo.o \
      gtool_historyauto.o \
      gt4_history.o \
      hscrea.o hsavar.o hsclse.o \
      hsaatc.o hsaatr.o hsaatd.o hsaati.o \
      hsp1r.o hsp2d.o hsp3d.o hsp1d.o hsp2r.o hsp3r.o 

RB2F90 = gtool_history.F90 \
	historyget.F90 historygetattr.F90 \
	gtool_historyauto.f90


# End Settings
######################################################################

######################################################################
#== Rules
#
all: $(LIBPATH) archive

include $(DIRDEPTH)/rules.make

clean: clean.src

#
#=== Files generated with ruby script
#
historyget.F90: historyget.rb2f90
	$(RUBY) $(RUBYVERCHECK) > /dev/null 2>&1 && \
	    $(RUBY) $< --histget_dim=$(MAXDIM) > $@ || \
	    touch $@

historygetattr.F90: historygetattr.rb2f90
	$(RUBY) $(RUBYVERCHECK) > /dev/null 2>&1 && \
	    $(RUBY) $< > $@ || \
	    touch $@

gtool_history.F90: gtool_history.rb2f90
	$(RUBY) $(RUBYVERCHECK) > /dev/null 2>&1 && \
	    $(RUBY) $< --histput_dim=$(MAXDIM) --histget_dim=$(MAXDIM) > $@ || \
	    touch $@

gtool_historyauto.f90: gtool_historyauto.rb2f90
	$(RUBY) $(RUBYVERCHECK) > /dev/null 2>&1 && \
	    $(RUBY) $< --histput_dim=$(MAXDIM) --histget_dim=$(MAXDIM) > $@ || \
	    touch $@

include depend
