######################## -*- 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 = subdir-objects ARFLAGS = cr libdir = ${CFA_LIBDIR} lib_LIBRARIES = libcfa.a libcfa-prelude.o : libcfa-prelude.c ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -Wall -O2 -c -o $@ $< EXTRA_FLAGS = -g -Wall -Wno-unused-function -imacros libcfa-prelude.c @CFA_FLAGS@ $(DEFAULT_INCLUDES) AM_CCASFLAGS = @CFA_FLAGS@ #CFLAGS for most libcfa src #use -no-include-stdhdr to prevent rebuild cycles #The built sources must not depend on the installed headers CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@ ${EXTRA_FLAGS} CC = @CFACC@ headers = fstream iostream iterator limits rational time stdlib common \ containers/maybe containers/pair containers/result containers/vector # not all platforms support concurrency, add option do disable it headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex libobjs = ${headers:=.o} libsrc = libcfa-prelude.c startup.c interpose.c bits/debug.c assert.c exception.c virtual.c heap.c \ ${headers:=.c} # not all platforms support concurrency, add option do disable it libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c concurrency/invoke.c concurrency/preemption.c # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing # SKULLDUGGERY in order to make sure this isn't called make the rule always fail but also create a rule for headers % : %.c echo "Dummy rule, should never be called" false # This rule should always match headers and since it has no prerequisite it will never be called $(addprefix $(srcdir)/,$(headers)): echo "Dummy rule, should never be called" false concurrency/invoke.o : concurrency/invoke.c ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< exception.o : exception.c ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< virtual.o : virtual.c ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< ${libobjs} : @CFACPP@ ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator libcfa_a_SOURCES = ${libsrc} libcfa_a_CFLAGS = -nodebug -O2 stdhdr = ${shell find ${srcdir}/stdhdr -type f -printf "%p "} cfa_includedir = $(CFA_INCDIR) nobase_cfa_include_HEADERS = \ ${headers} \ ${stdhdr} \ math \ gmp \ time_t.h \ bits/align.h \ bits/containers.h \ bits/defs.h \ bits/debug.h \ bits/locks.h \ concurrency/invoke.h CLEANFILES = libcfa-prelude.c maintainer-clean-local: -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}