magma build system 03

基于 xxx/magma/Makefile中的内容:


.PHONY: all lib static shared clean test dense sparse docs

.DEFAULT_GOAL := all

all: dense sparse

dense: lib test

sparse: sparse-lib sparse-test

在执行如下未指定目标的make时,将会把all当成最终目标:

xxx/magma$ make -j

根据对Makefile和其include 文件的分析,大概存在如下笼统的依赖关系:

magma build system 03_第1张图片

其中,libmagma_templates, 和 libmagma_generated 两个变量,包含着大多数数学源文件源文件,如下这样:

文件  Makefile.gen.cuda :


libmagma_templates := \
	control/magma_f77.cpp \
	control/magma_param.F90 \
	control/magma.F90 \
	control/abs.cpp \
	control/affinity.cpp \
	control/auxiliary.cpp \
	control/constants.cpp \
	control/get_batched_crossover.cpp \

而且,其中,由Z类型生成 single 、 double 和 cuComplex 类型也是在这个文件中执行的python脚本,如下:


src/sgetrf_panel_batched.cpp: src/zgetrf_panel_batched.cpp
	$(codegen) -p s $<

src/dgetrf_panel_batched.cpp: src/zgetrf_panel_batched.cpp
	$(codegen) -p d $<

src/cgetrf_panel_batched.cpp: src/zgetrf_panel_batched.cpp
	$(codegen) -p c $<

src/sgetrf_panel_nopiv_batched.cpp: src/zgetrf_panel_nopiv_batched.cpp
	$(codegen) -p s $<

src/dgetrf_panel_nopiv_batched.cpp: src/zgetrf_panel_nopiv_batched.cpp
	$(codegen) -p d $<

src/cgetrf_panel_nopiv_batched.cpp: src/zgetrf_panel_nopiv_batched.cpp
	$(codegen) -p c $<

src/sgetrf_batched.cpp: src/zgetrf_batched.cpp
	$(codegen) -p s $<

src/dgetrf_batched.cpp: src/zgetrf_batched.cpp
	$(codegen) -p d $<

src/cgetrf_batched.cpp: src/zgetrf_batched.cpp
	$(codegen) -p c $<

src/sgetrf_nopiv_batched.cpp: src/zgetrf_nopiv_batched.cpp
	$(codegen) -p s $<

src/dgetrf_nopiv_batched.cpp: src/zgetrf_nopiv_batched.cpp
	$(codegen) -p d $<

src/cgetrf_nopiv_batched.cpp: src/zgetrf_nopiv_batched.cpp
	$(codegen) -p c $<

src/sgetrs_batched.cpp: src/zgetrs_batched.cpp
	$(codegen) -p s $<

 

你可能感兴趣的:(ubuntu,linux,运维)