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