source: src/libcfa/Makefile.am @ 89ce869

aaron-thesisarm-ehcleanup-dtorsctordeferred_resndemanglergc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since 89ce869 was 89ce869, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

prevent deletion of extensionless header files, third attempt

  • 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 : Wed Jun  8 14:20:34 2016
14## Update Count     : 165
15###############################################################################
16
17lib_LIBRARIES = libcfa.a
18
19# put into lib for now
20cfalibdir = ${libdir}
21cfalib_DATA = prelude.cf builtins.cf
22
23# create forward declarations for gcc builtins
24${libdir}/builtins.cf : ${libdir} ${srcdir}/builtins.cf
25        ${INSTALL} ${srcdir}/builtins.cf ${libdir}
26        sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ${srcdir}/ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" ${srcdir}/prelude.cf
27
28builtins.cf : builtins.c
29        @if [ -e $< ] ; then \
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
33builtins.c : builtins.def prototypes.awk
34        @if [ -e $< ] ; then \
35                @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
36        fi
37
38builtins.def :
39
40prototypes.awk :
41
42MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
43
44#--------------------------------------------------
45
46libcfa-prelude.c : ${srcdir}/prelude.cf
47        ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
48
49libcfa-prelude.o : libcfa-prelude.c
50        @BACKEND_CC@ -c -o $@ $<
51
52CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t  # TEMPORARY: does not build with -O2
53CC = ${abs_top_srcdir}/src/driver/cfa
54
55headers = limits stdlib math iostream fstream iterator rational
56libobjs = ${headers:=.o}
57
58# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
59% : %.c
60        @true
61
62${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp       # add dependency to cfa-cpp so all libraries are rebuilt with new translator
63
64libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c}
65
66include_HEADERS = ${headers}
67
68CLEANFILES = libcfa-prelude.c
69MAINTAINERCLEANFILES += ${includedir}/*
Note: See TracBrowser for help on using the repository browser.