#---------------------------------------------------------------------
#     Copyright (C) GFD Dennou Club, 2005. All rights reserved.
#---------------------------------------------------------------------
#=begin
#= Makefile for dcpam/src/shared/time
#
#   * Developers: Morikawa Yasuhiro
#   * Version: $Id: Makefile,v 1.4 2005/01/10 15:19:08 morikawa Exp $
#   * Tag Name: $Name: dcpam2-20050405 $
#   * Change History: 
#
#=end

include ../../Mkinclude

OBJS = time.o

HTML = time.htm
CSS  = ../../../rd/dcpam-rd2html.css
MAN = time.3f
TEX = time.tex
PDF = time.pdf

DEPMOD = $(MODOPT)../type $(MODOPT)../nmlfile

all: lib mod

lib: $(OBJS)
	test -d $(DEST_LIB) || install -d $(DEST_LIB)
	$(AR) $(DEST_LIB)/lib$(DCPAMLIB).a $(OBJS)

mod: $(OBJS)
	test -d $(DEST_MOD) || install -d $(DEST_MOD)
	$(INSTALL) $(MODS) $(DEST_MOD)

doc: htm man tex pdf
htm: $(HTML)
man: $(MAN)
tex: $(TEX)
pdf: $(TEX) $(PDF)

install: install-lib install-mod

install-lib:
	test -d $(INST_LIB) || install -d $(INST_LIB)
	$(AR) $(INST_LIB)/lib$(DCPAMLIB).a $(OBJS)

install-mod:
	test -d $(INST_MOD) || install -d $(INST_MOD)
	$(INSTALL) $(MODS) $(INST_MOD)

clean:
	-rm -f $(MODS) $(OBJS)

clean-doc: clean-htm clean-man clean-tex clean-pdf

clean-htm:
	-rm -f $(HTML)
clean-man:
	-rm -f $(MAN)
clean-tex:
	-rm -f $(TEX)
clean-pdf:
	-rm -f $(PDF) *.dvi *.toc *.aux *.log *.pdf

# suffixe rules(եå롼)
#
.SUFFIXES: .f90 .o

.f90.o:
	$(FC) -c $(FCOPTS) $(DEPMOD) $(MODOPT)$(GT4MODDIR) $<
