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