source: libcfa/prelude/Makefile.am @ 64eeb06

Last change on this file since 64eeb06 was be3f163, checked in by Peter A. Buhr <pabuhr@…>, 14 months ago

rename files gcc-builtins.cf builtins.cf extras.cf bootloader.cf and sync-builtins.cf with suffix .cfa

  • Property mode set to 100644
File size: 3.4 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 Nov  1 21:09:25 2023
14## Update Count     : 221
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.cfa builtins.cfa extras.cfa prelude.cfa bootloader.c defines.hfa
24
25EXTRA_DIST = bootloader.cfa builtins.c builtins.def extras.c extras.regx extras.regx2 prelude-gen.cc prototypes.awk prototypes.c prototypes.sed sync-builtins.cfa
26
27CC = @LOCAL_CFACC@
28AM_CFLAGS = -g -Wall -Werror=return-type -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
29AM_CFAFLAGS = @CONFIG_CFAFLAGS@
30
31$(DEPDIR) :
32        mkdir $(DEPDIR)
33
34$(DEPDIR)/builtins.Po : $(DEPDIR)
35        touch ${@}
36
37# create extra forward types/declarations to reduce inclusion of library files
38extras.cfa : ${srcdir}/extras.regx ${srcdir}/extras.c
39        @echo '# 2 "${@}"  // needed for error messages from this file' > ${@}
40        ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx >> ${@}
41        ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${srcdir}/extras.c | grep -zo -f ${srcdir}/extras.regx2 | tr '\0' '\n' >> ${@}
42
43# create forward declarations for gcc builtins
44gcc-builtins.cfa : gcc-builtins.c ${srcdir}/prototypes.sed
45        @echo '# 2 "${@}"  // needed for error messages from this file' > ${@}
46        ${AM_V_GEN}gcc -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed >> ${@}
47
48gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cfa ${srcdir}/prototypes.c
49        ${AM_V_GEN}gcc -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > ${@}
50
51prelude.cfa : prelude-gen.cc
52        ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${AM_CFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++17
53        @./prelude-gen > ${@}
54        @rm ./prelude-gen
55
56builtins.def :
57
58prototypes.awk :
59
60# create forward declarations for cfa builtins
61builtins.cfa : builtins.c @LOCAL_CFACC@
62        ${AM_V_GEN}gcc ${AM_CFLAGS} -E ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po -D__cforall
63        ${AM_V_at}sed -i 's/builtins.o/builtins.cfa/g' $(DEPDIR)/builtins.Po
64
65include $(DEPDIR)/builtins.Po
66
67bootloader.c : ${srcdir}/bootloader.cfa prelude.cfa extras.cfa gcc-builtins.cfa builtins.cfa @CFACPP@
68        ${AM_V_GEN}@CFACPP@ --prelude-dir=${builddir} -tpm ${srcdir}/bootloader.cfa ${@}  # use src/cfa-cpp as not in lib until after install
69
70maintainer-clean-local :
71        rm -rf $(DEPDIR)
72
73MOSTLYCLEANFILES = bootloader.c builtins.cfa extras.cfa gcc-builtins.c gcc-builtins.cfa prelude.cfa
74DISTCLEANFILES = $(DEPDIR)/builtins.Po
75MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
76
77if ENABLE_DISTCC
78distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ defines.hfa gcc-builtins.cfa builtins.cfa extras.cfa prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh
79        ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ @DIST_BWLIMIT@
80        @echo "Dummy file to track distribution to remote hosts" > ${@}
81
82all: all-am distribution
83endif ENABLE_DISTCC
Note: See TracBrowser for help on using the repository browser.