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