source: libcfa/prelude/Makefile.am @ 42655e8

arm-ehcleanup-dtorsjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-expr
Last change on this file since 42655e8 was 42655e8, checked in by Rob Schluntz <rschlunt@…>, 3 years ago

Temporarily revert to using gcc for preprocessing builtins.c and add -Dcforall

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[375a068]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
[0c1b566]18AUTOMAKE_OPTIONS = foreign subdir-objects
[375a068]19
20# put into lib for now
[088a5cd]21cfalibdir = ${CFA_LIBDIR}
[807ce84]22cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c
[ba9baad]23noinst_DATA = ../src/prelude.c
[375a068]24
[50697b0]25CC = @CFACC@
[575a6e5]26AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
27AM_CFAFLAGS = @CONFIG_CFAFLAGS@
[307a732]28
[8c680e9]29$(DEPDIR) :
30        mkdir $(DEPDIR)
31
32$(DEPDIR)/builtins.Po : $(DEPDIR)
33        touch ${@}
34
[375a068]35# create extra forward types/declarations to reduce inclusion of library files
[e9546f9]36extras.cf : ${srcdir}/extras.regx ${srcdir}/extras.c
[37fe352]37        ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf
[375a068]38
39# create forward declarations for gcc builtins
[e9546f9]40gcc-builtins.cf : gcc-builtins.c ${srcdir}/prototypes.sed
[ff1e0f38]41        ${AM_V_GEN}gcc -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@
[375a068]42
[e9546f9]43gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cf ${srcdir}/prototypes.c
[ff1e0f38]44        ${AM_V_GEN}gcc -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@
[375a068]45
[1d386a7]46prelude.cf : prelude-gen.cc
[37fe352]47        ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14
[1d386a7]48        @./prelude-gen > $@
49        @rm ./prelude-gen
50
[375a068]51builtins.def :
52
53prototypes.awk :
54
[807ce84]55# create forward declarations for cfa builtins
[307a732]56builtins.cf : builtins.c ${CC}
[42655e8]57        ${AM_V_GEN}gcc ${AM_CFLAGS} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po -D__cforall
[8c680e9]58        ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po
59
60include $(DEPDIR)/builtins.Po
[807ce84]61
[ba9baad]62../src/prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
[4dcaed2]63        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
[375a068]64
[50697b0]65bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
[4dcaed2]66        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
[375a068]67
[8c680e9]68maintainer-clean-local :
69        rm -rf $(DEPDIR)
70
[37fe352]71MOSTLYCLEANFILES = bootloader.c builtins.cf extras.cf gcc-builtins.c gcc-builtins.cf prelude.cf
72MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
Note: See TracBrowser for help on using the repository browser.