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

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since 37efaf56 was 37efaf56, checked in by Thierry Delisle <tdelisle@…>, 9 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
RevLine 
[00cc023]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##
[d63eeb0]8## Makefile.am --
[00cc023]9##
10## Author : Peter A. Buhr
11## Created On : Sun May 31 08:54:01 2015
12## Last Modified By : Peter A. Buhr
[6d665d9]13## Last Modified On : Fri Aug 26 12:03:37 2016
14## Update Count : 199
[00cc023]15###############################################################################
16
[a922e34]17# create object files in directory with source files
18AUTOMAKE_OPTIONS = subdir-objects
19
[3d50aaf]20lib_LIBRARIES =
21
22if BUILD_RELEASE
23lib_LIBRARIES += libcfa.a
24endif
25
26if BUILD_DEBUG
27lib_LIBRARIES += libcfa-d.a
28endif
[00cc023]29
30# put into lib for now
31cfalibdir = ${libdir}
[159c62e]32cfalib_DATA = builtins.cf extras.cf prelude.cf
[00cc023]33
[a922e34]34# create extra forward types/declarations to reduce inclusion of library files
[159c62e]35extras.cf : extras.regx extras.c
[d0542c4]36 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf
[00cc023]37
[a922e34]38# create forward declarations for gcc builtins
[00cc023]39builtins.cf : builtins.c
[d0542c4]40 ${AM_V_GEN}if [ -e $< ] ; then \
[00cc023]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
[d0542c4]45 ${AM_V_GEN}if [ -e $< ] ; then \
[00cc023]46 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
47 fi
48
49builtins.def :
50
[db82596]51prototypes.awk :
52
[159c62e]53MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
[d3b7937]54
55#--------------------------------------------------
[aa30dc0]56
[159c62e]57libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf
[d0542c4]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
[00cc023]59
[37efaf56]60libcfa_a-libcfa-prelude.o : libcfa-prelude.c
61 ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $<
[d3b7937]62
[37efaf56]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@
[d7bcbf5]67
[e4745d7a]68AM_CCASFLAGS = @CFA_FLAGS@
[37efaf56]69CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
[d63eeb0]70CC = ${abs_top_srcdir}/src/driver/cfa
[d3b7937]71
[f773f67]72headers = limits stdlib math iostream fstream iterator rational assert containers/vector concurrency/threads
[0e76cf4f]73runtimehdrs = concurrency
[89ce869]74libobjs = ${headers:=.o}
[ac78e25]75
[89ce869]76# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
77% : %.c
78 @true
[ac78e25]79
[37efaf56]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 $@ $<
[d7bcbf5]85
[d0542c4]86${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
[d3b7937]87
[3d50aaf]88libsrc = libcfa-prelude.c ${headers:=.c} concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
89
90libcfa_a_SOURCES = ${libsrc}
[37efaf56]91libcfa_a_CFLAGS = -nodebug -O2
[3d50aaf]92libcfa_d_a_SOURCES = ${libsrc}
[37efaf56]93libcfa_d_a_CFLAGS = -debug -O0
[bd85400]94
[ed0e67a]95stdhdr = ${shell echo stdhdr/*}
96
[a68caae]97nobase_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h
[d3b7937]98
[f326f99]99CLEANFILES = libcfa-prelude.c
[159c62e]100
101maintainer-clean-local:
102 -rm -rf ${includedir}/*
Note: See TracBrowser for help on using the repository browser.