source: src/libcfa/Makefile.am @ 159c62e

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 159c62e was 159c62e, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

add small set of library types/routines to prelude to reduce including larger library files

  • Property mode set to 100644
File size: 2.3 KB
Line 
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##
8## Makefile.am --
9##
10## Author           : Peter A. Buhr
11## Created On       : Sun May 31 08:54:01 2015
12## Last Modified By : Peter A. Buhr
13## Last Modified On : Tue Jul  5 16:19:31 2016
14## Update Count     : 178
15###############################################################################
16
17lib_LIBRARIES = libcfa.a
18
19# put into lib for now
20cfalibdir = ${libdir}
21cfalib_DATA = builtins.cf extras.cf prelude.cf
22
23# create forward declarations for gcc builtins
24extras.cf : extras.regx extras.c
25        @BACKEND_CC@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf
26
27builtins.cf : builtins.c
28        if [ -e $< ] ; then \
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
32builtins.c : builtins.def prototypes.awk
33        if [ -e $< ] ; then \
34                @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
35        fi
36
37builtins.def :
38
39prototypes.awk :
40
41MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
42
43#--------------------------------------------------
44
45libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf
46        ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
47
48libcfa-prelude.o : libcfa-prelude.c
49        @BACKEND_CC@ -c -o $@ $<
50
51CFLAGS = -quiet -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t  # TEMPORARY: does not build with -O2
52CC = ${abs_top_srcdir}/src/driver/cfa
53
54headers = limits stdlib math iostream fstream iterator rational containers/vector
55libobjs = ${headers:=.o}
56
57# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
58% : %.c
59        @true
60
61${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp       # add dependency to cfa-cpp so all libraries are rebuilt with new translator
62
63libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c}
64
65nobase_include_HEADERS = ${headers} stdio.h
66
67CLEANFILES = libcfa-prelude.c
68
69maintainer-clean-local:
70        -rm -rf ${includedir}/*
Note: See TracBrowser for help on using the repository browser.