[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 |
---|
[170235d] | 13 | ## Last Modified On : Mon Jun 1 13:35:33 2020 |
---|
| 14 | ## Update Count : 248 |
---|
[00cc023] | 15 | ############################################################################### |
---|
| 16 | |
---|
[a922e34] | 17 | # create object files in directory with source files |
---|
[38d12e7] | 18 | AUTOMAKE_OPTIONS = foreign subdir-objects |
---|
[2fbc904] | 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 \ |
---|
| 45 | gmp.hfa \ |
---|
| 46 | math.hfa \ |
---|
| 47 | time_t.hfa \ |
---|
| 48 | bits/align.hfa \ |
---|
| 49 | bits/containers.hfa \ |
---|
| 50 | bits/debug.hfa \ |
---|
| 51 | bits/defs.hfa \ |
---|
| 52 | bits/locks.hfa \ |
---|
| 53 | concurrency/iofwd.hfa \ |
---|
| 54 | containers/list.hfa \ |
---|
| 55 | containers/stackLockFree.hfa |
---|
| 56 | |
---|
| 57 | inst_headers_src = \ |
---|
| 58 | common.hfa \ |
---|
| 59 | fstream.hfa \ |
---|
| 60 | heap.hfa \ |
---|
| 61 | iostream.hfa \ |
---|
| 62 | iterator.hfa \ |
---|
| 63 | limits.hfa \ |
---|
| 64 | parseargs.hfa \ |
---|
| 65 | rational.hfa \ |
---|
| 66 | stdlib.hfa \ |
---|
| 67 | time.hfa \ |
---|
| 68 | containers/maybe.hfa \ |
---|
| 69 | containers/pair.hfa \ |
---|
| 70 | containers/result.hfa \ |
---|
| 71 | containers/vector.hfa |
---|
| 72 | |
---|
| 73 | libsrc = ${inst_headers_src} ${inst_headers_src:.hfa=.cfa} \ |
---|
| 74 | assert.cfa \ |
---|
| 75 | bits/algorithm.hfa \ |
---|
| 76 | bits/debug.cfa \ |
---|
| 77 | exception.c \ |
---|
| 78 | exception.h \ |
---|
| 79 | interpose.cfa \ |
---|
| 80 | lsda.h \ |
---|
| 81 | startup.cfa \ |
---|
| 82 | startup.hfa \ |
---|
| 83 | virtual.c \ |
---|
| 84 | virtual.h |
---|
[facc44f] | 85 | |
---|
| 86 | # not all platforms support concurrency, add option do disable it |
---|
[b7fe2e6] | 87 | inst_thread_headers_nosrc = \ |
---|
| 88 | bits/random.hfa \ |
---|
| 89 | concurrency/invoke.h \ |
---|
| 90 | concurrency/kernel/fwd.hfa |
---|
| 91 | |
---|
| 92 | inst_thread_headers_src = \ |
---|
| 93 | concurrency/coroutine.hfa \ |
---|
[856dff8] | 94 | concurrency/exception.hfa \ |
---|
[b7fe2e6] | 95 | concurrency/kernel.hfa \ |
---|
| 96 | concurrency/monitor.hfa \ |
---|
| 97 | concurrency/mutex.hfa \ |
---|
| 98 | concurrency/thread.hfa |
---|
| 99 | |
---|
| 100 | thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \ |
---|
| 101 | bits/signal.hfa \ |
---|
| 102 | concurrency/alarm.cfa \ |
---|
| 103 | concurrency/alarm.hfa \ |
---|
| 104 | concurrency/CtxSwitch-@ARCHITECTURE@.S \ |
---|
| 105 | concurrency/invoke.c \ |
---|
| 106 | concurrency/io.cfa \ |
---|
| 107 | concurrency/io/setup.cfa \ |
---|
| 108 | concurrency/io/types.hfa \ |
---|
| 109 | concurrency/iocall.cfa \ |
---|
| 110 | concurrency/iofwd.hfa \ |
---|
| 111 | concurrency/kernel_private.hfa \ |
---|
| 112 | concurrency/kernel/startup.cfa \ |
---|
| 113 | concurrency/preemption.cfa \ |
---|
| 114 | concurrency/preemption.hfa \ |
---|
| 115 | concurrency/ready_queue.cfa \ |
---|
| 116 | concurrency/ready_subqueue.hfa \ |
---|
| 117 | concurrency/snzi.hfa \ |
---|
| 118 | concurrency/stats.cfa \ |
---|
| 119 | concurrency/stats.hfa \ |
---|
| 120 | concurrency/stats.hfa |
---|
[3e2b9c9] | 121 | |
---|
[e523b07] | 122 | else |
---|
[b7fe2e6] | 123 | inst_headers_src = |
---|
| 124 | inst_thread_headers_src = |
---|
| 125 | inst_headers_nosrc = |
---|
| 126 | inst_thread_headers_nosrc = |
---|
[e523b07] | 127 | libsrc = |
---|
| 128 | endif |
---|
| 129 | |
---|
[ac78e25] | 130 | |
---|
[73abe95] | 131 | #---------------------------------------------------------------------------------------------------------------- |
---|
| 132 | # add dependency to cfa-cpp so all libraries are rebuilt with new translator |
---|
[e523b07] | 133 | #@CFACC@ @CFACPP@ prelude.cfa |
---|
[a9fb796] | 134 | |
---|
| 135 | # add dependency of cfa files |
---|
[6d44da1] | 136 | libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc)))) |
---|
[14347ac] | 137 | $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa |
---|
[a9fb796] | 138 | |
---|
[2026bb6] | 139 | thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc)))) |
---|
[14347ac] | 140 | $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa |
---|
[2026bb6] | 141 | |
---|
[a9fb796] | 142 | |
---|
| 143 | # .deps inclusion is not done automatically by automake for new languages |
---|
| 144 | libdeps = $(join \ |
---|
| 145 | $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \ |
---|
[2a75572] | 146 | $(notdir ${libobjs:.lo=.Plo}) \ |
---|
[a9fb796] | 147 | ) |
---|
[d3b7937] | 148 | |
---|
[0765121] | 149 | -include $(libdeps) |
---|
[a9fb796] | 150 | |
---|
[2026bb6] | 151 | thread_libdeps = $(join \ |
---|
| 152 | $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \ |
---|
| 153 | $(notdir ${thread_libobjs:.lo=.Plo}) \ |
---|
| 154 | ) |
---|
| 155 | |
---|
| 156 | -include $(thread_libdeps) |
---|
| 157 | |
---|
| 158 | |
---|
[31d8f4d] | 159 | if ENABLE_DISTCC |
---|
| 160 | |
---|
| 161 | ../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 |
---|
| 162 | @+make -C ../prelude distribution |
---|
| 163 | |
---|
| 164 | prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution |
---|
| 165 | |
---|
| 166 | endif ENABLE_DISTCC |
---|
| 167 | |
---|
[14347ac] | 168 | prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ |
---|
[0aa20e3] | 169 | ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@} |
---|
[d3b7937] | 170 | |
---|
[14347ac] | 171 | prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ |
---|
[c6bbcdb] | 172 | ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ |
---|
[0aa20e3] | 173 | $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@} |
---|
[a9fb796] | 174 | |
---|
| 175 | #---------------------------------------------------------------------------------------------------------------- |
---|
[c2bc6d5] | 176 | libcfa_la_SOURCES = ${libsrc} |
---|
| 177 | nodist_libcfa_la_SOURCES = prelude.cfa |
---|
[c6bbcdb] | 178 | libcfa_la_LDFLAGS = -version-info @CFA_VERSION@ |
---|
[bd85400] | 179 | |
---|
[2026bb6] | 180 | libcfathread_la_SOURCES = ${thread_libsrc} |
---|
| 181 | libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@ |
---|
| 182 | |
---|
[38d12e7] | 183 | stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ") |
---|
[ed0e67a] | 184 | |
---|
[e958ff8] | 185 | cfa_includedir = $(CFA_INCDIR) |
---|
[b7fe2e6] | 186 | nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc} |
---|
| 187 | EXTRA_DIST = stdhdr |
---|
[73abe95] | 188 | |
---|
| 189 | #---------------------------------------------------------------------------------------------------------------- |
---|
[159c62e] | 190 | maintainer-clean-local: |
---|
[796cea3] | 191 | -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} |
---|
[a9fb796] | 192 | |
---|
| 193 | |
---|
| 194 | # $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ |
---|
| 195 | # $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ |
---|
| 196 | # $(am__mv) $$depbase.Tpo $$depbase.Po |
---|