source: libcfa/src/Makefile.am @ c59712e

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexer
Last change on this file since c59712e was c59712e, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Parent make now seems to properly call libcfa

  • 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 : Tue Jul 24 17:25:39 2018
14## Update Count     : 240
15###############################################################################
16
17# create object files in directory with source files
18AUTOMAKE_OPTIONS = subdir-objects
19ARFLAGS = cr
20
21libdir = ${CFA_LIBDIR}
22lib_LIBRARIES =  libcfa.a
23
24libcfa-prelude.o : libcfa-prelude.c
25         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -Wall -O2 -c -o $@ $<
26
27EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ $(DEFAULT_INCLUDES)
28
29AM_CCASFLAGS = @CFA_FLAGS@
30
31#CFLAGS for most libcfa src
32#use -no-include-stdhdr to prevent rebuild cycles
33#The built sources must not depend on the installed headers
34CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@ ${EXTRA_FLAGS}
35CC = @CFACC@
36
37headers = fstream iostream iterator limits rational time stdlib common \
38          containers/maybe containers/pair containers/result containers/vector
39
40# not all platforms support concurrency, add option do disable it
41headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex
42
43libobjs = ${headers:=.o}
44libsrc = libcfa-prelude.c startup.c interpose.c bits/debug.c assert.c exception.c virtual.c heap.c \
45        ${headers:=.c}
46
47# not all platforms support concurrency, add option do disable it
48libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c concurrency/invoke.c concurrency/preemption.c
49
50# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
51# SKULLDUGGERY in order to make sure this isn't called make the rule always fail but also create a rule for headers
52% : %.c
53        echo "Dummy rule, should never be called"
54        false
55
56# This rule should always match headers and since it has no prerequisite it will never be called
57$(addprefix $(srcdir)/,$(headers)):
58        echo "Dummy rule, should never be called"
59        false
60
61concurrency/invoke.o : concurrency/invoke.c
62        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
63
64exception.o : exception.c
65        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
66
67virtual.o : virtual.c
68        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
69
70${libobjs} : @CFACPP@ ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
71
72libcfa_a_SOURCES = ${libsrc}
73libcfa_a_CFLAGS = -nodebug -O2
74
75stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "}
76
77cfa_includedir = $(CFA_INCDIR)
78nobase_cfa_include_HEADERS =    \
79        ${headers}              \
80        ${stdhdr}               \
81        math                    \
82        gmp                     \
83        time_t.h                \
84        bits/align.h            \
85        bits/containers.h       \
86        bits/defs.h             \
87        bits/debug.h            \
88        bits/locks.h            \
89        concurrency/invoke.h
90
91CLEANFILES = libcfa-prelude.c
92
93maintainer-clean-local:
94        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
Note: See TracBrowser for help on using the repository browser.