######################## -*- 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 : Tue Jul 24 17:25:39 2018 ## Update Count : 240 ############################################################################### # 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 VPATH += :../prelude # 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 -in-tree -I$(srcdir)/stdhdr @CONFIG_CFAFLAGS@ AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ CFACC = @CFACC@ #---------------------------------------------------------------------------------------------------------------- if BUILDLIB headers_nosrc = math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.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 # not all platforms support concurrency, add option do disable it headers_nosrc += concurrency/invoke.h headers += concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa concurrency/monitor.hfa concurrency/mutex.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 libsrc += concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa concurrency/invoke.c concurrency/preemption.cfa else headers = 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) : @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) prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ ${AM_V_GEN}@CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree @CONFIG_CFAFLAGS@ -XCFA -l ${<} -c -o ${@} prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @CFACC@ @CFACPP@ ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ @CFACC@ ${AM_CFLAGS} ${CFLAGS} -quiet -in-tree @CONFIG_CFAFLAGS@ -XCFA -l ${<} -c -o ${@} #---------------------------------------------------------------------------------------------------------------- libcfa_la_SOURCES = prelude.cfa ${libsrc} libcfa_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} #---------------------------------------------------------------------------------------------------------------- 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