source: src/libcfa/Makefile.am @ 04c8bba

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 04c8bba was 3d50aaf, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Build process now properly only builds libcfa.a and libcfa-d.a according to configure (both libs are still the same)

  • Property mode set to 100644
File size: 3.2 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 : Fri Aug 26 12:03:37 2016
14## Update Count     : 199
15###############################################################################
16
17# create object files in directory with source files
18AUTOMAKE_OPTIONS = subdir-objects
19
20lib_LIBRARIES =
21
22if BUILD_RELEASE
23lib_LIBRARIES += libcfa.a
24endif
25
26if BUILD_DEBUG
27lib_LIBRARIES += libcfa-d.a
28endif
29
30# put into lib for now
31cfalibdir = ${libdir}
32cfalib_DATA = builtins.cf extras.cf prelude.cf
33
34# create extra forward types/declarations to reduce inclusion of library files
35extras.cf : extras.regx extras.c
36        ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf
37
38# create forward declarations for gcc builtins
39builtins.cf : builtins.c
40        ${AM_V_GEN}if [ -e $< ] ; then \
41                @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \
42        fi
43
44builtins.c : builtins.def prototypes.awk
45        ${AM_V_GEN}if [ -e $< ] ; then \
46                @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
47        fi
48
49builtins.def :
50
51prototypes.awk :
52
53MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
54
55#--------------------------------------------------
56
57libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf
58        ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
59
60libcfa-prelude.o : libcfa-prelude.c
61         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -c -o $@ $<
62
63EXTRA_FLAGS = \
64        -g \
65        -Wall \
66        -Wno-unused-function \
67        @CFA_FLAGS@ \
68        -I${abs_top_srcdir}/src/libcfa/libhdr \
69        # TEMPORARY: does not build with -O2
70
71AM_CCASFLAGS = @CFA_FLAGS@
72CFLAGS = ${EXTRA_FLAGS} -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver
73CC = ${abs_top_srcdir}/src/driver/cfa
74
75headers = limits stdlib math iostream fstream iterator rational assert containers/vector concurrency/threads
76runtimehdrs = concurrency
77libobjs = ${headers:=.o}
78
79# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
80% : %.c
81        @true
82
83concurrency/invoke.o : concurrency/invoke.c
84        $(AM_V_CC) @BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. ${EXTRA_FLAGS} -c -o $@ $<
85
86${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
87
88libsrc = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
89
90libcfa_a_SOURCES = ${libsrc}
91
92libcfa_d_a_SOURCES = ${libsrc}
93
94stdhdr = ${shell echo stdhdr/*}
95
96nobase_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
97
98CLEANFILES = libcfa-prelude.c
99
100maintainer-clean-local:
101        -rm -rf ${includedir}/*
Note: See TracBrowser for help on using the repository browser.