File: Makefile.make

package info (click to toggle)
repsnapper 2.5a5-3
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 5,452 kB
  • sloc: cpp: 61,683; ansic: 7,084; perl: 692; xml: 396; makefile: 348; sh: 231
file content (82 lines) | stat: -rw-r--r-- 2,072 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

VMMLIB_UNIT_TESTS =\
    tests/unit_test.cpp\
    tests/unit_test_globals.cpp\
    tests/vector_test.cpp\
    tests/matrix_test.cpp\
    tests/quaternion_test.cpp\
    tests/qr_decomposition_test.cpp\
    tests/svd_test.cpp\
    tests/lapack_svd_test.cpp\
    tests/lapack_linear_least_squares_test.cpp\
    tests/lapack_gaussian_elimination_test.cpp\
    tests/vmmlib_unit_tests_main.cpp\
    tests/lapack_sym_eigs_test.cpp\
    tests/tensor3_test.cpp \
    tests/tensor3_iterator_test.cpp \
    tests/tucker3_tensor_test.cpp \
    tests/qtucker3_tensor_test.cpp \
    tests/tucker3_exporter_importer_test.cpp \
    tests/cp3_tensor_test.cpp \
    tests/t3_hosvd_test.cpp \
    tests/t3_hooi_test.cpp \
    tests/t3_hopm_test.cpp \
    tests/t3_ihopm_test.cpp \
    tests/t3_ihooi_test.cpp \
    tests/t3_ttm_test.cpp \
    tests/t3_padder_test.cpp \
    tests/matrix_pseudoinverse_test.cpp \
    tests/blas_dgemm_test.cpp \
    tests/blas_dot_test.cpp \
    tests/blas_daxpy_test.cpp \
    tests/tensor4_test.cpp \
    tests/t4_converter_test.cpp \

VMMLIB_UNIT_TESTS_OBJECTS = ${VMMLIB_UNIT_TESTS:%.cpp=%.o}  

CXXFLAGS += -I. -Iinclude -Itests -include stdint.h

# Mac OS X specific stuff 
# on mac we want to use the frameworks, not the unix style libs 
ARCH = $(shell uname)
ifeq "$(ARCH)" "Darwin"
CXXFLAGS += -DVMMLIB_USE_LAPACK
LDFLAGS += -framework Accelerate -fopenmp

else
# Linux specific stuff

CXXFLAGS += -include f2c.h -include f2c_fix.h 

LBITS := $(shell getconf LONG_BIT)
ifeq ($(LBITS),64)
  LIBDIR=$(DESTDIR)/usr/lib64
else
  LIBDIR=$(DESTDIR)/usr/lib
endif

CXXFLAGS += -DVMMLIB_USE_LAPACK
LDFLAGS +=  -fopenmp

# adjust libs depending on your LAPACK and BLAS distribution
LIBS += -lblas -llapack -lf2c



endif

all: vmmlib_unit_tests

.cpp.o:
	$(CXX) $(CXXFLAGS) -c $< -o $@  

vmmlib_unit_tests: $(VMMLIB_UNIT_TESTS_OBJECTS)
ifeq "$(ARCH)" "Darwin"
	 $(CXX) $(LDFLAGS) $(VMMLIB_UNIT_TESTS_OBJECTS) -o $@  
else
	 $(CXX) $(LDFLAGS) $(VMMLIB_UNIT_TESTS_OBJECTS) -o $@  $(LIBS)
endif

clean:
	rm -rf $(VMMLIB_UNIT_TESTS_OBJECTS) vmmlib_unit_tests