[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 |
---|
| 18 | AUTOMAKE_OPTIONS = subdir-objects |
---|
| 19 | |
---|
| 20 | # put into lib for now |
---|
[088a5cd] | 21 | cfalibdir = ${CFA_LIBDIR} |
---|
[807ce84] | 22 | cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cf bootloader.c |
---|
[375a068] | 23 | noinst_DATA = ../libcfa/libcfa-prelude.c |
---|
| 24 | |
---|
[50697b0] | 25 | CC = @CFACC@ |
---|
[307a732] | 26 | |
---|
[8c680e9] | 27 | $(DEPDIR) : |
---|
| 28 | mkdir $(DEPDIR) |
---|
| 29 | |
---|
| 30 | $(DEPDIR)/builtins.Po : $(DEPDIR) |
---|
| 31 | touch ${@} |
---|
| 32 | |
---|
[375a068] | 33 | # create extra forward types/declarations to reduce inclusion of library files |
---|
[e9546f9] | 34 | extras.cf : ${srcdir}/extras.regx ${srcdir}/extras.c |
---|
| 35 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f ${srcdir}/extras.regx > extras.cf |
---|
[375a068] | 36 | |
---|
| 37 | # create forward declarations for gcc builtins |
---|
[e9546f9] | 38 | gcc-builtins.cf : gcc-builtins.c ${srcdir}/prototypes.sed |
---|
| 39 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E -P $< | sed -r -f ${srcdir}/prototypes.sed > $@ |
---|
[375a068] | 40 | |
---|
[e9546f9] | 41 | gcc-builtins.c : ${srcdir}/builtins.def ${srcdir}/prototypes.awk ${srcdir}/sync-builtins.cf ${srcdir}/prototypes.c |
---|
| 42 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -I${srcdir} -E ${srcdir}/prototypes.c | awk -f ${srcdir}/prototypes.awk > $@ |
---|
[375a068] | 43 | |
---|
[1d386a7] | 44 | prelude.cf : prelude-gen.cc |
---|
[250e29a] | 45 | ${AM_V_GEN}${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} ${<} -o prelude-gen -Wall -Wextra -O2 -g -std=c++14 |
---|
[1d386a7] | 46 | @./prelude-gen > $@ |
---|
| 47 | @rm ./prelude-gen |
---|
| 48 | |
---|
[375a068] | 49 | builtins.def : |
---|
| 50 | |
---|
| 51 | prototypes.awk : |
---|
| 52 | |
---|
[807ce84] | 53 | # create forward declarations for cfa builtins |
---|
[307a732] | 54 | builtins.cf : builtins.c ${CC} |
---|
| 55 | ${AM_V_GEN}${CC} -E -P ${<} -o ${@} -MD -MP -MF $(DEPDIR)/builtins.Po |
---|
[8c680e9] | 56 | ${AM_V_at}sed -i 's/builtins.o/builtins.cf/g' $(DEPDIR)/builtins.Po |
---|
| 57 | |
---|
| 58 | include $(DEPDIR)/builtins.Po |
---|
[807ce84] | 59 | |
---|
[50697b0] | 60 | ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ |
---|
| 61 | ${AM_V_GEN}@CFACPP@ -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install |
---|
[375a068] | 62 | |
---|
[50697b0] | 63 | bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@ |
---|
| 64 | ${AM_V_GEN}@CFACPP@ -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install |
---|
[375a068] | 65 | |
---|
[8c680e9] | 66 | maintainer-clean-local : |
---|
| 67 | rm -rf $(DEPDIR) |
---|
| 68 | |
---|
[250e29a] | 69 | MAINTAINERCLEANFILES = gcc-builtins.c gcc-builtins.cf builtins.cf extras.cf bootloader.c prelude.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} |
---|