kusano 2b45e8
ifdef TARGET_CORE
kusano 2b45e8
TARGET = $(TARGET_CORE)
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
TOPDIR	= ..
kusano 2b45e8
include $(TOPDIR)/Makefile.system
kusano 2b45e8
kusano 2b45e8
ifdef TARGET_CORE
kusano 2b45e8
CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE)
kusano 2b45e8
BUILD_KERNEL = 1
kusano 2b45e8
KDIR =
kusano 2b45e8
TSUFFIX = _$(TARGET_CORE)
kusano 2b45e8
else
kusano 2b45e8
TARGET_CORE = $(CORE)
kusano 2b45e8
KDIR =
kusano 2b45e8
TSUFFIX =
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
-include $(KERNELDIR)/KERNEL.$(TARGET_CORE)
kusano 2b45e8
kusano 2b45e8
include $(KERNELDIR)/KERNEL
kusano 2b45e8
kusano 2b45e8
include Makefile.L1
kusano 2b45e8
kusano 2b45e8
include Makefile.L2
kusano 2b45e8
kusano 2b45e8
include Makefile.L3
kusano 2b45e8
kusano 2b45e8
include Makefile.LA
kusano 2b45e8
kusano 2b45e8
HPLOBJS = \
kusano 2b45e8
	dgemm_kernel.$(SUFFIX) \
kusano 2b45e8
	$(DGEMMINCOPYOBJ) $(DGEMMITCOPYOBJ) \
kusano 2b45e8
	$(DGEMMONCOPYOBJ) $(DGEMMOTCOPYOBJ) \
kusano 2b45e8
	dtrsm_kernel_LN.$(SUFFIX) dtrsm_kernel_LT.$(SUFFIX) \
kusano 2b45e8
	dtrsm_kernel_RN.$(SUFFIX) dtrsm_kernel_RT.$(SUFFIX) \
kusano 2b45e8
	daxpy_k.$(SUFFIX) dcopy_k.$(SUFFIX) ddot_k.$(SUFFIX) \
kusano 2b45e8
	dger_k.$(SUFFIX)  dscal_k.$(SUFFIX) idamax_k.$(SUFFIX) \
kusano 2b45e8
	dgemv_n.$(SUFFIX) dgemv_t.$(SUFFIX) dgemm_beta.$(SUFFIX) \
kusano 2b45e8
	dtrsm_iunucopy.$(SUFFIX) dtrsm_iunncopy.$(SUFFIX) \
kusano 2b45e8
	dtrsm_ilnucopy.$(SUFFIX) dtrsm_ilnncopy.$(SUFFIX) \
kusano 2b45e8
	dtrsm_iutucopy.$(SUFFIX) dtrsm_iutncopy.$(SUFFIX) \
kusano 2b45e8
	dtrsm_iltucopy.$(SUFFIX) dtrsm_iltncopy.$(SUFFIX) \
kusano 2b45e8
	dtrsm_ounucopy.$(SUFFIX) dtrsm_ounncopy.$(SUFFIX) \
kusano 2b45e8
	dtrsm_olnucopy.$(SUFFIX) dtrsm_olnncopy.$(SUFFIX) \
kusano 2b45e8
	dtrsm_outucopy.$(SUFFIX) dtrsm_outncopy.$(SUFFIX) \
kusano 2b45e8
	dtrsm_oltucopy.$(SUFFIX) dtrsm_oltncopy.$(SUFFIX)
kusano 2b45e8
kusano 2b45e8
COMMONOBJS	+= lsame.$(SUFFIX) scabs1.$(SUFFIX) dcabs1.$(SUFFIX)
kusano 2b45e8
kusano 2b45e8
ifdef DYNAMIC_ARCH
kusano 2b45e8
SBLASOBJS	+= setparam$(TSUFFIX).$(SUFFIX)
kusano 2b45e8
CCOMMON_OPT	+= -DTS=$(TSUFFIX)
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
KERNEL_INTERFACE = ../common_level1.h ../common_level2.h ../common_level3.h 
kusano 2b45e8
ifneq ($(NO_LAPACK), 1)
kusano 2b45e8
KERNEL_INTERFACE += ../common_lapack.h 
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
ifeq ($(ARCH), x86)
kusano 2b45e8
COMMONOBJS	+= cpuid.$(SUFFIX)
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
ifdef EXPRECISION
kusano 2b45e8
COMMONOBJS	+= qconjg.$(SUFFIX) qcabs1.$(SUFFIX)
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
ifdef QUAD_PRECISION
kusano 2b45e8
COMMONOBJS	+= qconjg.$(SUFFIX) qcabs1.$(SUFFIX)
kusano 2b45e8
endif
kusano 2b45e8
kusano 2b45e8
all : libs
kusano 2b45e8
kusano 2b45e8
scabs1.$(SUFFIX): $(KERNELDIR)/$(SCABS_KERNEL)
kusano 2b45e8
	$(CC) -c $(CFLAGS) -DCOMPLEX -UDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
dcabs1.$(SUFFIX): $(KERNELDIR)/$(DCABS_KERNEL)
kusano 2b45e8
	$(CC) -c $(CFLAGS) -DCOMPLEX -DDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
qcabs1.$(SUFFIX): $(KERNELDIR)/$(QCABS_KERNEL)
kusano 2b45e8
	$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
qconjg.$(SUFFIX): $(KERNELDIR)/qconjg.S
kusano 2b45e8
	$(CC) -c $(CFLAGS) -DCOMPLEX -DXDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
lsame.$(SUFFIX): $(KERNELDIR)/$(LSAME_KERNEL)
kusano 2b45e8
	$(CC) -c $(CFLAGS) -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
setparam$(TSUFFIX).$(SUFFIX): setparam$(TSUFFIX).c kernel$(TSUFFIX).h
kusano 2b45e8
	$(CC) -c $(CFLAGS) $< -o $@
kusano 2b45e8
kusano 2b45e8
setparam$(TSUFFIX).c : setparam-ref.c
kusano 2b45e8
	sed 's/TS/$(TSUFFIX)/g' $< > $(@F)
kusano 2b45e8
kusano 2b45e8
kernel$(TSUFFIX).h : $(KERNEL_INTERFACE) 
kusano 2b45e8
	sed 's/\ *(/$(TSUFFIX)(/g' $^ > $(@F)
kusano 2b45e8
kusano 2b45e8
kusano 2b45e8
cpuid.$(SUFFIX): $(KERNELDIR)/cpuid.S
kusano 2b45e8
	$(CC) -c $(CFLAGS) $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
scabs1.$(PSUFFIX): $(KERNELDIR)/$(SCABS_KERNEL)
kusano 2b45e8
	$(CC) -c $(PFLAGS) -DCOMPLEX -UDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
dcabs1.$(PSUFFIX): $(KERNELDIR)/$(DCABS_KERNEL)
kusano 2b45e8
	$(CC) -c $(PFLAGS) -DCOMPLEX -DDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
qcabs1.$(PSUFFIX): $(KERNELDIR)/$(QCABS_KERNEL)
kusano 2b45e8
	$(CC) -c $(PFLAGS) -DCOMPLEX -DXDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
qconjg.$(PSUFFIX): $(KERNELDIR)/qconjg.S
kusano 2b45e8
	$(CC) -c $(PFLAGS) -DCOMPLEX -DXDOUBLE -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
lsame.$(PSUFFIX): $(KERNELDIR)/$(LSAME_KERNEL)
kusano 2b45e8
	$(CC) -c $(PFLAGS) -DF_INTERFACE $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
cpuid.$(PSUFFIX): $(KERNELDIR)/cpuid.S
kusano 2b45e8
	$(CC) -c $(PFLAGS) $< -o $(@F)
kusano 2b45e8
kusano 2b45e8
#ifdef DYNAMIC_ARCH
kusano 2b45e8
clean ::
kusano 2b45e8
	@rm -f setparam_*.c kernel_*.h setparam.h kernel.h
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
include $(TOPDIR)/Makefile.tail