[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 |
|
---|
[dee1f89] | 28 | gdbwaittarget=""
|
---|
| 29 |
|
---|
[ba9baad] | 30 | # AM_CFLAGS for all cfa source
|
---|
| 31 | # AM_CFAFLAGS for only cfa source
|
---|
| 32 | # use -no-include-stdhdr to prevent rebuild cycles
|
---|
| 33 | # The built sources must not depend on the installed headers
|
---|
[158b026] | 34 | AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
|
---|
[e8c52cf] | 35 | AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
|
---|
[575a6e5] | 36 | AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
|
---|
[ba9baad] | 37 | CFACC = @CFACC@
|
---|
[d3b7937] | 38 |
|
---|
[73abe95] | 39 | #----------------------------------------------------------------------------------------------------------------
|
---|
[e523b07] | 40 | if BUILDLIB
|
---|
[c6bbcdb] | 41 | 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] | 42 | headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
|
---|
| 43 | containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
|
---|
[facc44f] | 44 |
|
---|
[a9fb796] | 45 | libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa ${headers:.hfa=.cfa}
|
---|
[facc44f] | 46 |
|
---|
| 47 | # not all platforms support concurrency, add option do disable it
|
---|
[2026bb6] | 48 | thread_headers_nosrc = concurrency/invoke.h
|
---|
| 49 | thread_headers = concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa
|
---|
| 50 | thread_libsrc = concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa ${thread_headers:.hfa=.cfa}
|
---|
[e523b07] | 51 | else
|
---|
| 52 | headers =
|
---|
[2026bb6] | 53 | thread_headers =
|
---|
[e523b07] | 54 | headers_nosrc =
|
---|
[2026bb6] | 55 | thread_headers_nosrc =
|
---|
[e523b07] | 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
|
---|
[6d44da1] | 65 | libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
|
---|
[14347ac] | 66 | $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
|
---|
[a9fb796] | 67 |
|
---|
[2026bb6] | 68 | thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
|
---|
[14347ac] | 69 | $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
|
---|
[2026bb6] | 70 |
|
---|
[a9fb796] | 71 |
|
---|
| 72 | # .deps inclusion is not done automatically by automake for new languages
|
---|
| 73 | libdeps = $(join \
|
---|
| 74 | $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
|
---|
[2a75572] | 75 | $(notdir ${libobjs:.lo=.Plo}) \
|
---|
[a9fb796] | 76 | )
|
---|
[d3b7937] | 77 |
|
---|
[0765121] | 78 | -include $(libdeps)
|
---|
[a9fb796] | 79 |
|
---|
[2026bb6] | 80 | thread_libdeps = $(join \
|
---|
| 81 | $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
|
---|
| 82 | $(notdir ${thread_libobjs:.lo=.Plo}) \
|
---|
| 83 | )
|
---|
| 84 |
|
---|
| 85 | -include $(thread_libdeps)
|
---|
| 86 |
|
---|
| 87 |
|
---|
[31d8f4d] | 88 | if ENABLE_DISTCC
|
---|
| 89 |
|
---|
| 90 | ../prelude/distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ ../prelude/gcc-builtins.cf ../prelude/builtins.cf ../prelude/extras.cf ../prelude/prelude.cfa ../prelude/bootloader.c $(srcdir)/../../tools/build/push2dist.sh
|
---|
| 91 | @+make -C ../prelude distribution
|
---|
| 92 |
|
---|
| 93 | prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution
|
---|
| 94 |
|
---|
| 95 | endif ENABLE_DISTCC
|
---|
| 96 |
|
---|
[14347ac] | 97 | prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
|
---|
[158b026] | 98 | ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@}
|
---|
[d3b7937] | 99 |
|
---|
[14347ac] | 100 | prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
|
---|
[c6bbcdb] | 101 | ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
|
---|
[158b026] | 102 | $(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@}
|
---|
[a9fb796] | 103 |
|
---|
| 104 | #----------------------------------------------------------------------------------------------------------------
|
---|
[6d44da1] | 105 | libcfa_la_SOURCES = prelude.cfa ${libsrc}
|
---|
[c6bbcdb] | 106 | libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
|
---|
[bd85400] | 107 |
|
---|
[2026bb6] | 108 | libcfathread_la_SOURCES = ${thread_libsrc}
|
---|
| 109 | libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
|
---|
| 110 |
|
---|
[38d12e7] | 111 | stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
|
---|
[ed0e67a] | 112 |
|
---|
[e958ff8] | 113 | cfa_includedir = $(CFA_INCDIR)
|
---|
[2026bb6] | 114 | nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc} ${thread_headers} ${thread_headers_nosrc}
|
---|
[73abe95] | 115 |
|
---|
| 116 | #----------------------------------------------------------------------------------------------------------------
|
---|
[159c62e] | 117 | maintainer-clean-local:
|
---|
[796cea3] | 118 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
|
---|
[a9fb796] | 119 |
|
---|
| 120 |
|
---|
| 121 | # $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
---|
| 122 | # $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
---|
| 123 | # $(am__mv) $$depbase.Tpo $$depbase.Po
|
---|