source: libcfa/src/Makefile.am @ a5a6a1a8

ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since a5a6a1a8 was 08bc3e7, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

first draft of math trait

  • Property mode set to 100644
File size: 6.2 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 : Fri Jul 16 16:00:40 2021
14## Update Count     : 255
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 -Wno-unused-function -fPIC -fexceptions -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
36AM_CCASFLAGS = -g -Wall -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        bits/align.hfa \
51        bits/containers.hfa \
52        bits/debug.hfa \
53        bits/defs.hfa \
54        bits/locks.hfa \
55        bits/collection.hfa \
56        bits/stack.hfa \
57        bits/queue.hfa \
58        bits/sequence.hfa \
59        containers/array.hfa \
60        concurrency/iofwd.hfa \
61        containers/list.hfa \
62        containers/queueLockFree.hfa \
63        containers/stackLockFree.hfa \
64        containers/vector2.hfa \
65        vec/vec.hfa \
66        vec/vec2.hfa \
67        vec/vec3.hfa \
68        vec/vec4.hfa
69
70inst_headers_src = \
71        common.hfa \
72        fstream.hfa \
73        heap.hfa \
74        iostream.hfa \
75        iterator.hfa \
76        limits.hfa \
77        memory.hfa \
78        parseargs.hfa \
79        rational.hfa \
80        stdlib.hfa \
81        strstream.hfa \
82        time.hfa \
83        bits/weakso_locks.hfa \
84        containers/maybe.hfa \
85        containers/pair.hfa \
86        containers/result.hfa \
87        containers/vector.hfa \
88        device/cpu.hfa
89
90libsrc = ${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
101
102# not all platforms support concurrency, add option do disable it
103inst_thread_headers_nosrc = \
104        bits/random.hfa \
105        concurrency/clib/cfathread.h \
106        concurrency/invoke.h \
107        concurrency/future.hfa \
108        concurrency/kernel/fwd.hfa
109
110inst_thread_headers_src = \
111        concurrency/alarm.hfa \
112        concurrency/coroutine.hfa \
113        concurrency/exception.hfa \
114        concurrency/kernel.hfa \
115        concurrency/locks.hfa \
116        concurrency/monitor.hfa \
117        concurrency/mutex.hfa \
118        concurrency/thread.hfa
119
120thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \
121        bits/signal.hfa \
122        concurrency/clib/cfathread.cfa \
123        concurrency/CtxSwitch-@ARCHITECTURE@.S \
124        concurrency/invoke.c \
125        concurrency/io.cfa \
126        concurrency/io/setup.cfa \
127        concurrency/io/types.hfa \
128        concurrency/io/call.cfa \
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
140
141else
142inst_headers_src =
143inst_thread_headers_src =
144inst_headers_nosrc =
145inst_thread_headers_nosrc =
146libsrc =
147endif
148
149
150#----------------------------------------------------------------------------------------------------------------
151# add dependency to cfa-cpp so all libraries are rebuilt with new translator
152#@CFACC@ @CFACPP@ prelude.cfa
153
154# add dependency of cfa files
155libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc))))
156$(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
157
158thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc))))
159$(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa
160
161
162# .deps inclusion is not done automatically by automake for new languages
163libdeps = $(join \
164        $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \
165        $(notdir ${libobjs:.lo=.Plo}) \
166)
167
168-include $(libdeps)
169
170thread_libdeps = $(join \
171        $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \
172        $(notdir ${thread_libobjs:.lo=.Plo}) \
173)
174
175-include $(thread_libdeps)
176
177
178if 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
183prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution
184
185endif ENABLE_DISTCC
186
187prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
188        ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@}
189
190prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
191        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
192        $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@}
193
194#----------------------------------------------------------------------------------------------------------------
195libcfa_la_SOURCES = ${libsrc}
196nodist_libcfa_la_SOURCES = prelude.cfa
197libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
198
199libcfathread_la_SOURCES = ${thread_libsrc}
200libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@
201
202stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ")
203
204cfa_includedir = $(CFA_INCDIR)
205nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc}
206EXTRA_DIST = stdhdr
207
208#----------------------------------------------------------------------------------------------------------------
209maintainer-clean-local:
210        -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}
211
212distclean-local:
213        find ${builddir} -path '*.Plo' -delete
214
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
Note: See TracBrowser for help on using the repository browser.