[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 |
---|
[a9fb796] | 18 | AUTOMAKE_OPTIONS = foreign 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 | |
---|
[a9fb796] | 26 | VPATH += :../prelude |
---|
| 27 | |
---|
[ba9baad] | 28 | # AM_CFLAGS for all cfa source |
---|
| 29 | # AM_CFAFLAGS for only cfa source |
---|
| 30 | # use -no-include-stdhdr to prevent rebuild cycles |
---|
| 31 | # The built sources must not depend on the installed headers |
---|
[a9fb796] | 32 | AM_CFAFLAGS = -quiet -in-tree -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ |
---|
[575a6e5] | 33 | AM_CFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ |
---|
| 34 | AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ |
---|
[ba9baad] | 35 | CFACC = @CFACC@ |
---|
[d3b7937] | 36 | |
---|
[73abe95] | 37 | #---------------------------------------------------------------------------------------------------------------- |
---|
[e523b07] | 38 | if BUILDLIB |
---|
[73abe95] | 39 | headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \ |
---|
| 40 | containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa |
---|
[facc44f] | 41 | |
---|
[e523b07] | 42 | headers_nosrc = math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa |
---|
| 43 | |
---|
[facc44f] | 44 | # not all platforms support concurrency, add option do disable it |
---|
[73abe95] | 45 | headers += concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa |
---|
[facc44f] | 46 | |
---|
[e523b07] | 47 | headers_nosrc += concurrency/invoke.h |
---|
| 48 | |
---|
[a9fb796] | 49 | libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa ${headers:.hfa=.cfa} |
---|
[facc44f] | 50 | |
---|
| 51 | # not all platforms support concurrency, add option do disable it |
---|
[37fe352] | 52 | libsrc += concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa |
---|
[e523b07] | 53 | else |
---|
| 54 | headers = |
---|
| 55 | headers_nosrc = |
---|
| 56 | libsrc = |
---|
| 57 | endif |
---|
| 58 | |
---|
[ac78e25] | 59 | |
---|
[73abe95] | 60 | #---------------------------------------------------------------------------------------------------------------- |
---|
| 61 | # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
[e523b07] | 62 | #@CFACC@ @CFACPP@ prelude.cfa |
---|
[a9fb796] | 63 | |
---|
| 64 | # add dependency of cfa files |
---|
| 65 | libobjs = $(addsuffix .o, $(basename $(filter %.cfa,$(libsrc)))) |
---|
[e523b07] | 66 | $(libobjs) : @CFACC@ @CFACPP@ prelude.cfa |
---|
[a9fb796] | 67 | |
---|
| 68 | |
---|
| 69 | # .deps inclusion is not done automatically by automake for new languages |
---|
| 70 | libdeps = $(join \ |
---|
| 71 | $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \ |
---|
| 72 | $(notdir ${libobjs:.o=.Po}) \ |
---|
| 73 | ) |
---|
| 74 | |
---|
| 75 | -include $(libdeps) |
---|
| 76 | |
---|
[e523b07] | 77 | prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ |
---|
| 78 | ${AM_V_GEN}@CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree -XCFA -l ${<} -c -o ${@} |
---|
[d3b7937] | 79 | |
---|
[a9fb796] | 80 | |
---|
| 81 | |
---|
| 82 | #---------------------------------------------------------------------------------------------------------------- |
---|
[e523b07] | 83 | libcfa_a_SOURCES = prelude.cfa ${libsrc} |
---|
[bd85400] | 84 | |
---|
[e9546f9] | 85 | stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} |
---|
[ed0e67a] | 86 | |
---|
[e958ff8] | 87 | cfa_includedir = $(CFA_INCDIR) |
---|
[e523b07] | 88 | nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc} |
---|
[73abe95] | 89 | |
---|
| 90 | #---------------------------------------------------------------------------------------------------------------- |
---|
[159c62e] | 91 | maintainer-clean-local: |
---|
[796cea3] | 92 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} |
---|
[a9fb796] | 93 | |
---|
| 94 | |
---|
| 95 | # $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ |
---|
| 96 | # $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ |
---|
| 97 | # $(am__mv) $$depbase.Tpo $$depbase.Po |
---|