source: libcfa/src/Makefile.am@ 1b4e5a8

Last change on this file since 1b4e5a8 was 1b4e5a8, checked in by Michael Brooks <mlbrooks@…>, 4 months ago

Move link-list to-be implementation to libcfa

  • Property mode set to 100644
File size: 7.0 KB
Line 
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##
8## Makefile.am --
9##
10## Author : Peter A. Buhr
11## Created On : Sun May 31 08:54:01 2015
12## Last Modified By : Peter A. Buhr
13## Last Modified On : Wed Nov 1 19:03:42 2023
14## Update Count : 266
15###############################################################################
16
17# create object files in directory with source files
18AUTOMAKE_OPTIONS = foreign subdir-objects
19ACLOCAL_AMFLAGS = -I automake
20
21include $(top_srcdir)/../tools/build/cfa.make
22
23libdir = ${CFA_LIBDIR}
24lib_LTLIBRARIES = libcfa.la libcfathread.la
25
26VPATH += :../prelude
27
28gdbwaittarget=""
29
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 inst_headers_src
34AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr -I$(srcdir)/concurrency $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
35AM_CFLAGS = -g -Wall -Werror=return-type -Wno-unused-function -fPIC -fexceptions -fvisibility=hidden -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
36AM_CCASFLAGS = -g -Wall -Werror=return-type -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
37CFACC = @CFACC@
38
39#----------------------------------------------------------------------------------------------------------------
40if BUILDLIB
41inst_headers_nosrc = \
42 Exception.hfa \
43 bitmanip.hfa \
44 clock.hfa \
45 exception.hfa \
46 exception.h \
47 gmp.hfa \
48 math.trait.hfa \
49 raii.hfa \
50 time_t.hfa \
51 virtual_dtor.hfa \
52 bits/algorithm.hfa \
53 bits/align.hfa \
54 bits/collections.hfa \
55 bits/debug.hfa \
56 bits/defs.hfa \
57 bits/locks.hfa \
58 bits/collection.hfa \
59 bits/stack.hfa \
60 bits/queue.hfa \
61 bits/sequence.hfa \
62 concurrency/atomic.hfa \
63 concurrency/iofwd.hfa \
64 concurrency/barrier.hfa \
65 collections/array.hfa \
66 collections/list.hfa \
67 collections/list2.hfa \
68 collections/lockfree.hfa \
69 collections/string_sharectx.hfa \
70 collections/vector2.hfa \
71 vec/vec.hfa \
72 vec/vec2.hfa \
73 vec/vec3.hfa \
74 vec/vec4.hfa
75
76inst_headers_src = \
77 common.hfa \
78 fstream.hfa \
79 heap.hfa \
80 iostream.hfa \
81 iterator.hfa \
82 limits.hfa \
83 math.hfa \
84 memory.hfa \
85 parseargs.hfa \
86 parseconfig.hfa \
87 rational.hfa \
88 stdlib.hfa \
89 strstream.hfa \
90 time.hfa \
91 bits/weakso_locks.hfa \
92 algorithms/range_iterator.hfa \
93 collections/maybe.hfa \
94 collections/pair.hfa \
95 collections/result.hfa \
96 collections/string.hfa \
97 collections/string_res.hfa \
98 collections/vector.hfa \
99 device/cpu.hfa
100
101libsrc = ${inst_headers_src} ${inst_headers_src:.hfa=.cfa} \
102 assert.cfa \
103 bits/debug.cfa \
104 exception.c \
105 interpose.cfa \
106 lsda.h \
107 prelude-inline.cfa \
108 startup.cfa \
109 startup.hfa \
110 virtual.c \
111 virtual.h
112
113# not all platforms support concurrency, add option do disable it
114inst_thread_headers_nosrc = \
115 bits/random.hfa \
116 concurrency/clib/cfathread.h \
117 concurrency/invoke.h \
118 concurrency/future.hfa \
119 concurrency/once.hfa \
120 concurrency/kernel/fwd.hfa \
121 concurrency/mutex_stmt.hfa \
122 concurrency/channel.hfa \
123 concurrency/actor.hfa
124
125inst_thread_headers_src = \
126 concurrency/alarm.hfa \
127 concurrency/coroutine.hfa \
128 concurrency/exception.hfa \
129 concurrency/kernel.hfa \
130 concurrency/kernel/cluster.hfa \
131 concurrency/locks.hfa \
132 concurrency/monitor.hfa \
133 concurrency/mutex.hfa \
134 concurrency/select.hfa \
135 concurrency/thread.hfa \
136 concurrency/cofor.hfa
137
138thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \
139 interpose_thread.cfa \
140 bits/signal.hfa \
141 concurrency/clib/cfathread.cfa \
142 concurrency/CtxSwitch-@ARCHITECTURE@.S \
143 concurrency/invoke.c \
144 concurrency/io.cfa \
145 concurrency/io/setup.cfa \
146 concurrency/io/types.hfa \
147 concurrency/io/call.cfa \
148 concurrency/iofwd.hfa \
149 concurrency/kernel/private.hfa \
150 concurrency/kernel/startup.cfa \
151 concurrency/preemption.cfa \
152 concurrency/preemption.hfa \
153 concurrency/ready_queue.cfa \
154 concurrency/ready_subqueue.hfa \
155 concurrency/snzi.hfa \
156 concurrency/stats.cfa \
157 concurrency/stats.hfa \
158 concurrency/stats.hfa \
159 concurrency/pthread.cfa
160
161else
162inst_headers_src =
163inst_thread_headers_src =
164inst_headers_nosrc =
165inst_thread_headers_nosrc =
166libsrc =
167endif
168
169
170#----------------------------------------------------------------------------------------------------------------
171# add dependency to cfa-cpp so all libraries are rebuilt with new translator
172#@CFACC@ @CFACPP@ prelude.cfa
173
174# add dependency of cfa files
175libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
176$(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
177
178thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
179$(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
180
181
182# .deps inclusion is not done automatically by automake for new languages
183libdeps = $(join \
184 $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
185 $(notdir ${libobjs:.lo=.Plo}) \
186)
187
188-include $(libdeps)
189
190thread_libdeps = $(join \
191 $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
192 $(notdir ${thread_libobjs:.lo=.Plo}) \
193)
194
195-include $(thread_libdeps)
196
197
198if ENABLE_DISTCC
199
200../prelude/distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ ../prelude/defines.hfa ../prelude/gcc-builtins.cfa ../prelude/builtins.cfa ../prelude/extras.cfa ../prelude/prelude.cfa ../prelude/bootloader.c $(srcdir)/../../tools/build/push2dist.sh
201 @+make -C ../prelude distribution
202
203prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution
204
205endif ENABLE_DISTCC
206
207prelude.o : prelude.cfa extras.cfa gcc-builtins.cfa builtins.cfa @LOCAL_CFACC@ @CFACPP@
208 ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -fvisibility=default -o ${@}
209
210prelude.lo: prelude.cfa extras.cfa gcc-builtins.cfa builtins.cfa @LOCAL_CFACC@ @CFACPP@
211 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
212 $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -fvisibility=default -o ${@}
213
214concurrency/io/call.cfa: $(srcdir)/concurrency/io/call.cfa.in
215 ${AM_V_GEN}python3 $< > $@
216
217#----------------------------------------------------------------------------------------------------------------
218libcfa_la_SOURCES = ${libsrc}
219nodist_libcfa_la_SOURCES = prelude.cfa
220libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
221
222libcfathread_la_SOURCES = ${thread_libsrc}
223libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
224
225stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
226
227cfa_includedir = $(CFA_INCDIR)
228nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc}
229EXTRA_DIST = stdhdr
230DISTCLEANFILES = $(libdeps) $(thread_libdeps)
231
232#----------------------------------------------------------------------------------------------------------------
233maintainer-clean-local:
234 -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
235
236#distclean-local:
237# find ${builddir} -path '*.Plo' -delete
238
239
240# $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
241# $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
242# $(am__mv) $$depbase.Tpo $$depbase.Po
Note: See TracBrowser for help on using the repository browser.