source: libcfa/prelude/Makefile.am @ d43ed2c

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resnenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since d43ed2c was 38d12e7, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Adjusted makefiles to use libtool

  • Property mode set to 100644
File size: 2.8 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 Dec 14 15:00:35 2016
14## Update Count     : 205
15###############################################################################
16
17# create object files in directory with source files
18AUTOMAKE_OPTIONS = foreign subdir-objects
19ACLOCAL_AMFLAGS  = -I automake
20
21# put into lib for now
22cfalibdir = ${CFA_LIBDIR}
23cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c
24noinst_DATA = ../src/prelude.c
25
26CC = @CFACC@
27AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
28AM_CFAFLAGS = @CONFIG_CFAFLAGS@
29
30$(DEPDIR) :
31        mkdir $(DEPDIR)
32
33$(DEPDIR)/builtins.Po : $(DEPDIR)
34        touch ${@}
35
36# create extra forward types/declarations to reduce inclusion of library files
37extras.cf : ${srcdir}/extras.regx ${srcdir}/extras.c
38        ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf
39
40# create forward declarations for gcc builtins
41gcc-builtins.cf : gcc-builtins.c ${srcdir}/prototypes.sed
42        ${AM_V_GEN}gcc -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@
43
44gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cf ${srcdir}/prototypes.c
45        ${AM_V_GEN}gcc -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@
46
47prelude.cf : prelude-gen.cc
48        ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14
49        @./prelude-gen > $@
50        @rm ./prelude-gen
51
52builtins.def :
53
54prototypes.awk :
55
56# create forward declarations for cfa builtins
57builtins.cf : builtins.c ${CC}
58        ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po
59        ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po
60
61include $(DEPDIR)/builtins.Po
62
63../src/prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
64        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
65
66bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
67        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
68
69maintainer-clean-local :
70        rm -rf $(DEPDIR)
71
72MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cf
73MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
Note: See TracBrowser for help on using the repository browser.