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