File: Makefile

package info (click to toggle)
mwrap 1.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 980 kB
  • sloc: cpp: 3,271; ansic: 856; makefile: 252; lex: 233; sh: 2
file content (125 lines) | stat: -rw-r--r-- 3,455 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
include ../make.inc

MWRAP = ../mwrap

all: test_transfers test_cpp_complex $(TESTC99COMPLEX) test_syntax \
	test_typecheck test_catch test_fortran1 test_fortran2 \
	test_redirect test_include test_single_cpp test_char_cpp
# run the tests...
	octave-cli --no-init-file --quiet test_all.m

test_transfers: 
	$(MWRAP) -mex test_transfersmex \
		-c test_transfersmex.cc \
		-m test_transfers.m test_transfers.mw
	$(MEX) test_transfersmex.cc

test_cpp_complex: 
	$(MWRAP) -cppcomplex \
		-mex test_cpp_complexmex \
		-c test_cpp_complexmex.cc \
		-m test_cpp_complex.m test_cpp_complex.mw
	$(MEX) test_cpp_complexmex.cc

test_c99_complex: 
	$(MWRAP) -c99complex \
		-mex test_c99_complexmex \
		-c test_c99_complexmex.c \
		-m test_c99_complex.m test_c99_complex.mw
	$(MEX) test_c99_complexmex.c

# the following two are designed to create mwrap errors, and compared against
# log files. For now, since they would break the make process, the minus signs
# prevent them from being made.
test_syntax:
	- $(MWRAP) -cppcomplex test_syntax.mw 2> test_syntax.log
	- diff test_syntax.log test_syntax.ref

test_typecheck:
	- $(MWRAP) -cppcomplex test_typecheck.mw 2> test_typecheck.log
	diff test_typecheck.log test_typecheck.ref


test_catch:
	$(MWRAP) -mex test_catchmex -catch \
		-c test_catchmex.cc \
		-m test_catch.m \
		test_catch.mw
	$(MEX) test_catchmex.cc

test_fortran1:
	$(MWRAP) -mex test_fortran1mex \
		-c test_fortran1mex.cc \
		-m test_fortran1.m \
		test_fortran1.mw
	$(MEX) test_fortran1mex.cc

test_fortran2:
	$(MWRAP) -mex test_fortran2mex \
		-c test_fortran2mex.c \
		-m test_fortran2.m \
		test_fortran2.mw
	$(MEX) test_fortran2mex.c

test_redirect:
	$(MWRAP) -mb test_redirect.mw 

test_include: 
	$(MWRAP) -mex test_includemex\
		-c test_includemex.cc \
		-m test_include.m test_include.mw
	$(MEX) test_includemex.cc

# these two are tested by test_char.m ...
test_char_cpp: 
	$(MWRAP) -cppcomplex -mex test_charmex \
		-c test_charmex.cc \
		-mb test_char.mw
	$(MEX) test_charmex.cc

test_char_c99: 
	$(MWRAP) -mex test_charmex \
		-c test_charmex.c \
		-mb test_char.mw
	$(MEX) test_charmex.c

# these last two are tested by test_single.m ...
test_single_cpp: 
	$(MWRAP) -cppcomplex -mex test_singlemex \
		-c test_singlemex.cc \
		-mb test_single.mw
	$(MEX) test_singlemex.cc

test_single_c99: 
	$(MWRAP) -c99complex -mex test_singlemex \
		-c test_singlemex.c \
		-mb test_single.mw
	$(MEX) test_singlemex.c

test_gpu:
	$(MWRAP) -gpu -list -cppcomplex -mb -mex test_gpu -c test_gpu.cu test_gpu.mw

test_gpu_complex:
	$(MWRAP) -gpu -list -cppcomplex -mb -mex test_gpu_complex -c test_gpu_complex.cu test_gpu_complex.mw

test_gpu_int32:
	$(MWRAP) -gpu -list -cppcomplex -mb -mex test_gpu_int32 -c test_gpu_int32.cu test_gpu_int32.mw

test_cpu:
	$(MWRAP) -list -cppcomplex -mb -mex test_cpu -c test_cpu.cc test_cpu.mw

test_cpu_int32:
	$(MWRAP) -list -cppcomplex -mb -mex test_cpu_int32 -c test_cpu_int32.cc test_cpu_int32.mw

clean:
	rm -f *~ *.mex* *.o* test_typecheck.log
	rm -f test_fortran1.m test_fortran2.m test_transfers.m test_catch.m
	rm -f test_cpp_complex.m test_c99_complex.m
	rm -f test_transfersmex.cc test_catchmex.cc test_fortranmex.cc
	rm -f test_cpp_complexmex.cc test_c99_complexmex.c 
	rm -f test_redirect.m test_redirect1.m
	rm -f test_singlemex.c test_singlemex.cc
	rm -f add.m addf.m addz.m addc.m 
	rm -f arradd.m arraddf.m arraddz.m arraddc.m 
	rm -f test_charmex.c test_charmex.cc
	rm -f addchar.m arraddchar.m