| [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
|
|---|
| 19 |
|
|---|
| [5cacf74] | 20 | quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
|
|---|
| [be65cca] | 21 |
|
|---|
| 22 | if BUILD_CONCURRENCY
|
|---|
| [0ad0c55] | 23 | concurrent=
|
|---|
| [be65cca] | 24 | else
|
|---|
| [0ad0c55] | 25 | concurrent='-Econcurrent'
|
|---|
| [be65cca] | 26 | endif
|
|---|
| 27 |
|
|---|
| [f85bc15] | 28 | TEST_PY = python ${srcdir}/test.py
|
|---|
| 29 |
|
|---|
| [ef7d253] | 30 | # applies to both programs
|
|---|
| [b8f6002] | 31 | AM_CFLAGS = $(if $(test), 2> $(test), ) \
|
|---|
| 32 | -g \
|
|---|
| 33 | -Wall \
|
|---|
| 34 | -Wno-unused-function \
|
|---|
| 35 | -quiet @CFA_FLAGS@ \
|
|---|
| 36 | -DIN_DIR="${srcdir}/.in/" \
|
|---|
| [7fb69f6] | 37 | @BUILD_IN_TREE_FLAGS@
|
|---|
| [7c03d6d] | 38 |
|
|---|
| [b5f9829] | 39 | if !BUILD_DEBUG
|
|---|
| [b8f6002] | 40 | AM_CFLAGS += -nodebug
|
|---|
| [b5f9829] | 41 | else
|
|---|
| 42 | if !BUILD_RELEASE
|
|---|
| [b8f6002] | 43 | AM_CFLAGS += -debug
|
|---|
| [b5f9829] | 44 | else
|
|---|
| [b8f6002] | 45 | AM_CFLAGS += ${DEBUG_FLAGS}
|
|---|
| [b5f9829] | 46 | endif
|
|---|
| 47 | endif
|
|---|
| 48 |
|
|---|
| [50697b0] | 49 | CC = @CFACC@
|
|---|
| [ef7d253] | 50 |
|
|---|
| [927e9ce] | 51 | .PHONY : list
|
|---|
| [293377c] | 52 | EXTRA_PROGRAMS = fstream_test avl_test # build but do not install
|
|---|
| [927e9ce] | 53 |
|
|---|
| [e68b3a8] | 54 | fstream_test_SOURCES = fstream_test.c
|
|---|
| [44f44617] | 55 |
|
|---|
| [e68b3a8] | 56 | 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] | 57 |
|
|---|
| [927e9ce] | 58 | all-local :
|
|---|
| [f85bc15] | 59 | @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test}
|
|---|
| [df42128] | 60 |
|
|---|
| 61 | all-tests :
|
|---|
| [f85bc15] | 62 | @+${TEST_PY} --all --debug=${debug} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
|
|---|
| [927e9ce] | 63 |
|
|---|
| 64 | clean-local :
|
|---|
| [a6dd5b0] | 65 | rm -f ${EXTRA_PROGRAMS}
|
|---|
| [927e9ce] | 66 |
|
|---|
| 67 | list :
|
|---|
| [f85bc15] | 68 | @+${TEST_PY} --list ${concurrent}
|
|---|
| [927e9ce] | 69 |
|
|---|
| [026a0f5] | 70 | concurrency :
|
|---|
| [f85bc15] | 71 | @+${TEST_PY} --debug=${debug} -Iconcurrent
|
|---|
| [026a0f5] | 72 |
|
|---|
| [4f18de3] | 73 | # SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated
|
|---|
| [a4248de1] | 74 | # however, here it is more complicated because it must match the dependencies based on how
|
|---|
| 75 | # they are generated by gcc
|
|---|
| [4f18de3] | 76 | headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
|
|---|
| [a4248de1] | 77 | headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
|
|---|
| 78 | headers_deps = $(addprefix %/, $(headers_real))
|
|---|
| [4f18de3] | 79 | $(headers_deps) :
|
|---|
| 80 | echo "Dummy rule, should never be called"
|
|---|
| 81 |
|
|---|
| [a4248de1] | 82 | # %/stdlib:
|
|---|
| 83 | # echo "Dummy rule, should never be called"
|
|---|
| 84 |
|
|---|
| [4f18de3] | 85 | # implicit rule so not all test require a rule
|
|---|
| [b8f6002] | 86 | % : %.c $(CC)
|
|---|
| [e68b3a8] | 87 | $(COMPILE) $(abspath ${<}) -o ${@}
|
|---|
| [8f8af30] | 88 |
|
|---|
| [b8f6002] | 89 | declarationSpecifier: declarationSpecifier.c $(CC)
|
|---|
| [e68b3a8] | 90 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
|
|---|
| [950f7a7] | 91 |
|
|---|
| [b8f6002] | 92 | gccExtensions : gccExtensions.c $(CC)
|
|---|
| [e68b3a8] | 93 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
|
|---|
| [d9b499c] | 94 |
|
|---|
| [b8f6002] | 95 | extension : extension.c $(CC)
|
|---|
| [e68b3a8] | 96 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
|
|---|
| [d9b499c] | 97 |
|
|---|
| [b8f6002] | 98 | attributes : attributes.c $(CC)
|
|---|
| [e68b3a8] | 99 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
|
|---|
| [481115f] | 100 |
|
|---|
| [b8f6002] | 101 | functions: functions.c $(CC)
|
|---|
| [e68b3a8] | 102 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
|
|---|
| [c0aa336] | 103 |
|
|---|
| [b8f6002] | 104 | KRfunctions : KRfunctions.c $(CC)
|
|---|
| [e68b3a8] | 105 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
|
|---|
| [3a5131ed] | 106 |
|
|---|
| [b8f6002] | 107 | sched-ext-parse : sched-ext-parse.c $(CC)
|
|---|
| [e68b3a8] | 108 | $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@}
|
|---|
| [a843067] | 109 |
|
|---|
| [b8f6002] | 110 | gmp : gmp.c $(CC)
|
|---|
| [e68b3a8] | 111 | $(COMPILE) -lgmp $(abspath ${<}) -o ${@}
|
|---|
| [4c8f86b3] | 112 |
|
|---|
| [b8f6002] | 113 | completeTypeError : completeTypeError.c $(CC)
|
|---|
| [e68b3a8] | 114 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [486341f] | 115 |
|
|---|
| [b8f6002] | 116 | typedefRedef-ERR1: typedefRedef.c $(CC)
|
|---|
| [e68b3a8] | 117 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [b93a3de] | 118 |
|
|---|
| [b8f6002] | 119 | alloc-ERROR: alloc.c $(CC)
|
|---|
| [e68b3a8] | 120 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [70529dc] | 121 |
|
|---|
| [b8f6002] | 122 | fallthrough-ERROR: fallthrough.c $(CC)
|
|---|
| [e68b3a8] | 123 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [e2c70ab] | 124 |
|
|---|
| [b8f6002] | 125 | nested-types-ERR1: nested-types.c $(CC)
|
|---|
| [e68b3a8] | 126 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [49e1275] | 127 |
|
|---|
| [b8f6002] | 128 | nested-types-ERR2: nested-types.c $(CC)
|
|---|
| [e68b3a8] | 129 | $(COMPILE) -DERR2 $(abspath ${<}) -o ${@}
|
|---|
| [49e1275] | 130 |
|
|---|
| [80e85829] | 131 | # Constructor/destructor tests
|
|---|
| [b8f6002] | 132 | raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC)
|
|---|
| [e68b3a8] | 133 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [cdbfab0] | 134 |
|
|---|
| [b8f6002] | 135 | raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC)
|
|---|
| [e68b3a8] | 136 | $(COMPILE) -DERR2 $(abspath ${<}) -o ${@}
|
|---|
| [80e85829] | 137 |
|
|---|
| [b8f6002] | 138 | raii/memberCtors-ERR1: raii/memberCtors.c $(CC)
|
|---|
| [e68b3a8] | 139 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [80e85829] | 140 |
|
|---|
| [b8f6002] | 141 | raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC)
|
|---|
| [e68b3a8] | 142 | $(COMPILE) -DERR1 $(abspath ${<}) -o ${@}
|
|---|
| [80e85829] | 143 |
|
|---|
| [1feb535f] | 144 | # Warnings
|
|---|
| [b8f6002] | 145 | warnings/self-assignment: warnings/self-assignment.c $(CC)
|
|---|
| [e68b3a8] | 146 | $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only
|
|---|
| [13073be] | 147 |
|
|---|
| 148 | #builtins
|
|---|
| [b8f6002] | 149 | builtins/sync: builtins/sync.c $(CC)
|
|---|
| [e68b3a8] | 150 | $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only
|
|---|