######################## -*- 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 : Thu Aug 11 15:36:32 2016 ## Update Count : 198 ############################################################################### # create object files in directory with source files AUTOMAKE_OPTIONS = subdir-objects lib_LIBRARIES = libcfa.a # put into lib for now cfalibdir = ${libdir} cfalib_DATA = builtins.cf extras.cf prelude.cf # create extra forward types/declarations to reduce inclusion of library files extras.cf : extras.regx extras.c ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf # create forward declarations for gcc builtins builtins.cf : builtins.c ${AM_V_GEN}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 ${AM_V_GEN}if [ -e $< ] ; then \ @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ fi builtins.def : prototypes.awk : MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} #-------------------------------------------------- libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf ${AM_V_GEN}${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 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $< CFLAGS = -quiet -no-include-stdhdr -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 CC = ${abs_top_srcdir}/src/driver/cfa headers = limits stdlib math iostream fstream iterator rational # containers/vector libobjs = ${headers:=.o} # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing % : %.c @true ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} stdhdr = ${shell echo stdhdr/*} nobase_include_HEADERS = ${headers} ${stdhdr} CLEANFILES = libcfa-prelude.c maintainer-clean-local: -rm -rf ${includedir}/*