######################## -*- Mode: Makefile-Automake -*- ###################### ## ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo ## ## The contents of this file are covered under the licence agreement in the ## file "LICENCE" distributed with Cforall. ## ## Makefile.am -- ## ## Author : Peter A. Buhr ## Created On : Sun May 31 09:08:15 2015 ## Last Modified By : Peter A. Buhr ## Last Modified On : Wed Jun 6 16:42:20 2018 ## Update Count : 49 ############################################################################### AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names debug=yes installed=no quick_test=avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes concurrent= TEST_PY = python ${builddir}/test.py # applies to both programs AM_CFLAGS = $(if $(test), 2> $(test), ) \ -g \ -Wall \ -Wno-unused-function \ -quiet @CFA_FLAGS@ \ -DIN_DIR="${srcdir}/.in/" AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS} CC = @CFACC@ .PHONY: list .validate .INTERMEDIATE: .validate .validate.c EXTRA_PROGRAMS = fstream_test avl_test # build but do not install fstream_test_SOURCES = fstream_test.c 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 #---------------------------------------------------------------------------------------------------------------- all-local : @+${TEST_PY} --debug=${debug} --install=${installed} ${concurrent} ${quick_test} all-tests : @+${TEST_PY} --all --debug=${debug} --install=${installed} ${concurrent} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program clean-local : rm -f ${EXTRA_PROGRAMS} list : @+${TEST_PY} --list ${concurrent} .validate: .validate.c $(COMPILE) .validate.c -fsyntax-only -Wall -Wextra -Werror .validate.c: @echo "int main() { return 0; }" > ${@} concurrency : @+${TEST_PY} --debug=${debug} --install=${installed} -Iconcurrent #---------------------------------------------------------------------------------------------------------------- # implicit rule so not all test require a rule % : %.c $(CC) $(COMPILE) $(abspath ${<}) -o ${@} declarationSpecifier: declarationSpecifier.c $(CC) $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} gccExtensions : gccExtensions.c $(CC) $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} extension : extension.c $(CC) $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} attributes : attributes.c $(CC) $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} functions: functions.c $(CC) $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} KRfunctions : KRfunctions.c $(CC) $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} sched-ext-parse : sched-ext-parse.c $(CC) $(COMPILE) -CFA -XCFA -p $(abspath ${<}) -o ${@} gmp : gmp.c $(CC) $(COMPILE) -lgmp $(abspath ${<}) -o ${@} completeTypeError : completeTypeError.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} typedefRedef-ERR1: typedefRedef.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} alloc-ERROR: alloc.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} fallthrough-ERROR: fallthrough.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} nested-types-ERR1: nested-types.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} nested-types-ERR2: nested-types.c $(CC) $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} # Constructor/destructor tests raii/dtor-early-exit-ERR1: raii/dtor-early-exit.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} raii/dtor-early-exit-ERR2: raii/dtor-early-exit.c $(CC) $(COMPILE) -DERR2 $(abspath ${<}) -o ${@} raii/memberCtors-ERR1: raii/memberCtors.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} raii/ctor-autogen-ERR1: raii/ctor-autogen.c $(CC) $(COMPILE) -DERR1 $(abspath ${<}) -o ${@} # Warnings warnings/self-assignment: warnings/self-assignment.c $(CC) $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only #builtins builtins/sync: builtins/sync.c $(CC) $(COMPILE) $(abspath ${<}) 2> ${@} -fsyntax-only