######################## -*- 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 08:54:01 2015 ## Last Modified By : Peter A. Buhr ## Last Modified On : Sun May 31 08:54:36 2015 ## Update Count : 2 ############################################################################### libcfa_a_SOURCES = libcfa-prelude.c lib_LIBRARIES = libcfa.a # put into lib for now cfalibdir = ${libdir} cfalib_DATA = prelude.cf builtins.cf # create forward declarations for gcc builtins ${libdir}/builtins.cf : ${srcdir}/builtins.cf ${libdir} ${INSTALL} ${srcdir}/builtins.cf ${libdir} builtins.cf : builtins.c @if [ -e builtins.c ] ; then \ @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ fi builtins.c : builtins.def prototypes.awk @if [ -e builtins.def ] ; then \ @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ fi builtins.def : libcfa-prelude.c : ${libdir}/cfa-cpp ${libdir}/builtins.cf sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ${srcdir}/ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" ${srcdir}/prelude.cf ${libdir}/cfa-cpp -l ${srcdir}/prelude.cf $@ rm -f ${srcdir}/prelude.c libcfa-prelude.o : libcfa-prelude.c ${BACKEND_CC} -c -o $@ $<