source: libcfa/src/Makefile.am @ f5cb7c2

Last change on this file since f5cb7c2 was 72713e5, checked in by JiadaL <j82liang@…>, 6 months ago

Add libcfa/src/enum.hfa

  • 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        math.hfa \
50        raii.hfa \
51        time_t.hfa \
52        virtual_dtor.hfa \
53        bits/algorithm.hfa \
54        bits/align.hfa \
55        bits/collections.hfa \
56        bits/debug.hfa \
57        bits/defs.hfa \
58        bits/locks.hfa \
59        bits/collection.hfa \
60        bits/stack.hfa \
61        bits/queue.hfa \
62        bits/sequence.hfa \
63        concurrency/atomic.hfa \
64        concurrency/iofwd.hfa \
65        concurrency/barrier.hfa \
66        collections/array.hfa \
67        collections/list.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        memory.hfa \
84        parseargs.hfa \
85        parseconfig.hfa \
86        rational.hfa \
87        enum.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        startup.cfa \
108        startup.hfa \
109        virtual.c \
110        virtual.h
111
112# not all platforms support concurrency, add option do disable it
113inst_thread_headers_nosrc = \
114        bits/random.hfa \
115        concurrency/clib/cfathread.h \
116        concurrency/invoke.h \
117        concurrency/future.hfa \
118        concurrency/once.hfa \
119        concurrency/kernel/fwd.hfa \
120        concurrency/mutex_stmt.hfa \
121        concurrency/channel.hfa \
122        concurrency/actor.hfa
123
124inst_thread_headers_src = \
125        concurrency/alarm.hfa \
126        concurrency/coroutine.hfa \
127        concurrency/exception.hfa \
128        concurrency/kernel.hfa \
129        concurrency/kernel/cluster.hfa \
130        concurrency/locks.hfa \
131        concurrency/monitor.hfa \
132        concurrency/mutex.hfa \
133        concurrency/select.hfa \
134        concurrency/thread.hfa \
135        concurrency/cofor.hfa
136
137thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \
138        interpose_thread.cfa \
139        bits/signal.hfa \
140        concurrency/clib/cfathread.cfa \
141        concurrency/CtxSwitch-@ARCHITECTURE@.S \
142        concurrency/invoke.c \
143        concurrency/io.cfa \
144        concurrency/io/setup.cfa \
145        concurrency/io/types.hfa \
146        concurrency/io/call.cfa \
147        concurrency/iofwd.hfa \
148        concurrency/kernel/private.hfa \
149        concurrency/kernel/startup.cfa \
150        concurrency/preemption.cfa \
151        concurrency/preemption.hfa \
152        concurrency/ready_queue.cfa \
153        concurrency/ready_subqueue.hfa \
154        concurrency/snzi.hfa \
155        concurrency/stats.cfa \
156        concurrency/stats.hfa \
157        concurrency/stats.hfa \
158        concurrency/pthread.cfa
159
160else
161inst_headers_src =
162inst_thread_headers_src =
163inst_headers_nosrc =
164inst_thread_headers_nosrc =
165libsrc =
166endif
167
168
169#----------------------------------------------------------------------------------------------------------------
170# add dependency to cfa-cpp so all libraries are rebuilt with new translator
171#@CFACC@ @CFACPP@ prelude.cfa
172
173# add dependency of cfa files
174libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
175$(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
176
177thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
178$(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
179
180
181# .deps inclusion is not done automatically by automake for new languages
182libdeps = $(join \
183        $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
184        $(notdir ${libobjs:.lo=.Plo}) \
185)
186
187-include $(libdeps)
188
189thread_libdeps = $(join \
190        $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
191        $(notdir ${thread_libobjs:.lo=.Plo}) \
192)
193
194-include $(thread_libdeps)
195
196
197if ENABLE_DISTCC
198
199../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
200        @+make -C ../prelude distribution
201
202prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution
203
204endif ENABLE_DISTCC
205
206prelude.o : prelude.cfa extras.cfa gcc-builtins.cfa builtins.cfa @LOCAL_CFACC@ @CFACPP@
207        ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -fvisibility=default -o ${@}
208
209prelude.lo: prelude.cfa extras.cfa gcc-builtins.cfa builtins.cfa @LOCAL_CFACC@ @CFACPP@
210        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
211        $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -fvisibility=default -o ${@}
212
213concurrency/io/call.cfa: $(srcdir)/concurrency/io/call.cfa.in
214        ${AM_V_GEN}python3 $< > $@
215
216#----------------------------------------------------------------------------------------------------------------
217libcfa_la_SOURCES = ${libsrc}
218nodist_libcfa_la_SOURCES = prelude.cfa
219libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
220
221libcfathread_la_SOURCES = ${thread_libsrc}
222libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
223
224stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
225
226cfa_includedir = $(CFA_INCDIR)
227nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc}
228EXTRA_DIST = stdhdr
229DISTCLEANFILES = $(libdeps) $(thread_libdeps)
230
231#----------------------------------------------------------------------------------------------------------------
232maintainer-clean-local:
233        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
234
235#distclean-local:
236#       find ${builddir} -path '*.Plo' -delete
237
238
239# $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
240#       $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
241#       $(am__mv) $$depbase.Tpo $$depbase.Po
Note: See TracBrowser for help on using the repository browser.