kusano 2b45e8
TOPDIR	= ..
kusano 2b45e8
include ../Makefile.system
kusano 2b45e8
kusano 2b45e8
all :: level1 level2 level3
kusano 2b45e8
kusano 2b45e8
level1 : sblat1 dblat1 cblat1 zblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./dblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat1
kusano 2b45e8
ifdef SMP
kusano 2b45e8
ifeq ($(USE_OPENMP), 1)
kusano 2b45e8
	OMP_NUM_THREADS=2 ./sblat1
kusano 2b45e8
	OMP_NUM_THREADS=2 ./dblat1
kusano 2b45e8
	OMP_NUM_THREADS=2 ./cblat1
kusano 2b45e8
	OMP_NUM_THREADS=2 ./zblat1
kusano 2b45e8
else
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./sblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./dblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./cblat1
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./zblat1
kusano 2b45e8
endif
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
level2 : sblat2 dblat2 cblat2 zblat2
kusano 2b45e8
	rm -f ?BLAT2.SUMM
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat2 < ./sblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL SBLAT2.SUMM && cat SBLAT2.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./dblat2 < ./dblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL DBLAT2.SUMM && cat DBLAT2.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat2 < ./cblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL CBLAT2.SUMM && cat CBLAT2.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat2 < ./zblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL ZBLAT2.SUMM && cat ZBLAT2.SUMM || exit 0
kusano 2b45e8
ifdef SMP
kusano 2b45e8
	rm -f ?BLAT2.SUMM
kusano 2b45e8
ifeq ($(USE_OPENMP), 1)
kusano 2b45e8
	OMP_NUM_THREADS=2 ./sblat2 < ./sblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL SBLAT2.SUMM && cat SBLAT2.SUMM || exit 0
kusano 2b45e8
	OMP_NUM_THREADS=2 ./dblat2 < ./dblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL DBLAT2.SUMM && cat DBLAT2.SUMM || exit 0
kusano 2b45e8
	OMP_NUM_THREADS=2 ./cblat2 < ./cblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL CBLAT2.SUMM && cat CBLAT2.SUMM || exit 0
kusano 2b45e8
	OMP_NUM_THREADS=2 ./zblat2 < ./zblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL ZBLAT2.SUMM && cat ZBLAT2.SUMM || exit 0
kusano 2b45e8
else
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./sblat2 < ./sblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL SBLAT2.SUMM && cat SBLAT2.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./dblat2 < ./dblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL DBLAT2.SUMM && cat DBLAT2.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./cblat2 < ./cblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL CBLAT2.SUMM && cat CBLAT2.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./zblat2 < ./zblat2.dat
kusano 2b45e8
	@$(GREP) -q FATAL ZBLAT2.SUMM && cat ZBLAT2.SUMM || exit 0
kusano 2b45e8
endif
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
level3 : sblat3 dblat3 cblat3 zblat3
kusano 2b45e8
	rm -f ?BLAT3.SUMM
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat3 < ./sblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL SBLAT3.SUMM && cat SBLAT3.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./dblat3 < ./dblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL DBLAT3.SUMM && cat DBLAT3.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat3 < ./cblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL CBLAT3.SUMM && cat CBLAT3.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat3 < ./zblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL ZBLAT3.SUMM && cat ZBLAT3.SUMM || exit 0
kusano 2b45e8
ifdef SMP
kusano 2b45e8
	rm -f ?BLAT3.SUMM
kusano 2b45e8
ifeq ($(USE_OPENMP), 1)
kusano 2b45e8
	OMP_NUM_THREADS=2 ./sblat3 < ./sblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL SBLAT3.SUMM && cat SBLAT3.SUMM || exit 0
kusano 2b45e8
	OMP_NUM_THREADS=2 ./dblat3 < ./dblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL DBLAT3.SUMM && cat DBLAT3.SUMM || exit 0
kusano 2b45e8
	OMP_NUM_THREADS=2 ./cblat3 < ./cblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL CBLAT3.SUMM && cat CBLAT3.SUMM || exit 0
kusano 2b45e8
	OMP_NUM_THREADS=2 ./zblat3 < ./zblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL ZBLAT3.SUMM && cat ZBLAT3.SUMM || exit 0
kusano 2b45e8
else
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./sblat3 < ./sblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL SBLAT3.SUMM && cat SBLAT3.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./dblat3 < ./dblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL DBLAT3.SUMM && cat DBLAT3.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./cblat3 < ./cblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL CBLAT3.SUMM && cat CBLAT3.SUMM || exit 0
kusano 2b45e8
	OPENBLAS_NUM_THREADS=2 ./zblat3 < ./zblat3.dat
kusano 2b45e8
	@$(GREP) -q FATAL ZBLAT3.SUMM && cat ZBLAT3.SUMM || exit 0
kusano 2b45e8
endif
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
FLDFLAGS = $(FFLAGS:-fPIC=)
kusano 2b45e8
CEXTRALIB = 
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
sblat1 : sblat1.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o sblat1 sblat1.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
dblat1 : dblat1.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o dblat1 dblat1.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
qblat1 : qblat1.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o qblat1 qblat1.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
cblat1 : cblat1.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o cblat1 cblat1.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
zblat1 : zblat1.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o zblat1 zblat1.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
sblat2 : sblat2.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o sblat2 sblat2.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
dblat2 : dblat2.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o dblat2 dblat2.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
cblat2 : cblat2.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o cblat2 cblat2.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
zblat2 : zblat2.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o zblat2 zblat2.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
sblat3 : sblat3.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o sblat3 sblat3.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
dblat3 : dblat3.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o dblat3 dblat3.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
cblat3 : cblat3.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o cblat3 cblat3.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
zblat3 : zblat3.$(SUFFIX) ../$(LIBNAME)
kusano 2b45e8
	$(FC) $(FLDFLAGS) -o zblat3 zblat3.$(SUFFIX) ../$(LIBNAME) $(EXTRALIB) $(CEXTRALIB)
kusano 2b45e8
kusano 2b45e8
clean:
kusano 2b45e8
	@rm -f *.$(SUFFIX) *.$(PSUFFIX) gmon.$(SUFFIX)ut *.SUMM *.cxml *.exe *.pdb *.dwf \
kusano 2b45e8
	sblat1 dblat1 cblat1 zblat1 \
kusano 2b45e8
	sblat2 dblat2 cblat2 zblat2 \
kusano 2b45e8
	sblat3 dblat3 cblat3 zblat3 \
kusano 2b45e8
	sblat1p dblat1p cblat1p zblat1p \
kusano 2b45e8
	sblat2p dblat2p cblat2p zblat2p \
kusano 2b45e8
	sblat3p dblat3p cblat3p zblat3p \
kusano 2b45e8
	*.stackdump *.dll
kusano 2b45e8
kusano 2b45e8
libs:
kusano 2b45e8
kusano 2b45e8
prof:
kusano 2b45e8
kusano 2b45e8
quick :
kusano 2b45e8
	$(MAKE) -C $(TOPDIR) libs
kusano 2b45e8
kusano 2b45e8
# include ../Makefile.tail