[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 |
---|
[08bc3e7] | 13 | ## Last Modified On : Fri Jul 16 16:00:40 2021 |
---|
| 14 | ## Update Count : 255 |
---|
[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 | |
---|
[bcadb26] | 21 | include $(top_srcdir)/../tools/build/cfa.make |
---|
[ba9baad] | 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 |
---|
[b7fe2e6] | 33 | # The built sources must not depend on the installed inst_headers_src |
---|
[2fbc904] | 34 | AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr -I$(srcdir)/concurrency $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@ |
---|
[f1b6671] | 35 | AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -fexceptions -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 |
---|
[b7fe2e6] | 41 | inst_headers_nosrc = \ |
---|
| 42 | bitmanip.hfa \ |
---|
| 43 | clock.hfa \ |
---|
| 44 | exception.hfa \ |
---|
[d7a10af] | 45 | exception.h \ |
---|
[b7fe2e6] | 46 | gmp.hfa \ |
---|
[08bc3e7] | 47 | math.trait.hfa \ |
---|
[b7fe2e6] | 48 | math.hfa \ |
---|
| 49 | time_t.hfa \ |
---|
| 50 | bits/align.hfa \ |
---|
| 51 | bits/containers.hfa \ |
---|
| 52 | bits/debug.hfa \ |
---|
| 53 | bits/defs.hfa \ |
---|
| 54 | bits/locks.hfa \ |
---|
[7d4ce2a] | 55 | bits/collection.hfa \ |
---|
| 56 | bits/stack.hfa \ |
---|
| 57 | bits/queue.hfa \ |
---|
| 58 | bits/sequence.hfa \ |
---|
[c7625e0] | 59 | containers/array.hfa \ |
---|
[b7fe2e6] | 60 | concurrency/iofwd.hfa \ |
---|
| 61 | containers/list.hfa \ |
---|
[304de00] | 62 | containers/queueLockFree.hfa \ |
---|
[eef8dfb] | 63 | containers/stackLockFree.hfa \ |
---|
[44856ed] | 64 | containers/vector2.hfa \ |
---|
[eef8dfb] | 65 | vec/vec.hfa \ |
---|
| 66 | vec/vec2.hfa \ |
---|
| 67 | vec/vec3.hfa \ |
---|
| 68 | vec/vec4.hfa |
---|
[b7fe2e6] | 69 | |
---|
| 70 | inst_headers_src = \ |
---|
| 71 | common.hfa \ |
---|
| 72 | fstream.hfa \ |
---|
| 73 | heap.hfa \ |
---|
| 74 | iostream.hfa \ |
---|
| 75 | iterator.hfa \ |
---|
| 76 | limits.hfa \ |
---|
[4d9172f] | 77 | memory.hfa \ |
---|
[b7fe2e6] | 78 | parseargs.hfa \ |
---|
| 79 | rational.hfa \ |
---|
| 80 | stdlib.hfa \ |
---|
[96f002c1] | 81 | strstream.hfa \ |
---|
[b7fe2e6] | 82 | time.hfa \ |
---|
[ab1b971] | 83 | bits/weakso_locks.hfa \ |
---|
[b7fe2e6] | 84 | containers/maybe.hfa \ |
---|
| 85 | containers/pair.hfa \ |
---|
| 86 | containers/result.hfa \ |
---|
[96f002c1] | 87 | containers/vector.hfa \ |
---|
| 88 | device/cpu.hfa |
---|
[b7fe2e6] | 89 | |
---|
| 90 | libsrc = ${inst_headers_src} ${inst_headers_src:.hfa=.cfa} \ |
---|
| 91 | assert.cfa \ |
---|
| 92 | bits/algorithm.hfa \ |
---|
| 93 | bits/debug.cfa \ |
---|
| 94 | exception.c \ |
---|
| 95 | interpose.cfa \ |
---|
| 96 | lsda.h \ |
---|
| 97 | startup.cfa \ |
---|
| 98 | startup.hfa \ |
---|
| 99 | virtual.c \ |
---|
| 100 | virtual.h |
---|
[facc44f] | 101 | |
---|
| 102 | # not all platforms support concurrency, add option do disable it |
---|
[b7fe2e6] | 103 | inst_thread_headers_nosrc = \ |
---|
| 104 | bits/random.hfa \ |
---|
[bb662027] | 105 | concurrency/clib/cfathread.h \ |
---|
[b7fe2e6] | 106 | concurrency/invoke.h \ |
---|
[70f8bcd2] | 107 | concurrency/future.hfa \ |
---|
[b7fe2e6] | 108 | concurrency/kernel/fwd.hfa |
---|
| 109 | |
---|
| 110 | inst_thread_headers_src = \ |
---|
[ab388c5] | 111 | concurrency/alarm.hfa \ |
---|
[b7fe2e6] | 112 | concurrency/coroutine.hfa \ |
---|
[856dff8] | 113 | concurrency/exception.hfa \ |
---|
[b7fe2e6] | 114 | concurrency/kernel.hfa \ |
---|
[6a8882c] | 115 | concurrency/locks.hfa \ |
---|
[b7fe2e6] | 116 | concurrency/monitor.hfa \ |
---|
| 117 | concurrency/mutex.hfa \ |
---|
| 118 | concurrency/thread.hfa |
---|
| 119 | |
---|
| 120 | thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \ |
---|
| 121 | bits/signal.hfa \ |
---|
[bb662027] | 122 | concurrency/clib/cfathread.cfa \ |
---|
[b7fe2e6] | 123 | concurrency/CtxSwitch-@ARCHITECTURE@.S \ |
---|
| 124 | concurrency/invoke.c \ |
---|
| 125 | concurrency/io.cfa \ |
---|
| 126 | concurrency/io/setup.cfa \ |
---|
| 127 | concurrency/io/types.hfa \ |
---|
[c402739f] | 128 | concurrency/io/call.cfa \ |
---|
[b7fe2e6] | 129 | concurrency/iofwd.hfa \ |
---|
| 130 | concurrency/kernel_private.hfa \ |
---|
| 131 | concurrency/kernel/startup.cfa \ |
---|
| 132 | concurrency/preemption.cfa \ |
---|
| 133 | concurrency/preemption.hfa \ |
---|
| 134 | concurrency/ready_queue.cfa \ |
---|
| 135 | concurrency/ready_subqueue.hfa \ |
---|
| 136 | concurrency/snzi.hfa \ |
---|
| 137 | concurrency/stats.cfa \ |
---|
| 138 | concurrency/stats.hfa \ |
---|
| 139 | concurrency/stats.hfa |
---|
[3e2b9c9] | 140 | |
---|
[e523b07] | 141 | else |
---|
[b7fe2e6] | 142 | inst_headers_src = |
---|
| 143 | inst_thread_headers_src = |
---|
| 144 | inst_headers_nosrc = |
---|
| 145 | inst_thread_headers_nosrc = |
---|
[e523b07] | 146 | libsrc = |
---|
| 147 | endif |
---|
| 148 | |
---|
[ac78e25] | 149 | |
---|
[73abe95] | 150 | #---------------------------------------------------------------------------------------------------------------- |
---|
| 151 | # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
[e523b07] | 152 | #@CFACC@ @CFACPP@ prelude.cfa |
---|
[a9fb796] | 153 | |
---|
| 154 | # add dependency of cfa files |
---|
[6d44da1] | 155 | libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc)))) |
---|
[14347ac] | 156 | $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa |
---|
[a9fb796] | 157 | |
---|
[2026bb6] | 158 | thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc)))) |
---|
[14347ac] | 159 | $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa |
---|
[2026bb6] | 160 | |
---|
[a9fb796] | 161 | |
---|
| 162 | # .deps inclusion is not done automatically by automake for new languages |
---|
| 163 | libdeps = $(join \ |
---|
| 164 | $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \ |
---|
[2a75572] | 165 | $(notdir ${libobjs:.lo=.Plo}) \ |
---|
[a9fb796] | 166 | ) |
---|
[d3b7937] | 167 | |
---|
[0765121] | 168 | -include $(libdeps) |
---|
[a9fb796] | 169 | |
---|
[2026bb6] | 170 | thread_libdeps = $(join \ |
---|
| 171 | $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \ |
---|
| 172 | $(notdir ${thread_libobjs:.lo=.Plo}) \ |
---|
| 173 | ) |
---|
| 174 | |
---|
| 175 | -include $(thread_libdeps) |
---|
| 176 | |
---|
| 177 | |
---|
[31d8f4d] | 178 | if ENABLE_DISTCC |
---|
| 179 | |
---|
| 180 | ../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 |
---|
| 181 | @+make -C ../prelude distribution |
---|
| 182 | |
---|
| 183 | prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution |
---|
| 184 | |
---|
| 185 | endif ENABLE_DISTCC |
---|
| 186 | |
---|
[14347ac] | 187 | prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ |
---|
[0aa20e3] | 188 | ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@} |
---|
[d3b7937] | 189 | |
---|
[14347ac] | 190 | prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ |
---|
[c6bbcdb] | 191 | ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ |
---|
[0aa20e3] | 192 | $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@} |
---|
[a9fb796] | 193 | |
---|
| 194 | #---------------------------------------------------------------------------------------------------------------- |
---|
[c2bc6d5] | 195 | libcfa_la_SOURCES = ${libsrc} |
---|
| 196 | nodist_libcfa_la_SOURCES = prelude.cfa |
---|
[c6bbcdb] | 197 | libcfa_la_LDFLAGS = -version-info @CFA_VERSION@ |
---|
[bd85400] | 198 | |
---|
[2026bb6] | 199 | libcfathread_la_SOURCES = ${thread_libsrc} |
---|
| 200 | libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@ |
---|
| 201 | |
---|
[38d12e7] | 202 | stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ") |
---|
[ed0e67a] | 203 | |
---|
[e958ff8] | 204 | cfa_includedir = $(CFA_INCDIR) |
---|
[b7fe2e6] | 205 | nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc} |
---|
| 206 | EXTRA_DIST = stdhdr |
---|
[73abe95] | 207 | |
---|
| 208 | #---------------------------------------------------------------------------------------------------------------- |
---|
[159c62e] | 209 | maintainer-clean-local: |
---|
[796cea3] | 210 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} |
---|
[a9fb796] | 211 | |
---|
[2a59655] | 212 | distclean-local: |
---|
| 213 | find ${builddir} -path '*.Plo' -delete |
---|
| 214 | |
---|
[a9fb796] | 215 | |
---|
| 216 | # $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ |
---|
| 217 | # $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ |
---|
| 218 | # $(am__mv) $$depbase.Tpo $$depbase.Po |
---|