source: src/libcfa/Makefile.am @ a8a7612

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprno_listpersistent-indexerpthread-emulationqualifiedEnum
Last change on this file since a8a7612 was 4f18de3, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Tentative fix for extensionless headers getting deleted

  • Property mode set to 100644
File size: 4.1 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 =
23
24if BUILD_RELEASE
25lib_LIBRARIES += libcfa.a
26endif
27
28if BUILD_DEBUG
29lib_LIBRARIES += libcfa-d.a
30endif
31
32libcfa_a-libcfa-prelude.o : libcfa-prelude.c
33         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -Wall -O2 -c -o $@ $<
34
35libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c
36         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -Wall -O0 -c -o $@ $<
37
38EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ $(DEFAULT_INCLUDES)
39
40AM_CCASFLAGS = @CFA_FLAGS@
41
42#CFLAGS for most libcfa src
43#use -no-include-stdhdr to prevent rebuild cycles
44#The built sources must not depend on the installed headers
45CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver ${EXTRA_FLAGS}
46CC = ${abs_top_builddir}/src/driver/cfa
47
48headers = fstream iostream iterator limits rational time stdlib common \
49          containers/maybe containers/pair containers/result containers/vector
50
51# not all platforms support concurrency, add option do disable it
52if BUILD_CONCURRENCY
53headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex
54endif
55
56libobjs = ${headers:=.o}
57libsrc = libcfa-prelude.c startup.c interpose.c bits/debug.c assert.c exception.c virtual.c heap.c \
58        ${headers:=.c}
59
60# not all platforms support concurrency, add option do disable it
61if BUILD_CONCURRENCY
62libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c concurrency/invoke.c concurrency/preemption.c
63endif
64
65# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
66# SKULLDUGGERY in order to make sure this isn't called make the rule always fail but also create a rule for headers
67% : %.c
68        echo "Dummy rule, should never be called"
69        false
70
71# This rule should always match headers and since it has no prerequisite it will never be called
72$(addprefix $(srcdir)/,$(headers)):
73        echo "Dummy rule, should never be called"
74        false
75
76concurrency/libcfa_a-invoke.o : concurrency/invoke.c
77        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
78
79libcfa_a-exception.o : exception.c
80        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
81
82libcfa_a-virtual.o : virtual.c
83        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
84
85concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c
86        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
87
88libcfa_d_a-exception.o : exception.c
89        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
90
91libcfa_d_a-virtual.o : virtual.c
92        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $<
93
94${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
95
96libcfa_a_SOURCES = ${libsrc}
97libcfa_a_CFLAGS = -nodebug -O2
98libcfa_d_a_SOURCES = ${libsrc}
99libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug
100
101stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "}
102
103cfa_includedir = $(CFA_INCDIR)
104nobase_cfa_include_HEADERS =    \
105        ${headers}              \
106        ${stdhdr}               \
107        math                    \
108        gmp                     \
109        time_t.h                \
110        bits/align.h            \
111        bits/containers.h       \
112        bits/defs.h             \
113        bits/debug.h            \
114        bits/locks.h            \
115        concurrency/invoke.h
116
117CLEANFILES = libcfa-prelude.c
118
119maintainer-clean-local:
120        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
Note: See TracBrowser for help on using the repository browser.