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