[ef7d253] | 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 |
---|
[3d99498] | 13 | ## Last Modified On : Tue Nov 20 11:18:51 2018 |
---|
| 14 | ## Update Count : 68 |
---|
[ef7d253] | 15 | ############################################################################### |
---|
| 16 | |
---|
[0c1b566] | 17 | AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names |
---|
[f85bc15] | 18 | |
---|
[dc8511c] | 19 | include $(top_srcdir)/src/cfa.make |
---|
| 20 | |
---|
[cc640aad] | 21 | debug=yes |
---|
[ff593a3] | 22 | installed=no |
---|
[cc640aad] | 23 | |
---|
[5cacf74] | 24 | quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes |
---|
[be65cca] | 25 | |
---|
[0ad0c55] | 26 | concurrent= |
---|
[b90aace] | 27 | timeouts= |
---|
[be65cca] | 28 | |
---|
[bdff89d] | 29 | TEST_PY = python ${builddir}/test.py |
---|
[f85bc15] | 30 | |
---|
[ef7d253] | 31 | # applies to both programs |
---|
[b8f6002] | 32 | AM_CFLAGS = $(if $(test), 2> $(test), ) \ |
---|
| 33 | -g \ |
---|
| 34 | -Wall \ |
---|
| 35 | -Wno-unused-function \ |
---|
| 36 | -quiet @CFA_FLAGS@ \ |
---|
[a5121bf] | 37 | -DIN_DIR="${srcdir}/.in/" |
---|
[7c03d6d] | 38 | |
---|
[575a6e5] | 39 | AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} |
---|
[50697b0] | 40 | CC = @CFACC@ |
---|
[ef7d253] | 41 | |
---|
[f7d3215] | 42 | PRETTY_PATH=cd ${srcdir} && |
---|
| 43 | |
---|
[28582b2] | 44 | .PHONY: list .validate |
---|
[1e995d6] | 45 | .INTERMEDIATE: .validate .validate.cfa |
---|
[3d99498] | 46 | EXTRA_PROGRAMS = avl_test # build but do not install |
---|
[44f44617] | 47 | |
---|
[e68b3a8] | 48 | 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 |
---|
[a0dcd2e] | 49 | |
---|
[73abe95] | 50 | #---------------------------------------------------------------------------------------------------------------- |
---|
[927e9ce] | 51 | all-local : |
---|
[b90aace] | 52 | @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} ${quick_test} |
---|
[df42128] | 53 | |
---|
| 54 | all-tests : |
---|
[b90aace] | 55 | @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program |
---|
[927e9ce] | 56 | |
---|
| 57 | clean-local : |
---|
[a6dd5b0] | 58 | rm -f ${EXTRA_PROGRAMS} |
---|
[927e9ce] | 59 | |
---|
| 60 | list : |
---|
[f85bc15] | 61 | @+${TEST_PY} --list ${concurrent} |
---|
[927e9ce] | 62 | |
---|
[1e995d6] | 63 | .validate: .validate.cfa |
---|
| 64 | $(CFACOMPILE) .validate.cfa -fsyntax-only -Wall -Wextra -Werror |
---|
| 65 | |
---|
| 66 | .validate.cfa: |
---|
| 67 | @echo "int main() { return 0; }" > ${@} |
---|
[28582b2] | 68 | |
---|
[1e995d6] | 69 | dummy_hack.c: |
---|
[28582b2] | 70 | @echo "int main() { return 0; }" > ${@} |
---|
| 71 | |
---|
[026a0f5] | 72 | concurrency : |
---|
[a5121bf] | 73 | @+${TEST_PY} --debug=${debug} --install=${installed} -Iconcurrent |
---|
[026a0f5] | 74 | |
---|
[73abe95] | 75 | #---------------------------------------------------------------------------------------------------------------- |
---|
[dc8511c] | 76 | |
---|
[4f18de3] | 77 | # implicit rule so not all test require a rule |
---|
[1e995d6] | 78 | % : %.c $(CFACC) |
---|
| 79 | $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
| 80 | |
---|
| 81 | % : %.cfa $(CFACC) |
---|
| 82 | $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[8f8af30] | 83 | |
---|
[1e995d6] | 84 | declarationSpecifier: declarationSpecifier.cfa $(CFACC) |
---|
| 85 | $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[950f7a7] | 86 | |
---|
[1e995d6] | 87 | gccExtensions : gccExtensions.cfa $(CFACC) |
---|
| 88 | $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[d9b499c] | 89 | |
---|
[1e995d6] | 90 | extension : extension.cfa $(CFACC) |
---|
| 91 | $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[d9b499c] | 92 | |
---|
[1e995d6] | 93 | attributes : attributes.cfa $(CFACC) |
---|
| 94 | $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[481115f] | 95 | |
---|
[1e995d6] | 96 | functions: functions.cfa $(CFACC) |
---|
| 97 | $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[c0aa336] | 98 | |
---|
[1e995d6] | 99 | KRfunctions : KRfunctions.cfa $(CFACC) |
---|
| 100 | $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[3a5131ed] | 101 | |
---|
[1e995d6] | 102 | sched-ext-parse : sched-ext-parse.c $(CFACC) |
---|
| 103 | $(PRETTY_PATH) $(CFACOMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[a843067] | 104 | |
---|
[1e995d6] | 105 | gmp : gmp.cfa $(CFACC) |
---|
| 106 | $(PRETTY_PATH) $(CFACOMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[f7d3215] | 107 | |
---|
| 108 | #builtins |
---|
[1e995d6] | 109 | builtins/sync: builtins/sync.c $(CFACC) |
---|
| 110 | $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only |
---|
[4c8f86b3] | 111 | |
---|
[f7d3215] | 112 | #------------------------------------------------------------------------------ |
---|
[dc8511c] | 113 | |
---|
[f7d3215] | 114 | #To make errors path independent we need to cd into the correct directories |
---|
[1e995d6] | 115 | completeTypeError : completeTypeError.cfa $(CFACC) |
---|
| 116 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[486341f] | 117 | |
---|
[1e995d6] | 118 | typedefRedef-ERR1: typedefRedef.cfa $(CFACC) |
---|
| 119 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[b93a3de] | 120 | |
---|
[1e995d6] | 121 | alloc-ERROR: alloc.cfa $(CFACC) |
---|
| 122 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[70529dc] | 123 | |
---|
[1e995d6] | 124 | fallthrough-ERROR: fallthrough.cfa $(CFACC) |
---|
| 125 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[e2c70ab] | 126 | |
---|
[1e995d6] | 127 | nested-types-ERR1: nested-types.cfa $(CFACC) |
---|
| 128 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[49e1275] | 129 | |
---|
[1e995d6] | 130 | nested-types-ERR2: nested-types.cfa $(CFACC) |
---|
| 131 | $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[49e1275] | 132 | |
---|
[80e8582] | 133 | # Constructor/destructor tests |
---|
[1e995d6] | 134 | raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CFACC) |
---|
| 135 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[cdbfab0] | 136 | |
---|
[1e995d6] | 137 | raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CFACC) |
---|
| 138 | $(PRETTY_PATH) $(CFACOMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[80e8582] | 139 | |
---|
[1e995d6] | 140 | raii/memberCtors-ERR1: raii/memberCtors.c $(CFACC) |
---|
| 141 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[80e8582] | 142 | |
---|
[1e995d6] | 143 | raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CFACC) |
---|
| 144 | $(PRETTY_PATH) $(CFACOMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@}) |
---|
[80e8582] | 145 | |
---|
[1feb535f] | 146 | # Warnings |
---|
[1e995d6] | 147 | warnings/self-assignment: warnings/self-assignment.c $(CFACC) |
---|
| 148 | $(PRETTY_PATH) $(CFACOMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only |
---|