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 : Sat Mar 25 18:00:10 2017 |
---|
14 | ## Update Count : 212 |
---|
15 | ############################################################################### |
---|
16 | |
---|
17 | # create object files in directory with source files |
---|
18 | AUTOMAKE_OPTIONS = subdir-objects |
---|
19 | |
---|
20 | libdir = ${CFA_LIBDIR} |
---|
21 | lib_LIBRARIES = |
---|
22 | |
---|
23 | if BUILD_RELEASE |
---|
24 | lib_LIBRARIES += libcfa.a |
---|
25 | endif |
---|
26 | |
---|
27 | if BUILD_DEBUG |
---|
28 | lib_LIBRARIES += libcfa-d.a |
---|
29 | endif |
---|
30 | |
---|
31 | libcfa_a-libcfa-prelude.o : libcfa-prelude.c |
---|
32 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $< |
---|
33 | |
---|
34 | libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c |
---|
35 | ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $< |
---|
36 | |
---|
37 | EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@ |
---|
38 | |
---|
39 | AM_CCASFLAGS = @CFA_FLAGS@ |
---|
40 | CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS} |
---|
41 | CC = ${abs_top_srcdir}/src/driver/cfa |
---|
42 | |
---|
43 | headers = limits stdlib math iostream fstream iterator rational assert containers/vector |
---|
44 | |
---|
45 | # not all platforms support concurrency, add option do disable it |
---|
46 | if BUILD_CONCURRENCY |
---|
47 | headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor |
---|
48 | endif |
---|
49 | |
---|
50 | libobjs = ${headers:=.o} |
---|
51 | libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} |
---|
52 | |
---|
53 | # not all platforms support concurrency, add option do disable it |
---|
54 | if BUILD_CONCURRENCY |
---|
55 | libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c |
---|
56 | endif |
---|
57 | |
---|
58 | # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing |
---|
59 | % : %.c |
---|
60 | @true |
---|
61 | |
---|
62 | concurrency/libcfa_a-invoke.o : concurrency/invoke.c |
---|
63 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< |
---|
64 | |
---|
65 | concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c |
---|
66 | ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< |
---|
67 | |
---|
68 | ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
69 | |
---|
70 | libcfa_a_SOURCES = ${libsrc} |
---|
71 | libcfa_a_CFLAGS = -nodebug -O2 |
---|
72 | libcfa_d_a_SOURCES = ${libsrc} |
---|
73 | libcfa_d_a_CFLAGS = -debug -O0 |
---|
74 | |
---|
75 | stdhdr = ${shell echo stdhdr/*} |
---|
76 | |
---|
77 | cfa_includedir = $(CFA_INCDIR) |
---|
78 | nobase_cfa_include_HEADERS = ${headers} ${stdhdr} concurrency/invoke.h |
---|
79 | |
---|
80 | CLEANFILES = libcfa-prelude.c |
---|
81 | |
---|
82 | maintainer-clean-local: |
---|
83 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} |
---|