Files
OpenBLAS/utest/Makefile
Martin Kroeker af2e7f28fc Override special make variables
as seen in https://github.com/xianyi/OpenBLAS/issues/1912#issuecomment-514183900 , any external setting of TARGET_ARCH (which could result from building OpenBLAS as part of a larger project that actually uses this variable) would cause the utest build to fail. 
(Other subtargets appear to be unaffected as they do not use implicit make rules)
2019-07-23 16:56:40 +02:00

44 lines
893 B
Makefile

UTEST_CHECK = 1
TOPDIR = ..
override TARGET_ARCH=
override TARGET_MACH=
UTESTBIN=openblas_utest
.PHONY : all
.NOTPARALLEL : all run_test $(UTESTBIN)
include $(TOPDIR)/Makefile.system
OBJS=utest_main.o test_amax.o test_rotmg.o test_axpy.o test_dotu.o test_dsdot.o test_swap.o test_rot.o
#test_rot.o test_swap.o test_axpy.o test_dotu.o test_dsdot.o test_fork.o
ifneq ($(NO_LAPACK), 1)
OBJS += test_potrs.o
OBJS += test_kernel_regress.o
endif
#this does not work with OpenMP nor with native Windows or Android threads
# FIXME TBD if this works on OSX, SunOS, POWER and zarch
ifndef USE_OPENMP
ifeq ($(OSNAME), $(filter $(OSNAME),Linux CYGWIN_NT))
OBJS += test_fork.o
endif
endif
all : run_test
$(UTESTBIN): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ ../$(LIBNAME) $(EXTRALIB) $(FEXTRALIB)
run_test: $(UTESTBIN)
ifndef CROSS
./$(UTESTBIN)
endif
clean:
-rm -f *.o $(UTESTBIN)
libs: