######################## -*- 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 : Thu Jul 12 08:04:35 2018 ## Update Count : 234 ############################################################################### # create object files in directory with source files AUTOMAKE_OPTIONS = subdir-objects ARFLAGS = cr 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@ -Wall -O2 -c -o $@ $< libcfa_d_a-libcfa-prelude.o : libcfa-prelude.c ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -Wall -O0 -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 -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver ${EXTRA_FLAGS} CC = ${abs_top_builddir}/src/driver/cfa 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 if BUILD_CONCURRENCY headers += concurrency/coroutine concurrency/thread concurrency/kernel concurrency/monitor concurrency/mutex endif libobjs = ${headers:=.o} libsrc = libcfa-prelude.c interpose.c bits/debug.c ${headers:=.c} \ assert.c exception.c virtual.c # not all platforms support concurrency, add option do disable it if BUILD_CONCURRENCY libsrc += concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/alarm.c concurrency/invoke.c concurrency/preemption.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 $@ $< libcfa_a-exception.o : exception.c ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $< libcfa_a-virtual.o : virtual.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 $@ $< libcfa_d_a-exception.o : exception.c ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< libcfa_d_a-virtual.o : virtual.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 #No need for __CFA_DEBUG__ since we pass -debug 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}