File: Makefile.am

package info (click to toggle)
libm4ri 20240729-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,180 kB
  • sloc: ansic: 12,211; makefile: 140; sh: 72
file content (71 lines) | stat: -rw-r--r-- 2,420 bytes parent folder | download
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
# TOPSRCDIR allows to compile this testsuite for a clone (and different revision) of this
# repository. If the environment variable topsrcdir is the top source directory of the clone,
# compile this testsuite as:
#
# make TOPSRCDIR="$topsrcdir"
#
# Finally, if you also leave out TOPSRCDIR and just run 'make' then the testsuite
# is compiled against the current source tree.

AUTOMAKE_OPTIONS = foreign
TOPSRCDIR = $(srcdir)/..
TOPBUILDDIR = $(builddir)/..
DEFINES =
# include TOPBUILDIR for m4ri_config.h
AM_CFLAGS = -I$(TOPSRCDIR) -I$(TOPBUILDDIR) -D_XOPEN_SOURCE=600 @CFLAGS@ $(DEFINES) @OPENMP_CFLAGS@ @PAPI_CFLAGS@ @LIBPNG_CFLAGS@

STAGEDIR := $(realpath -s $(TOPBUILDDIR)/.libs)
AM_LDFLAGS = -L$(STAGEDIR) -Wl,-rpath,$(STAGEDIR) cpucycles.o -lm4ri -lm @PAPI_LDFLAGS@ @PAPI_LIBS@
LDFLAGS = -no-install

BENCH = bench_elimination \
	bench_multiplication \
        bench_m4rm \
	bench_ple \
	bench_trsm \
	bench_elimination_sparse \
	bench_mzd \
	bench_invert \
	bench_rank

CPUCYCLES_DIR = cpucycles-20060326

CPUCYCLES_EXTRA_DIST = $(srcdir)/cpucycles-20060326/*.c \
                       $(srcdir)/cpucycles-20060326/*.h \
                       $(srcdir)/cpucycles-20060326/compile \
                       $(srcdir)/cpucycles-20060326/do 

EXTRA_DIST = $(CPUCYCLES_EXTRA_DIST)

bin_PROGRAMS = $(BENCH)

bench_elimination_SOURCES = bench_elimination.c benchmarking.c benchmarking.h 
bench_multiplication_SOURCES = bench_multiplication.c benchmarking.c benchmarking.h
bench_m4rm_SOURCES = bench_m4rm.c benchmarking.c benchmarking.h
bench_ple_SOURCES = bench_ple.c benchmarking.c benchmarking.h
bench_trsm_SOURCES = bench_trsm.c benchmarking.c benchmarking.h
bench_elimination_sparse_SOURCES = bench_elimination_sparse.c benchmarking.c benchmarking.h
bench_mzd_SOURCES = bench_mzd.c benchmarking.c benchmarking.h
bench_invert_SOURCES = bench_invert.c benchmarking.c benchmarking.h
bench_rank_SOURCES = bench_rank.c benchmarking.c benchmarking.h

BUILT_SOURCES = cpucycles.h

cpucycles.h: cpucycles.o

cpucycles.o:
	 (if [ $(srcdir) != $(builddir) ]; then \
		cp -r $(srcdir)/$(CPUCYCLES_DIR) $(builddir); \
	        chmod +w -R $(CPUCYCLES_DIR)/; \
         fi; \
         cd $(CPUCYCLES_DIR); \
         sh do; \
         cp cpucycles.o ..; \
         cp cpucycles.h ..; \
         cd ..; \
	 if [ $(srcdir) != $(builddir) ]; then \
		rm -r $(CPUCYCLES_DIR); \
         fi)

distclean-local:
	-rm -f cpucycles.h