#= Makefile for dcpam/execsrc/all-in
#
# Authors::   Yasuhiro MORIKAWA, Shin-ichi Takehiro
# Version::   $Id: Makefile,v 1.10 2025/09/18 10:00:00 takepiro Exp $
# Tag Name::  $Name:  $
# Copyright:: Copyright (C) GFD Dennou Club, 2004-2025. All rights reserved.
# License::   See COPYRIGHT[link:../../COPYRIGHT]
#
######################################################################
#
#== Settings

DIRDEPTH=../..
INCLUDEFILE = $(DIRDEPTH)/Config.mk
include $(INCLUDEFILE)

TARGETS = dcpam_main_sl09
TARGETS_MPI = dcpam_main_mpi_sl09

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

######################################################################
#== Rules

all: serial mpi

include $(DIRDEPTH)/rules.make

serial: $(TARGETS)

mpi: $(TARGETS_MPI)

clean.all:
	-@$(RM) $(TARGETS) $(TARGETS_ZONAL) $(TARGETS_MPI)

dcpam_main_sl09: $(LIBSRCS) dcpam_main_sl09.f90
	  $(BINDIR)/dcpamfrt $^ -o $@

dcpam_main_mpi_sl09: $(LIBSRCS) dcpam_main_sl09.f90
	  $(BINDIR)/dcpamfrt --mpi $^ -o $@


%: %.o
	$(FC) -o $@ $+ $(SYSLDFLAGS) $(SYSLDLIBS) -L${LIBDIR} -l$(LIBNAME) $(LDLIBS) $(SYSLDFLAGS)
