source: libcfa/src/Makefile.am @ fc0996a

ast-experimental
Last change on this file since fc0996a was 0e6cadf1, checked in by Peter A. Buhr <pabuhr@…>, 18 months ago

add new atomic macros to Makefile.am

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