[00cc023] | 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 | ## |
---|
[d63eeb0] | 8 | ## Makefile.am -- |
---|
[00cc023] | 9 | ## |
---|
| 10 | ## Author : Peter A. Buhr |
---|
| 11 | ## Created On : Sun May 31 08:54:01 2015 |
---|
| 12 | ## Last Modified By : Peter A. Buhr |
---|
[3a808fd] | 13 | ## Last Modified On : Tue Jul 5 16:49:38 2016 |
---|
| 14 | ## Update Count : 180 |
---|
[00cc023] | 15 | ############################################################################### |
---|
| 16 | |
---|
| 17 | lib_LIBRARIES = libcfa.a |
---|
| 18 | |
---|
| 19 | # put into lib for now |
---|
| 20 | cfalibdir = ${libdir} |
---|
[159c62e] | 21 | cfalib_DATA = builtins.cf extras.cf prelude.cf |
---|
[00cc023] | 22 | |
---|
| 23 | # create forward declarations for gcc builtins |
---|
[159c62e] | 24 | extras.cf : extras.regx extras.c |
---|
| 25 | @BACKEND_CC@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf |
---|
[00cc023] | 26 | |
---|
| 27 | builtins.cf : builtins.c |
---|
[159c62e] | 28 | if [ -e $< ] ; then \ |
---|
[00cc023] | 29 | @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ |
---|
| 30 | fi |
---|
| 31 | |
---|
| 32 | builtins.c : builtins.def prototypes.awk |
---|
[159c62e] | 33 | if [ -e $< ] ; then \ |
---|
[00cc023] | 34 | @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ |
---|
| 35 | fi |
---|
| 36 | |
---|
| 37 | builtins.def : |
---|
| 38 | |
---|
[db82596] | 39 | prototypes.awk : |
---|
| 40 | |
---|
[159c62e] | 41 | MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} |
---|
[d3b7937] | 42 | |
---|
| 43 | #-------------------------------------------------- |
---|
[aa30dc0] | 44 | |
---|
[159c62e] | 45 | libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf |
---|
[d3b7937] | 46 | ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install |
---|
[00cc023] | 47 | |
---|
| 48 | libcfa-prelude.o : libcfa-prelude.c |
---|
[d3b7937] | 49 | @BACKEND_CC@ -c -o $@ $< |
---|
| 50 | |
---|
[d2a182e] | 51 | CFLAGS = -quiet -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2 |
---|
[d63eeb0] | 52 | CC = ${abs_top_srcdir}/src/driver/cfa |
---|
[d3b7937] | 53 | |
---|
[5d28a19] | 54 | headers = limits stdlib math iostream fstream iterator rational containers/vector |
---|
[89ce869] | 55 | libobjs = ${headers:=.o} |
---|
[ac78e25] | 56 | |
---|
[89ce869] | 57 | # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing |
---|
| 58 | % : %.c |
---|
| 59 | @true |
---|
[ac78e25] | 60 | |
---|
[3a808fd] | 61 | ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
[d3b7937] | 62 | |
---|
[7f8b740] | 63 | libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} |
---|
[bd85400] | 64 | |
---|
[159c62e] | 65 | nobase_include_HEADERS = ${headers} stdio.h |
---|
[d3b7937] | 66 | |
---|
[f326f99] | 67 | CLEANFILES = libcfa-prelude.c |
---|
[159c62e] | 68 | |
---|
| 69 | maintainer-clean-local: |
---|
| 70 | -rm -rf ${includedir}/* |
---|