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