######################## -*- 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 : Sun May 14 21:04:21 2017 ## Update Count : 214 ############################################################################### # create object files in directory with source files AUTOMAKE_OPTIONS = subdir-objects libdir = ${CFA_LIBDIR} lib_LIBRARIES = if BUILD_RELEASE lib_LIBRARIES += libcfa.a endif if BUILD_DEBUG lib_LIBRARIES += libcfa-d.a endif libcfa_a-libcfa-prelude.o : libcfa-prelude.c ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $< libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $< EXTRA_FLAGS = -g -Wall -Werror -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr -imacros libcfa-prelude.c @CFA_FLAGS@ AM_CCASFLAGS = @CFA_FLAGS@ CFLAGS = -quiet -no-include-stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS} CC = ${abs_top_srcdir}/src/driver/cfa headers = limits stdlib math iostream fstream iterator rational assert containers/pair containers/vector # not all platforms support concurrency, add option do disable it if BUILD_CONCURRENCY headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor endif libobjs = ${headers:=.o} libsrc = libcfa-prelude.c interpose.c libhdr/libdebug.c ${headers:=.c} # not all platforms support concurrency, add option do disable it if BUILD_CONCURRENCY libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c endif # extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing % : %.c @true concurrency/libcfa_a-invoke.o : concurrency/invoke.c ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< concurrency/libcfa_d_a-invoke.o : concurrency/invoke.c ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator libcfa_a_SOURCES = ${libsrc} libcfa_a_CFLAGS = -nodebug -O2 libcfa_d_a_SOURCES = ${libsrc} libcfa_d_a_CFLAGS = -debug -O0 stdhdr = ${shell echo stdhdr/*} cfa_includedir = $(CFA_INCDIR) nobase_cfa_include_HEADERS = ${headers} ${stdhdr} gmp concurrency/invoke.h CLEANFILES = libcfa-prelude.c maintainer-clean-local: -rm -rf ${CFA_INCDIR} ${CFA_LIBDIR}