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