[00cc023] | 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 | ## |
---|
[d63eeb0] | 8 | ## Makefile.am -- |
---|
[00cc023] | 9 | ## |
---|
| 10 | ## Author : Peter A. Buhr |
---|
| 11 | ## Created On : Sun May 31 08:54:01 2015 |
---|
[381fdee] | 12 | ## Last Modified By : Peter A. Buhr |
---|
[891790ef] | 13 | ## Last Modified On : Tue Jul 24 17:25:39 2018 |
---|
| 14 | ## Update Count : 240 |
---|
[00cc023] | 15 | ############################################################################### |
---|
| 16 | |
---|
[a922e34] | 17 | # create object files in directory with source files |
---|
| 18 | AUTOMAKE_OPTIONS = subdir-objects |
---|
[52a9004] | 19 | ARFLAGS = cr |
---|
[a922e34] | 20 | |
---|
[ba9baad] | 21 | include $(srcdir)/../../src/cfa.make |
---|
| 22 | |
---|
[088a5cd] | 23 | libdir = ${CFA_LIBDIR} |
---|
[c59712e] | 24 | lib_LIBRARIES = libcfa.a |
---|
[3d50aaf] | 25 | |
---|
[ba9baad] | 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@ -imacros prelude.c -I$(srcdir)/stdhdr |
---|
| 31 | AM_CFLAGS = -g -Wall -Wno-unused-function |
---|
| 32 | CFACC = @CFACC@ |
---|
[d3b7937] | 33 | |
---|
[0fc52b6] | 34 | headers = fstream iostream iterator limits rational time stdlib common \ |
---|
[64fc0ba] | 35 | containers/maybe containers/pair containers/result containers/vector |
---|
[facc44f] | 36 | |
---|
| 37 | # not all platforms support concurrency, add option do disable it |
---|
[09800e9] | 38 | headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex |
---|
[facc44f] | 39 | |
---|
[89ce869] | 40 | libobjs = ${headers:=.o} |
---|
[ba9baad] | 41 | libsrc = prelude.c startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa \ |
---|
| 42 | ${headers:=.cfa} |
---|
[facc44f] | 43 | |
---|
| 44 | # not all platforms support concurrency, add option do disable it |
---|
[ba9baad] | 45 | libsrc += concurrency/CtxSwitch-@host_alias@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa |
---|
[ac78e25] | 46 | |
---|
[89ce869] | 47 | # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing |
---|
[4f18de3] | 48 | # SKULLDUGGERY in order to make sure this isn't called make the rule always fail but also create a rule for headers |
---|
[89ce869] | 49 | % : %.c |
---|
[4f18de3] | 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 |
---|
[ac78e25] | 57 | |
---|
[6ea87486] | 58 | |
---|
[ba9baad] | 59 | ${libobjs} : ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
[d3b7937] | 60 | |
---|
[3d50aaf] | 61 | libcfa_a_SOURCES = ${libsrc} |
---|
[bd85400] | 62 | |
---|
[e9546f9] | 63 | stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} |
---|
[ed0e67a] | 64 | |
---|
[e958ff8] | 65 | cfa_includedir = $(CFA_INCDIR) |
---|
[ea7d2b0] | 66 | nobase_cfa_include_HEADERS = \ |
---|
[0fc52b6] | 67 | ${headers} \ |
---|
| 68 | ${stdhdr} \ |
---|
| 69 | math \ |
---|
| 70 | gmp \ |
---|
| 71 | time_t.h \ |
---|
[c2b9f21] | 72 | bits/align.h \ |
---|
[0fc52b6] | 73 | bits/containers.h \ |
---|
[ea7d2b0] | 74 | bits/defs.h \ |
---|
[875a72f] | 75 | bits/debug.h \ |
---|
[ea7d2b0] | 76 | bits/locks.h \ |
---|
[c2b9f21] | 77 | concurrency/invoke.h |
---|
[d3b7937] | 78 | |
---|
[ba9baad] | 79 | CLEANFILES = prelude.c |
---|
[159c62e] | 80 | |
---|
| 81 | maintainer-clean-local: |
---|
[796cea3] | 82 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} |
---|