Upgrade to version 0.3.21
[platform/upstream/openblas.git] / utest / Makefile
1 UTEST_CHECK = 1
2 TOPDIR  = ..
3
4 override TARGET_ARCH=
5 override TARGET_MACH=
6
7 UTESTBIN=openblas_utest
8
9 .PHONY : all
10 .NOTPARALLEL : all run_test $(UTESTBIN)
11
12 include $(TOPDIR)/Makefile.system
13
14 OBJS=utest_main.o test_min.o test_amax.o test_ismin.o test_rotmg.o test_axpy.o test_dotu.o test_dsdot.o test_swap.o test_rot.o test_dnrm2.o
15 #test_rot.o test_swap.o test_axpy.o test_dotu.o test_dsdot.o test_fork.o
16
17 ifneq ($(NO_LAPACK), 1)
18 OBJS += test_potrs.o
19 ifneq ($(NO_CBLAS), 1)
20 ifneq ($(NO_LAPACKE), 1)
21 OBJS += test_kernel_regress.o
22 endif
23 endif
24 endif
25
26 #this does not work with OpenMP nor with native Windows or Android threads
27 # FIXME TBD if this works on OSX, SunOS, POWER and zarch
28 ifeq ($(OSNAME), $(filter $(OSNAME),Linux CYGWIN_NT))
29 ifneq ($(USE_OPENMP), 1)
30 OBJS += test_fork.o
31 endif
32 OBJS += test_post_fork.o
33 endif
34
35 ifeq ($(C_COMPILER), PGI)
36 OBJS = utest_main2.o
37 endif
38 ifeq ($(C_COMPILER), SUN)
39 OBJS = utest_main2.o
40 endif
41 ifeq ($(OSNAME), AIX)
42 OBJS = utest_main2.o
43 endif
44
45 all : run_test
46
47 $(UTESTBIN): $(OBJS)
48         $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
49
50 run_test: $(UTESTBIN)
51 ifneq ($(CROSS), 1)
52         ./$(UTESTBIN)
53 endif
54
55 clean:
56         -rm -f *.o $(UTESTBIN)
57
58 libs: