source: libcfa/src/Makefile.am @ 6009a5a

Last change on this file since 6009a5a was be3f163, checked in by Peter A. Buhr <pabuhr@…>, 12 months ago

rename files gcc-builtins.cf builtins.cf extras.cf bootloader.cf and sync-builtins.cf with suffix .cfa

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