| [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 |
|
|---|
| [f7d3215] | 40 | PRETTY_PATH=cd ${srcdir} &&
|
|---|
| 41 |
|
|---|
| [28582b2] | 42 | .PHONY: list .validate
|
|---|
| 43 | .INTERMEDIATE: .validate .validate.c
|
|---|
| [293377c] | 44 | EXTRA_PROGRAMS = fstream_test avl_test # build but do not install
|
|---|
| [927e9ce] | 45 |
|
|---|
| [e68b3a8] | 46 | fstream_test_SOURCES = fstream_test.c
|
|---|
| [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 :
|
|---|
| [a5121bf] | 52 | @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${quick_test}
|
|---|
| [df42128] | 53 |
|
|---|
| 54 | all-tests :
|
|---|
| [a5121bf] | 55 | @+${TEST_PY} --all --debug=${debug} --install=${installed} ${concurrent} # '@' => 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 |
|
|---|
| [28582b2] | 63 | .validate: .validate.c
|
|---|
| [575a6e5] | 64 | $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror
|
|---|
| [28582b2] | 65 |
|
|---|
| 66 | .validate.c:
|
|---|
| 67 | @echo "int main() { return 0; }" > ${@}
|
|---|
| 68 |
|
|---|
| [026a0f5] | 69 | concurrency :
|
|---|
| [a5121bf] | 70 | @+${TEST_PY} --debug=${debug} --install=${installed} -Iconcurrent
|
|---|
| [026a0f5] | 71 |
|
|---|
| [73abe95] | 72 | #----------------------------------------------------------------------------------------------------------------
|
|---|
| [4f18de3] | 73 | # implicit rule so not all test require a rule
|
|---|
| [b8f6002] | 74 | % : %.c $(CC)
|
|---|
| [f7d3215] | 75 | $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [8f8af30] | 76 |
|
|---|
| [b8f6002] | 77 | declarationSpecifier: declarationSpecifier.c $(CC)
|
|---|
| [f7d3215] | 78 | $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [950f7a7] | 79 |
|
|---|
| [b8f6002] | 80 | gccExtensions : gccExtensions.c $(CC)
|
|---|
| [f7d3215] | 81 | $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [d9b499c] | 82 |
|
|---|
| [b8f6002] | 83 | extension : extension.c $(CC)
|
|---|
| [f7d3215] | 84 | $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [d9b499c] | 85 |
|
|---|
| [b8f6002] | 86 | attributes : attributes.c $(CC)
|
|---|
| [f7d3215] | 87 | $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [481115f] | 88 |
|
|---|
| [b8f6002] | 89 | functions: functions.c $(CC)
|
|---|
| [f7d3215] | 90 | $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [c0aa336] | 91 |
|
|---|
| [b8f6002] | 92 | KRfunctions : KRfunctions.c $(CC)
|
|---|
| [f7d3215] | 93 | $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [3a5131ed] | 94 |
|
|---|
| [b8f6002] | 95 | sched-ext-parse : sched-ext-parse.c $(CC)
|
|---|
| [f7d3215] | 96 | $(PRETTY_PATH) $(COMPILE) -CFA -XCFA -p $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [a843067] | 97 |
|
|---|
| [b8f6002] | 98 | gmp : gmp.c $(CC)
|
|---|
| [f7d3215] | 99 | $(PRETTY_PATH) $(COMPILE) -lgmp $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| 100 |
|
|---|
| 101 | #builtins
|
|---|
| 102 | builtins/sync: builtins/sync.c $(CC)
|
|---|
| 103 | $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
|
|---|
| [4c8f86b3] | 104 |
|
|---|
| [f7d3215] | 105 | #------------------------------------------------------------------------------
|
|---|
| 106 | #To make errors path independent we need to cd into the correct directories
|
|---|
| [b8f6002] | 107 | completeTypeError : completeTypeError.c $(CC)
|
|---|
| [f7d3215] | 108 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [486341f] | 109 |
|
|---|
| [b8f6002] | 110 | typedefRedef-ERR1: typedefRedef.c $(CC)
|
|---|
| [f7d3215] | 111 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [b93a3de] | 112 |
|
|---|
| [b8f6002] | 113 | alloc-ERROR: alloc.c $(CC)
|
|---|
| [f7d3215] | 114 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [70529dc] | 115 |
|
|---|
| [b8f6002] | 116 | fallthrough-ERROR: fallthrough.c $(CC)
|
|---|
| [f7d3215] | 117 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [e2c70ab] | 118 |
|
|---|
| [b8f6002] | 119 | nested-types-ERR1: nested-types.c $(CC)
|
|---|
| [f7d3215] | 120 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [49e1275] | 121 |
|
|---|
| [b8f6002] | 122 | nested-types-ERR2: nested-types.c $(CC)
|
|---|
| [f7d3215] | 123 | $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [49e1275] | 124 |
|
|---|
| [80e85829] | 125 | # Constructor/destructor tests
|
|---|
| [b8f6002] | 126 | raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC)
|
|---|
| [f7d3215] | 127 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [cdbfab0] | 128 |
|
|---|
| [b8f6002] | 129 | raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC)
|
|---|
| [f7d3215] | 130 | $(PRETTY_PATH) $(COMPILE) -DERR2 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [80e85829] | 131 |
|
|---|
| [b8f6002] | 132 | raii/memberCtors-ERR1: raii/memberCtors.c $(CC)
|
|---|
| [f7d3215] | 133 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [80e85829] | 134 |
|
|---|
| [b8f6002] | 135 | raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC)
|
|---|
| [f7d3215] | 136 | $(PRETTY_PATH) $(COMPILE) -DERR1 $(shell realpath --relative-to=${srcdir} ${<}) -o $(abspath ${@})
|
|---|
| [80e85829] | 137 |
|
|---|
| [1feb535f] | 138 | # Warnings
|
|---|
| [b8f6002] | 139 | warnings/self-assignment: warnings/self-assignment.c $(CC)
|
|---|
| [f7d3215] | 140 | $(PRETTY_PATH) $(COMPILE) $(shell realpath --relative-to=${srcdir} ${<}) 2> $(abspath ${@}) -fsyntax-only
|
|---|