Index: benchmark/Makefile.in
===================================================================
--- benchmark/Makefile.in	(revision 524ed86476e43c6c764a1b5335fc8d4fd281dacd)
+++ benchmark/Makefile.in	(revision 9aa9126e40385076b70bce81cfd5925a9c8b56ee)
@@ -125,5 +125,6 @@
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in compile
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/src/cfa.make \
+	compile
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -137,5 +138,5 @@
 BACKEND_CC = @BACKEND_CC@
 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
-CC = @CFACC@
+CC = @CC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
@@ -151,7 +152,5 @@
 CFA_NAME = @CFA_NAME@
 CFA_PREFIX = @CFA_PREFIX@
-
-# applies to both programs
-CFLAGS = 
+CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
@@ -254,13 +253,15 @@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AM_CFLAGS = \
-	-g \
-	-O2 \
-	-Wall \
-	-Wno-unused-function \
-	-quiet \
-	-I$(srcdir) \
-	@BUILD_IN_TREE_FLAGS@
-
+CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CFA = $(am__v_CFA_@AM_V@)
+am__v_CFA_ = $(am__v_CFA_@AM_DEFAULT_V@)
+am__v_CFA_0 = @echo "  CFA     " $@;
+am__v_CFA_1 = 
+
+# applies to both programs
+UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread
+AM_CFAFLAGS = -quiet -in-tree -nodebug
+AM_UPPFLAGS = -quiet -nodebug -multi
 TOOLSDIR = ${abs_top_srcdir}/tools/
 REPEAT = ${TOOLSDIR}repeat
@@ -274,5 +275,6 @@
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+.SUFFIXES: .cfa .o
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(top_srcdir)/src/cfa.make $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
@@ -294,4 +296,5 @@
 	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
 	esac;
+$(top_srcdir)/src/cfa.make $(am__empty):
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -460,4 +463,11 @@
 
 
+.cfa.o: $(CFACC) $(CFACPP)
+	$(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
+
+LIBFIBRE_DIR ?= /home/tdelisle/software/KOS/src/
+
 .NOTPARALLEL:
 
@@ -521,11 +531,11 @@
 
 loop$(EXEEXT):
-	@@BACKEND_CC@ loop.c      -DBENCH_N=5000000000 -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	$(COMPILE) -DBENCH_N=5000000000 loop.c
 
 function$(EXEEXT):
-	@@BACKEND_CC@ function.c  -DBENCH_N=5000000000 -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	$(COMPILE) -DBENCH_N=5000000000 function.c
 
 fetch_add$(EXEEXT):
-	@@BACKEND_CC@ fetch_add.c -DBENCH_N=500000000  -I$(srcdir) -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	$(COMPILE) -DBENCH_N=500000000  fetch_add.c
 
 ctxswitch$(EXEEXT): \
@@ -545,26 +555,26 @@
 
 ctxswitch-pthread$(EXEEXT):
-	@@BACKEND_CC@ $(srcdir)/ctxswitch/pthreads.c     -DBENCH_N=50000000  -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/ctxswitch/pthreads.c
 
 ctxswitch-cfa_coroutine$(EXEEXT):
-	@${CC}        $(srcdir)/ctxswitch/cfa_cor.c      -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_cor.c
 
 ctxswitch-cfa_thread$(EXEEXT):
-	@${CC}        $(srcdir)/ctxswitch/cfa_thrd.c     -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd.c
 
 ctxswitch-cfa_thread2$(EXEEXT):
-	@${CC}        $(srcdir)/ctxswitch/cfa_thrd2.c    -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/cfa_thrd2.c
 
 ctxswitch-upp_coroutine$(EXEEXT):
-	@u++          $(srcdir)/ctxswitch/upp_cor.cc     -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_cor.cc
 
 ctxswitch-upp_thread$(EXEEXT):
-	@u++          $(srcdir)/ctxswitch/upp_thrd.cc    -DBENCH_N=50000000  -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/upp_thrd.cc
 
 ctxswitch-kos_fibre$(EXEEXT):
-	@${CXX}       $(srcdir)/ctxswitch/kos_fibre.cpp  -DBENCH_N=50000000  -I$(srcdir) -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
+	@$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
 
 ctxswitch-kos_fibre2$(EXEEXT):
-	@${CXX}       $(srcdir)/ctxswitch/kos_fibre2.cpp -DBENCH_N=50000000  -I$(srcdir) -I/home/tdelisle/software/KOS/src/ -g -O2 -lfibre -lpthread -lrt
+	@$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre2.cpp -I$(LIBFIBRE_DIR) -lfibre
 
 ctxswitch-goroutine$(EXEEXT):
@@ -589,17 +599,17 @@
 
 mutex-pthread_lock$(EXEEXT):
-	@@BACKEND_CC@ $(srcdir)/mutex/pthreads.c    -DBENCH_N=50000000    -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(COMPILE)    -DBENCH_N=50000000 $(srcdir)/mutex/pthreads.c
 
 mutex-upp$(EXEEXT):
-	@u++          $(srcdir)/mutex/upp.cc        -DBENCH_N=50000000    -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/mutex/upp.cc
 
 mutex-cfa1$(EXEEXT):
-	@${CC}        $(srcdir)/mutex/cfa1.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa1.c
 
 mutex-cfa2$(EXEEXT):
-	@${CC}        $(srcdir)/mutex/cfa2.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa2.c
 
 mutex-cfa4$(EXEEXT):
-	@${CC}        $(srcdir)/mutex/cfa4.c        -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=5000000  $(srcdir)/mutex/cfa4.c
 
 mutex-java_thread$(EXEEXT):
@@ -618,17 +628,17 @@
 
 signal-pthread_cond$(EXEEXT):
-	@@BACKEND_CC@ $(srcdir)/schedint/pthreads.c -DBENCH_N=500000      -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(COMPILE)    -DBENCH_N=500000  $(srcdir)/schedint/pthreads.c
 
 signal-upp$(EXEEXT):
-	@u++          $(srcdir)/schedint/upp.cc     -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedint/upp.cc
 
 signal-cfa1$(EXEEXT):
-	@${CC}        $(srcdir)/schedint/cfa1.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa1.c
 
 signal-cfa2$(EXEEXT):
-	@${CC}        $(srcdir)/schedint/cfa2.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa2.c
 
 signal-cfa4$(EXEEXT):
-	@${CC}        $(srcdir)/schedint/cfa4.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedint/cfa4.c
 
 signal-java_thread$(EXEEXT):
@@ -645,14 +655,14 @@
 
 waitfor-upp$(EXEEXT):
-	@u++          $(srcdir)/schedext/upp.cc     -DBENCH_N=5000000     -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(UPPCOMPILE) -DBENCH_N=5000000 $(srcdir)/schedext/upp.cc
 
 waitfor-cfa1$(EXEEXT):
-	@${CC}        $(srcdir)/schedext/cfa1.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa1.c
 
 waitfor-cfa2$(EXEEXT):
-	@${CC}        $(srcdir)/schedext/cfa2.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa2.c
 
 waitfor-cfa4$(EXEEXT):
-	@${CC}        $(srcdir)/schedext/cfa4.c     -DBENCH_N=500000      -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=500000  $(srcdir)/schedext/cfa4.c
 
 creation$(EXEEXT) :\
@@ -667,20 +677,20 @@
 
 creation-cfa_coroutine$(EXEEXT):
-	@${CC}        $(srcdir)/creation/cfa_cor.c   -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.c
 
 creation-cfa_coroutine_eager$(EXEEXT):
-	@${CC}        $(srcdir)/creation/cfa_cor.c   -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER
+	@$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_cor.c
 
 creation-cfa_thread$(EXEEXT):
-	@${CC}        $(srcdir)/creation/cfa_thrd.c  -DBENCH_N=10000000   -I$(srcdir) -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -DBENCH_N=10000000 $(srcdir)/creation/cfa_thrd.c
 
 creation-upp_coroutine$(EXEEXT):
-	@u++          $(srcdir)/creation/upp_cor.cc  -DBENCH_N=50000000   -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_cor.cc
 
 creation-upp_thread$(EXEEXT):
-	@u++          $(srcdir)/creation/upp_thrd.cc -DBENCH_N=50000000   -I$(srcdir) -nodebug -lrt -quiet             ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(UPPCOMPILE) -DBENCH_N=50000000 $(srcdir)/creation/upp_thrd.cc
 
 creation-pthread$(EXEEXT):
-	@@BACKEND_CC@ $(srcdir)/creation/pthreads.c  -DBENCH_N=250000     -I$(srcdir) -lrt -pthread                    ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(COMPILE)    -DBENCH_N=250000   $(srcdir)/creation/pthreads.c
 
 creation-goroutine$(EXEEXT):
@@ -704,29 +714,29 @@
 
 compile-array$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/array.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/array.c
 
 compile-attributes$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/attributes.c		@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/attributes.c
 
 compile-empty$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(srcdir)/compile/empty.c          @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(srcdir)/compile/empty.c
 
 compile-expression$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/expression.c		@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/expression.c
 
 compile-io$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/io1.c				@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/io1.c
 
 compile-monitor$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/concurrent/monitor.c	@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/monitor.c
 
 compile-operators$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/operators.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/operators.c
 
 compile-thread$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/concurrent/thread.c	@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/concurrent/thread.c
 
 compile-typeof$(EXEEXT):
-	@${CC} -quiet -fsyntax-only -w $(testdir)/typeof.c			@CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
+	@$(CFACOMPILE) -fsyntax-only -w $(testdir)/typeof.c
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
