######################## -*- 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 : Mon Mar 16 18:07:59 2020 ## Update Count : 242 ############################################################################### # create object files in directory with source files AUTOMAKE_OPTIONS = foreign subdir-objects ACLOCAL_AMFLAGS = -I automake include $(srcdir)/../../src/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 headers AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(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 headers_nosrc = bitmanip.hfa math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa containers/list.hfa headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \ containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa ${headers:.hfa=.cfa} # not all platforms support concurrency, add option do disable it thread_headers_nosrc = concurrency/invoke.h thread_headers = concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.hfa thread_libsrc = concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/io.cfa concurrency/preemption.cfa concurrency/ready_queue.cfa ${thread_headers:.hfa=.cfa} else headers = thread_headers = headers_nosrc = 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 = prelude.cfa ${libsrc} 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} ${headers} ${headers_nosrc} ${thread_headers} ${thread_headers_nosrc} #---------------------------------------------------------------------------------------------------------------- maintainer-clean-local: -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR} # $(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