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 | installed=no |
---|
20 | |
---|
21 | quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes |
---|
22 | |
---|
23 | concurrent= |
---|
24 | |
---|
25 | TEST_PY = python ${srcdir}/test.py |
---|
26 | |
---|
27 | # applies to both programs |
---|
28 | AM_CFLAGS = $(if $(test), 2> $(test), ) \ |
---|
29 | -g \ |
---|
30 | -Wall \ |
---|
31 | -Wno-unused-function \ |
---|
32 | -quiet @CFA_FLAGS@ \ |
---|
33 | -DIN_DIR="${srcdir}/.in/" |
---|
34 | |
---|
35 | AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} |
---|
36 | |
---|
37 | CC = @CFACC@ |
---|
38 | |
---|
39 | .PHONY: list .validate |
---|
40 | .INTERMEDIATE: .validate .validate.c |
---|
41 | EXTRA_PROGRAMS = fstream_test avl_test # build but do not install |
---|
42 | |
---|
43 | fstream_test_SOURCES = fstream_test.c |
---|
44 | |
---|
45 | avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c |
---|
46 | |
---|
47 | #---------------------------------------------------------------------------------------------------------------- |
---|
48 | all-local : |
---|
49 | @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${quick_test} |
---|
50 | |
---|
51 | all-tests : |
---|
52 | @+${TEST_PY} --all --debug=${debug} --install=${installed} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program |
---|
53 | |
---|
54 | clean-local : |
---|
55 | rm -f ${EXTRA_PROGRAMS} |
---|
56 | |
---|
57 | list : |
---|
58 | @+${TEST_PY} --list ${concurrent} |
---|
59 | |
---|
60 | .validate: .validate.c |
---|
61 | $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror |
---|
62 | |
---|
63 | .validate.c: |
---|
64 | @echo "int main() { return 0; }" > ${@} |
---|
65 | |
---|
66 | concurrency : |
---|
67 | @+${TEST_PY} --debug=${debug} --install=${installed} -Iconcurrent |
---|
68 | |
---|
69 | #---------------------------------------------------------------------------------------------------------------- |
---|
70 | # implicit rule so not all test require a rule |
---|
71 | % : %.c $(CC) |
---|
72 | $(COMPILE) $(abspath ${<}) -o ${@} |
---|
73 | |
---|
74 | declarationSpecifier: declarationSpecifier.c $(CC) |
---|
75 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
76 | |
---|
77 | gccExtensions : gccExtensions.c $(CC) |
---|
78 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
79 | |
---|
80 | extension : extension.c $(CC) |
---|
81 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
82 | |
---|
83 | attributes : attributes.c $(CC) |
---|
84 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
85 | |
---|
86 | functions: functions.c $(CC) |
---|
87 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
88 | |
---|
89 | KRfunctions : KRfunctions.c $(CC) |
---|
90 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
91 | |
---|
92 | sched-ext-parse : sched-ext-parse.c $(CC) |
---|
93 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} |
---|
94 | |
---|
95 | gmp : gmp.c $(CC) |
---|
96 | $(COMPILE) -lgmp $(abspath ${<}) -o ${@} |
---|
97 | |
---|
98 | completeTypeError : completeTypeError.c $(CC) |
---|
99 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
100 | |
---|
101 | typedefRedef-ERR1: typedefRedef.c $(CC) |
---|
102 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
103 | |
---|
104 | alloc-ERROR: alloc.c $(CC) |
---|
105 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
106 | |
---|
107 | fallthrough-ERROR: fallthrough.c $(CC) |
---|
108 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
109 | |
---|
110 | nested-types-ERR1: nested-types.c $(CC) |
---|
111 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
112 | |
---|
113 | nested-types-ERR2: nested-types.c $(CC) |
---|
114 | $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} |
---|
115 | |
---|
116 | # Constructor/destructor tests |
---|
117 | raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC) |
---|
118 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
119 | |
---|
120 | raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC) |
---|
121 | $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} |
---|
122 | |
---|
123 | raii/memberCtors-ERR1: raii/memberCtors.c $(CC) |
---|
124 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
125 | |
---|
126 | raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC) |
---|
127 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} |
---|
128 | |
---|
129 | # Warnings |
---|
130 | warnings/self-assignment: warnings/self-assignment.c $(CC) |
---|
131 | $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only |
---|
132 | |
---|
133 | #builtins |
---|
134 | builtins/sync: builtins/sync.c $(CC) |
---|
135 | $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only |
---|