1 | ######################## -*- Mode: Makefile-Automake -*- ###################### |
---|
2 | ## |
---|
3 | ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
4 | ## |
---|
5 | ## The contents of this file are covered under the licence agreement in the |
---|
6 | ## file "LICENCE" distributed with Cforall. |
---|
7 | ## |
---|
8 | ## Makefile.am -- |
---|
9 | ## |
---|
10 | ## Author : Peter A. Buhr |
---|
11 | ## Created On : Sun May 31 09:08:15 2015 |
---|
12 | ## Last Modified By : Peter A. Buhr |
---|
13 | ## Last Modified On : Wed Jun 6 16:42:20 2018 |
---|
14 | ## Update Count : 49 |
---|
15 | ############################################################################### |
---|
16 | |
---|
17 | |
---|
18 | debug=yes |
---|
19 | |
---|
20 | quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes |
---|
21 | |
---|
22 | if BUILD_CONCURRENCY |
---|
23 | concurrent= |
---|
24 | else |
---|
25 | concurrent='-Econcurrent' |
---|
26 | endif |
---|
27 | |
---|
28 | TEST_PY = python ${srcdir}/test.py |
---|
29 | |
---|
30 | # applies to both programs |
---|
31 | DEBUG_FLAGS = |
---|
32 | |
---|
33 | BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -I. |
---|
34 | if !BUILD_DEBUG |
---|
35 | BUILD_FLAGS += -nodebug |
---|
36 | else |
---|
37 | if !BUILD_RELEASE |
---|
38 | BUILD_FLAGS += -debug |
---|
39 | else |
---|
40 | BUILD_FLAGS += ${DEBUG_FLAGS} |
---|
41 | endif |
---|
42 | endif |
---|
43 | |
---|
44 | TEST_FLAGS = $(if $(test), 2> $(test), ) |
---|
45 | AM_CFLAGS = ${TEST_FLAGS} ${BUILD_FLAGS} |
---|
46 | CC = ${abs_top_builddir}/src/driver/cfa -I${srcdir} |
---|
47 | |
---|
48 | .PHONY : list |
---|
49 | EXTRA_PROGRAMS = fstream_test avl_test # build but do not install |
---|
50 | |
---|
51 | fstream_test_SOURCES = ${srcdir}/fstream_test.c |
---|
52 | fstream_test_CFLAGS = $(if $(test), 2>> $(test), ) ${BUILD_FLAGS} |
---|
53 | |
---|
54 | avl_test_SOURCES = ${srcdir}/avltree/avl_test.c ${srcdir}/avltree/avl0.c ${srcdir}/avltree/avl1.c ${srcdir}/avltree/avl2.c ${srcdir}/avltree/avl3.c ${srcdir}/avltree/avl4.c ${srcdir}/avltree/avl-private.c |
---|
55 | avl_test_CFLAGS = $(if $(test), 2>> $(test), ) ${BUILD_FLAGS} |
---|
56 | |
---|
57 | all-local : |
---|
58 | @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test} |
---|
59 | |
---|
60 | all-tests : |
---|
61 | @+${TEST_PY} --all --debug=${debug} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program |
---|
62 | |
---|
63 | clean-local : |
---|
64 | rm -f ${EXTRA_PROGRAMS} |
---|
65 | |
---|
66 | list : |
---|
67 | @+${TEST_PY} --list ${concurrent} |
---|
68 | |
---|
69 | concurrency : |
---|
70 | @+${TEST_PY} --debug=${debug} -Iconcurrent |
---|
71 | |
---|
72 | .dummy : .dummy.c @CFA_BINDIR@/@CFA_NAME@ |
---|
73 | ${CC} ${BUILD_FLAGS} -XCFA -n ${<} -o ${@} #don't use CFLAGS, this rule is not a real test |
---|
74 | |
---|
75 | |
---|
76 | % : ${srcdir}/%.c @CFA_BINDIR@/@CFA_NAME@ |
---|
77 | ${CC} ${AM_CFLAGS} ${CFLAGS} $(abspath ${<}) -o ${@} |
---|
78 | |
---|
79 | declarationSpecifier: declarationSpecifier.c @CFA_BINDIR@/@CFA_NAME@ |
---|
80 | ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
81 | |
---|
82 | gccExtensions : gccExtensions.c @CFA_BINDIR@/@CFA_NAME@ |
---|
83 | ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
84 | |
---|
85 | extension : extension.c @CFA_BINDIR@/@CFA_NAME@ |
---|
86 | ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
87 | |
---|
88 | attributes : attributes.c @CFA_BINDIR@/@CFA_NAME@ |
---|
89 | ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
90 | |
---|
91 | functions: functions.c @CFA_BINDIR@/@CFA_NAME@ |
---|
92 | ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
93 | |
---|
94 | KRfunctions : KRfunctions.c @CFA_BINDIR@/@CFA_NAME@ |
---|
95 | ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
96 | |
---|
97 | sched-ext-parse : sched-ext-parse.c @CFA_BINDIR@/@CFA_NAME@ |
---|
98 | ${CC} ${AM_CFLAGS} ${CFLAGS} -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
99 | |
---|
100 | gmp : gmp.c @CFA_BINDIR@/@CFA_NAME@ |
---|
101 | ${CC} ${AM_CFLAGS} ${CFLAGS} -lgmp $(abspath ${<}) -o ${@} |
---|
102 | |
---|
103 | completeTypeError : completeTypeError.c @CFA_BINDIR@/@CFA_NAME@ |
---|
104 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
105 | |
---|
106 | typedefRedef-ERR1: typedefRedef.c @CFA_BINDIR@/@CFA_NAME@ |
---|
107 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
108 | |
---|
109 | alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@ |
---|
110 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
111 | |
---|
112 | fallthrough-ERROR: fallthrough.c @CFA_BINDIR@/@CFA_NAME@ |
---|
113 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
114 | |
---|
115 | nested-types-ERR1: nested-types.c @CFA_BINDIR@/@CFA_NAME@ |
---|
116 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
117 | |
---|
118 | nested-types-ERR2: nested-types.c @CFA_BINDIR@/@CFA_NAME@ |
---|
119 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 $(abspath ${<}) -o ${@} |
---|
120 | |
---|
121 | # Constructor/destructor tests |
---|
122 | raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@ |
---|
123 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
124 | |
---|
125 | raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c @CFA_BINDIR@/@CFA_NAME@ |
---|
126 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR2 $(abspath ${<}) -o ${@} |
---|
127 | |
---|
128 | raii/memberCtors-ERR1: raii/memberCtors.c @CFA_BINDIR@/@CFA_NAME@ |
---|
129 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
130 | |
---|
131 | raii/ctor-autogen-ERR1: raii/ctor-autogen.c @CFA_BINDIR@/@CFA_NAME@ |
---|
132 | ${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 $(abspath ${<}) -o ${@} |
---|
133 | |
---|
134 | # Warnings |
---|
135 | warnings/self-assignment: warnings/self-assignment.c @CFA_BINDIR@/@CFA_NAME@ |
---|
136 | ${CC} ${AM_CFLAGS} ${CFLAGS} $(abspath ${<}) 2> ${@} -fsyntax-only |
---|
137 | |
---|
138 | #builtins |
---|
139 | builtins/sync: builtins/sync.c @CFA_BINDIR@/@CFA_NAME@ |
---|
140 | ${CC} ${AM_CFLAGS} ${CFLAGS} $(abspath ${<}) 2> ${@} -fsyntax-only |
---|