######################## -*- Mode: Makefile-Automake -*- ###################### ## ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo ## ## The contents of this file are covered under the licence agreement in the ## file "LICENCE" distributed with Cforall. ## ## Makefile.am -- ## ## Author : Peter A. Buhr ## Created On : Sun May 31 08:54:01 2015 ## Last Modified By : Peter A. Buhr ## Last Modified On : Wed Dec 9 22:46:14 2020 ## Update Count : 250 ############################################################################### # create object files in directory with source files AUTOMAKE_OPTIONS = foreign subdir-objects ACLOCAL_AMFLAGS = -I automake include $(top_srcdir)/../tools/build/cfa.make libdir = ${CFA_LIBDIR} lib_LTLIBRARIES = libcfa.la libcfathread.la VPATH += :../prelude gdbwaittarget="" # AM_CFLAGS for all cfa source # AM_CFAFLAGS for only cfa source # use -no-include-stdhdr to prevent rebuild cycles # The built sources must not depend on the installed inst_headers_src AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr -I$(srcdir)/concurrency $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@ AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -fexceptions -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@ AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ CFACC = @CFACC@ #---------------------------------------------------------------------------------------------------------------- if BUILDLIB inst_headers_nosrc = \ bitmanip.hfa \ clock.hfa \ exception.hfa \ exception.h \ gmp.hfa \ math.hfa \ time_t.hfa \ bits/align.hfa \ bits/containers.hfa \ bits/debug.hfa \ bits/defs.hfa \ bits/locks.hfa \ bits/collection.hfa \ bits/stack.hfa \ bits/queue.hfa \ bits/sequence.hfa \ concurrency/iofwd.hfa \ containers/list.hfa \ containers/stackLockFree.hfa inst_headers_src = \ common.hfa \ fstream.hfa \ heap.hfa \ iostream.hfa \ iterator.hfa \ limits.hfa \ memory.hfa \ parseargs.hfa \ rational.hfa \ stdlib.hfa \ time.hfa \ containers/maybe.hfa \ containers/pair.hfa \ containers/result.hfa \ containers/vector.hfa libsrc = ${inst_headers_src} ${inst_headers_src:.hfa=.cfa} \ assert.cfa \ bits/algorithm.hfa \ bits/debug.cfa \ exception.c \ interpose.cfa \ lsda.h \ startup.cfa \ startup.hfa \ virtual.c \ virtual.h # not all platforms support concurrency, add option do disable it inst_thread_headers_nosrc = \ bits/random.hfa \ concurrency/clib/cfathread.h \ concurrency/invoke.h \ concurrency/kernel/fwd.hfa inst_thread_headers_src = \ concurrency/coroutine.hfa \ concurrency/exception.hfa \ concurrency/kernel.hfa \ concurrency/locks.hfa \ concurrency/monitor.hfa \ concurrency/mutex.hfa \ concurrency/thread.hfa thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \ bits/signal.hfa \ concurrency/alarm.cfa \ concurrency/alarm.hfa \ concurrency/clib/cfathread.cfa \ concurrency/CtxSwitch-@ARCHITECTURE@.S \ concurrency/invoke.c \ concurrency/io.cfa \ concurrency/io/setup.cfa \ concurrency/io/types.hfa \ concurrency/io/call.cfa \ concurrency/iofwd.hfa \ concurrency/kernel_private.hfa \ concurrency/kernel/startup.cfa \ concurrency/preemption.cfa \ concurrency/preemption.hfa \ concurrency/ready_queue.cfa \ concurrency/ready_subqueue.hfa \ concurrency/snzi.hfa \ concurrency/stats.cfa \ concurrency/stats.hfa \ concurrency/stats.hfa else inst_headers_src = inst_thread_headers_src = inst_headers_nosrc = inst_thread_headers_nosrc = libsrc = endif #---------------------------------------------------------------------------------------------------------------- # add dependency to cfa-cpp so all libraries are rebuilt with new translator #@CFACC@ @CFACPP@ prelude.cfa # add dependency of cfa files libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(libsrc)))) $(libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa thread_libobjs = $(addsuffix .lo, $(basename $(filter %.cfa,$(thread_libsrc)))) $(thread_libobjs) : @LOCAL_CFACC@ @CFACPP@ prelude.cfa # .deps inclusion is not done automatically by automake for new languages libdeps = $(join \ $(addsuffix $(DEPDIR)/ , $(dir $(libobjs) ) ), \ $(notdir ${libobjs:.lo=.Plo}) \ ) -include $(libdeps) thread_libdeps = $(join \ $(addsuffix $(DEPDIR)/ , $(dir $(thread_libobjs) ) ), \ $(notdir ${thread_libobjs:.lo=.Plo}) \ ) -include $(thread_libdeps) if ENABLE_DISTCC ../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 @+make -C ../prelude distribution prelude.o prelude.lo $(libobjs) $(thread_libobjs) : ../prelude/distribution endif ENABLE_DISTCC prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@} prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ $(CFACOMPILE) -quiet -XCFA,-l ${<} -c -o ${@} #---------------------------------------------------------------------------------------------------------------- libcfa_la_SOURCES = ${libsrc} nodist_libcfa_la_SOURCES = prelude.cfa libcfa_la_LDFLAGS = -version-info @CFA_VERSION@ libcfathread_la_SOURCES = ${thread_libsrc} libcfathread_la_LDFLAGS = -version-info @CFA_VERSION@ stdhdr = $(shell find $(srcdir)/stdhdr -type f -printf "%p ") cfa_includedir = $(CFA_INCDIR) nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc} EXTRA_DIST = stdhdr #---------------------------------------------------------------------------------------------------------------- maintainer-clean-local: -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} distclean-local: find ${builddir} -path '*.Plo' -delete # $(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ # $(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ # $(am__mv) $$depbase.Tpo $$depbase.Po