Used the environment variable OPENBLAS_NUM_THREADS to set the number of threads in...
[platform/upstream/openblas.git] / ctest / Makefile
1 #
2 # The Makefile compiles c wrappers and testers for CBLAS.  
3 #
4
5 TOPDIR = ..
6 include $(TOPDIR)/Makefile.system
7
8 CFLAGS += -DADD$(BU) -DCBLAS
9
10 LIB = $(TOPDIR)/$(LIBNAME)
11
12 stestl1o = c_sblas1.o
13
14 stestl2o = c_sblas2.o c_s2chke.o auxiliary.o c_xerbla.o constant.o
15
16 stestl3o = c_sblas3.o c_s3chke.o auxiliary.o c_xerbla.o constant.o
17
18 dtestl1o = c_dblas1.o
19
20 dtestl2o = c_dblas2.o c_d2chke.o auxiliary.o c_xerbla.o constant.o
21
22 dtestl3o = c_dblas3.o c_d3chke.o auxiliary.o c_xerbla.o constant.o
23
24 ctestl1o = c_cblas1.o
25
26 ctestl2o = c_cblas2.o c_c2chke.o auxiliary.o c_xerbla.o constant.o
27
28 ctestl3o = c_cblas3.o c_c3chke.o auxiliary.o c_xerbla.o constant.o
29
30 ztestl1o = c_zblas1.o 
31
32 ztestl2o = c_zblas2.o c_z2chke.o auxiliary.o c_xerbla.o constant.o
33
34 ztestl3o = c_zblas3.o c_z3chke.o auxiliary.o c_xerbla.o constant.o
35
36 all :: all1 all2 all3 
37
38 all1: xscblat1 xdcblat1 xccblat1 xzcblat1
39         OPENBLAS_NUM_THREADS=2 ./xscblat1
40         OPENBLAS_NUM_THREADS=2 ./xdcblat1
41         OPENBLAS_NUM_THREADS=2 ./xccblat1
42         OPENBLAS_NUM_THREADS=2 ./xzcblat1
43
44 all2: xscblat2 xdcblat2 xccblat2 xzcblat2
45         OPENBLAS_NUM_THREADS=2 ./xscblat2 < sin2
46         OPENBLAS_NUM_THREADS=2 ./xdcblat2 < din2
47         OPENBLAS_NUM_THREADS=2 ./xccblat2 < cin2
48         OPENBLAS_NUM_THREADS=2 ./xzcblat2 < zin2
49
50 all3: xscblat3 xdcblat3 xccblat3 xzcblat3
51         OPENBLAS_NUM_THREADS=2 ./xscblat3 < sin3
52         OPENBLAS_NUM_THREADS=2 ./xdcblat3 < din3
53         OPENBLAS_NUM_THREADS=2 ./xccblat3 < cin3
54         OPENBLAS_NUM_THREADS=2 ./xzcblat3 < zin3
55
56 clean ::
57         rm -f x* 
58
59 FLDFLAGS = $(FFLAGS:-fPIC=)
60 CEXTRALIB = 
61
62 # Single real
63 xscblat1: $(stestl1o) c_sblat1.o $(TOPDIR)/$(LIBNAME)
64         $(FC) $(FLDFLAGS) -o xscblat1 c_sblat1.o $(stestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
65 xscblat2: $(stestl2o) c_sblat2.o $(TOPDIR)/$(LIBNAME)
66         $(FC) $(FLDFLAGS) -o xscblat2 c_sblat2.o $(stestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
67 xscblat3: $(stestl3o) c_sblat3.o $(TOPDIR)/$(LIBNAME)
68         $(FC) $(FLDFLAGS) -o xscblat3 c_sblat3.o $(stestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
69 # Double real
70 xdcblat1: $(dtestl1o) c_dblat1.o $(TOPDIR)/$(LIBNAME)
71         $(FC) $(FLDFLAGS) -o xdcblat1 c_dblat1.o $(dtestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
72 xdcblat2: $(dtestl2o) c_dblat2.o $(TOPDIR)/$(LIBNAME)
73         $(FC) $(FLDFLAGS) -o xdcblat2 c_dblat2.o $(dtestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
74 xdcblat3: $(dtestl3o) c_dblat3.o $(TOPDIR)/$(LIBNAME)
75         $(FC) $(FLDFLAGS) -o xdcblat3 c_dblat3.o $(dtestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
76  
77 # Single complex
78 xccblat1: $(ctestl1o) c_cblat1.o $(TOPDIR)/$(LIBNAME)
79         $(FC) $(FLDFLAGS) -o xccblat1 c_cblat1.o $(ctestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
80 xccblat2: $(ctestl2o) c_cblat2.o $(TOPDIR)/$(LIBNAME)
81         $(FC) $(FLDFLAGS) -o xccblat2 c_cblat2.o $(ctestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
82 xccblat3: $(ctestl3o) c_cblat3.o $(TOPDIR)/$(LIBNAME)
83         $(FC) $(FLDFLAGS) -o xccblat3 c_cblat3.o $(ctestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
84
85 # Double complex 
86 xzcblat1: $(ztestl1o) c_zblat1.o $(TOPDIR)/$(LIBNAME)
87         $(FC) $(FLDFLAGS) -o xzcblat1 c_zblat1.o $(ztestl1o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
88 xzcblat2: $(ztestl2o) c_zblat2.o $(TOPDIR)/$(LIBNAME)
89         $(FC) $(FLDFLAGS) -o xzcblat2 c_zblat2.o $(ztestl2o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
90 xzcblat3: $(ztestl3o) c_zblat3.o $(TOPDIR)/$(LIBNAME)
91         $(FC) $(FLDFLAGS) -o xzcblat3 c_zblat3.o $(ztestl3o) $(LIB) $(EXTRALIB) $(CEXTRALIB)
92    
93 include $(TOPDIR)/Makefile.tail