source: src/libcfa/Makefile.am @ 37efaf56

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 37efaf56 was 37efaf56, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Now compiling libcfa.a and libcfa-d.a with proper flags, both lib now actually differ

  • Property mode set to 100644
File size: 3.5 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_a-libcfa-prelude.o : libcfa-prelude.c
61         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $<
62
63libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c
64         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $<
65
66EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr       @CFA_FLAGS@
67
68AM_CCASFLAGS = @CFA_FLAGS@
69CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
70CC = ${abs_top_srcdir}/src/driver/cfa
71
72headers = limits stdlib math iostream fstream iterator rational assert containers/vector concurrency/threads
73runtimehdrs = concurrency
74libobjs = ${headers:=.o}
75
76# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
77% : %.c
78        @true
79
80concurrency/libcfa_a-invoke.o : concurrency/invoke.c
81        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
82
83concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
84        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${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}
91libcfa_a_CFLAGS = -nodebug -O2
92libcfa_d_a_SOURCES = ${libsrc}
93libcfa_d_a_CFLAGS = -debug -O0
94
95stdhdr = ${shell echo stdhdr/*}
96
97nobase_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
98
99CLEANFILES = libcfa-prelude.c
100
101maintainer-clean-local:
102        -rm -rf ${includedir}/*
Note: See TracBrowser for help on using the repository browser.