######################## -*- 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 : Wed Mar 2 22:59:23 2016 ## Update Count : 119 ############################################################################### 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 : ${libdir} ${srcdir}/builtins.cf ${INSTALL} ${srcdir}/builtins.cf ${libdir} sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ${srcdir}/ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" ${srcdir}/prelude.cf builtins.cf : builtins.c @if [ -e $< ] ; 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 $< ] ; then \ @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ fi builtins.def : prototypes.awk : MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} #-------------------------------------------------- libcfa-prelude.c : ${srcdir}/prelude.cf ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install libcfa-prelude.o : libcfa-prelude.c @BACKEND_CC@ -c -o $@ $< CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 CC = ${abs_top_srcdir}/src/driver/cfa # extension-less header files are overridden by default make rules => explicitly override rule % : %.c true .c.o : ${abs_top_srcdir}/src/driver/cfa-cpp ${CC} ${CFLAGS} -c -o $@ $< libs = stdlib iostream fstream iterator libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c} cheaders = # expat cfaheaders = limits include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders} MAINTAINERCLEANFILES += ${includedir}/*