| [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
 | 
|---|
| [20b461f] | 13 | ## Last Modified On : Mon Jul 15 22:43:27 2019
 | 
|---|
 | 14 | ## Update Count     : 241
 | 
|---|
| [00cc023] | 15 | ###############################################################################
 | 
|---|
 | 16 | 
 | 
|---|
| [a922e34] | 17 | # create object files in directory with source files
 | 
|---|
| [38d12e7] | 18 | AUTOMAKE_OPTIONS = foreign subdir-objects
 | 
|---|
 | 19 | ACLOCAL_AMFLAGS  = -I automake
 | 
|---|
| [a922e34] | 20 | 
 | 
|---|
| [ba9baad] | 21 | include $(srcdir)/../../src/cfa.make
 | 
|---|
 | 22 | 
 | 
|---|
| [088a5cd] | 23 | libdir = ${CFA_LIBDIR}
 | 
|---|
| [8ac3b0e] | 24 | lib_LTLIBRARIES = libcfa.la libcfathread.la
 | 
|---|
| [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@
 | 
|---|
| [38d12e7] | 33 | AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
 | 
|---|
| [575a6e5] | 34 | AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
 | 
|---|
| [ba9baad] | 35 | CFACC = @CFACC@
 | 
|---|
| [d3b7937] | 36 | 
 | 
|---|
| [73abe95] | 37 | #----------------------------------------------------------------------------------------------------------------
 | 
|---|
| [e523b07] | 38 | if BUILDLIB
 | 
|---|
| [c6bbcdb] | 39 | headers_nosrc = math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
 | 
|---|
| [73abe95] | 40 | headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
 | 
|---|
 | 41 |           containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
 | 
|---|
| [facc44f] | 42 | 
 | 
|---|
| [a9fb796] | 43 | libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa ${headers:.hfa=.cfa}
 | 
|---|
| [facc44f] | 44 | 
 | 
|---|
 | 45 | # not all platforms support concurrency, add option do disable it
 | 
|---|
| [2026bb6] | 46 | thread_headers_nosrc = concurrency/invoke.h
 | 
|---|
 | 47 | thread_headers = concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa
 | 
|---|
 | 48 | thread_libsrc = concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa ${thread_headers:.hfa=.cfa}
 | 
|---|
| [e523b07] | 49 | else
 | 
|---|
 | 50 | headers =
 | 
|---|
| [2026bb6] | 51 | thread_headers =
 | 
|---|
| [e523b07] | 52 | headers_nosrc =
 | 
|---|
| [2026bb6] | 53 | thread_headers_nosrc =
 | 
|---|
| [e523b07] | 54 | libsrc =
 | 
|---|
 | 55 | endif
 | 
|---|
 | 56 | 
 | 
|---|
| [ac78e25] | 57 | 
 | 
|---|
| [73abe95] | 58 | #----------------------------------------------------------------------------------------------------------------
 | 
|---|
 | 59 | # add dependency to cfa-cpp so all libraries are rebuilt with new translator
 | 
|---|
| [e523b07] | 60 | #@CFACC@ @CFACPP@ prelude.cfa
 | 
|---|
| [a9fb796] | 61 | 
 | 
|---|
 | 62 | # add dependency of cfa files
 | 
|---|
| [6d44da1] | 63 | libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
 | 
|---|
| [e523b07] | 64 | $(libobjs) : @CFACC@ @CFACPP@ prelude.cfa
 | 
|---|
| [a9fb796] | 65 | 
 | 
|---|
| [2026bb6] | 66 | thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
 | 
|---|
 | 67 | $(thread_libobjs) : @CFACC@ @CFACPP@ prelude.cfa
 | 
|---|
 | 68 | 
 | 
|---|
| [a9fb796] | 69 | 
 | 
|---|
 | 70 | # .deps inclusion is not done automatically by automake for new languages
 | 
|---|
 | 71 | libdeps = $(join \
 | 
|---|
 | 72 |         $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
 | 
|---|
| [2a75572] | 73 |         $(notdir ${libobjs:.lo=.Plo}) \
 | 
|---|
| [a9fb796] | 74 | )
 | 
|---|
| [d3b7937] | 75 | 
 | 
|---|
| [0765121] | 76 | -include $(libdeps)
 | 
|---|
| [a9fb796] | 77 | 
 | 
|---|
| [2026bb6] | 78 | thread_libdeps = $(join \
 | 
|---|
 | 79 |         $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
 | 
|---|
 | 80 |         $(notdir ${thread_libobjs:.lo=.Plo}) \
 | 
|---|
 | 81 | )
 | 
|---|
 | 82 | 
 | 
|---|
 | 83 | -include $(thread_libdeps)
 | 
|---|
 | 84 | 
 | 
|---|
 | 85 | 
 | 
|---|
| [c6bbcdb] | 86 | prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
 | 
|---|
| [5806745] | 87 |         ${AM_V_GEN}$(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
 | 
|---|
| [d3b7937] | 88 | 
 | 
|---|
| [c6bbcdb] | 89 | prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@
 | 
|---|
 | 90 |         ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
 | 
|---|
| [5806745] | 91 |         $(CFACOMPILE) -quiet -in-tree -XCFA -l ${<} -c -o ${@}
 | 
|---|
| [a9fb796] | 92 | 
 | 
|---|
 | 93 | 
 | 
|---|
 | 94 | #----------------------------------------------------------------------------------------------------------------
 | 
|---|
| [6d44da1] | 95 | libcfa_la_SOURCES = prelude.cfa ${libsrc}
 | 
|---|
| [c6bbcdb] | 96 | libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
 | 
|---|
| [bd85400] | 97 | 
 | 
|---|
| [2026bb6] | 98 | libcfathread_la_SOURCES = ${thread_libsrc}
 | 
|---|
 | 99 | libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
 | 
|---|
 | 100 | 
 | 
|---|
| [38d12e7] | 101 | stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
 | 
|---|
| [ed0e67a] | 102 | 
 | 
|---|
| [e958ff8] | 103 | cfa_includedir = $(CFA_INCDIR)
 | 
|---|
| [2026bb6] | 104 | nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc} ${thread_headers} ${thread_headers_nosrc}
 | 
|---|
| [73abe95] | 105 | 
 | 
|---|
 | 106 | #----------------------------------------------------------------------------------------------------------------
 | 
|---|
| [159c62e] | 107 | maintainer-clean-local:
 | 
|---|
| [796cea3] | 108 |         -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
 | 
|---|
| [a9fb796] | 109 | 
 | 
|---|
 | 110 | 
 | 
|---|
 | 111 | # $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
 | 
|---|
 | 112 | #       $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
 | 
|---|
 | 113 | #       $(am__mv) $$depbase.Tpo $$depbase.Po
 | 
|---|