Index: Makefile.in
===================================================================
--- Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -250,4 +250,6 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@		# C compiler used to compile Cforall programs, versus C++ compiler used to build cfa command
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
 CC = @CC@
 CCAS = @CCAS@
@@ -255,4 +257,6 @@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -271,4 +275,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
Index: configure
===================================================================
--- configure	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ configure	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -674,4 +674,9 @@
 build_cpu
 build
+BUILD_IN_TREE_FLAGS
+BUILD_IN_TREE_FLAGS_NOLIB
+CFACPP
+CFACC
+DRIVER_DIR
 CFA_LIBDIR
 CFA_BINDIR
@@ -3375,4 +3380,20 @@
 
 
+# Create variables for commonly used targets
+DRIVER_DIR='$(top_builddir)/src/driver'
+CFACC=${DRIVER_DIR}/cfa
+CFACPP=${DRIVER_DIR}/cfa-cpp
+
+
+
+
+# Flag variables needed to build in tree
+LIBCFA_SRC='$(top_srcdir)/src/libcfa'
+LIBCFA_BUILD='$(top_builddir)/src/libcfa'
+BUILD_IN_TREE_FLAGS_NOLIB="-XCFA -t -B${DRIVER_DIR}"
+BUILD_IN_TREE_FLAGS="${BUILD_IN_TREE_FLAGS_NOLIB} -L${LIBCFA_BUILD} -I${LIBCFA_SRC} -I${LIBCFA_SRC}/containers -I${LIBCFA_SRC}/concurrency -I${LIBCFA_SRC}/stdhdr"
+
+
+
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
Index: configure.ac
===================================================================
--- configure.ac	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ configure.ac	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -170,4 +170,20 @@
 AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.])
 AC_SUBST(CFA_LIBDIR, ${cfa_libdir})
+
+# Create variables for commonly used targets
+DRIVER_DIR='$(top_builddir)/src/driver'
+CFACC=${DRIVER_DIR}/cfa
+CFACPP=${DRIVER_DIR}/cfa-cpp
+AC_SUBST(DRIVER_DIR)
+AC_SUBST(CFACC)
+AC_SUBST(CFACPP)
+
+# Flag variables needed to build in tree
+LIBCFA_SRC='$(top_srcdir)/src/libcfa'
+LIBCFA_BUILD='$(top_builddir)/src/libcfa'
+BUILD_IN_TREE_FLAGS_NOLIB="-XCFA -t -B${DRIVER_DIR}"
+BUILD_IN_TREE_FLAGS="${BUILD_IN_TREE_FLAGS_NOLIB} -L${LIBCFA_BUILD} -I${LIBCFA_SRC} -I${LIBCFA_SRC}/containers -I${LIBCFA_SRC}/concurrency -I${LIBCFA_SRC}/stdhdr"
+AC_SUBST(BUILD_IN_TREE_FLAGS_NOLIB)
+AC_SUBST(BUILD_IN_TREE_FLAGS)
 
 AC_CANONICAL_BUILD
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/Makefile.am	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -40,9 +40,9 @@
 
 # put into lib for now
-cfa_cpplibdir = ${CFA_LIBDIR}
+cfa_cpplibdir = $(CFA_LIBDIR)
 cfa_cpplib_PROGRAMS = driver/cfa-cpp
-driver_cfa_cpp_SOURCES = ${SRC}
+driver_cfa_cpp_SOURCES = $(SRC)
 driver_cfa_cpp_LDADD = -ldl			# yywrap
-driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I${abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14
+driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O2 -g -std=c++14
 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
 
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -365,4 +365,6 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
 CC = @CC@
 CCAS = @CCAS@
@@ -370,4 +372,6 @@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -386,4 +390,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -536,8 +541,8 @@
 
 # put into lib for now
-cfa_cpplibdir = ${CFA_LIBDIR}
-driver_cfa_cpp_SOURCES = ${SRC}
+cfa_cpplibdir = $(CFA_LIBDIR)
+driver_cfa_cpp_SOURCES = $(SRC)
 driver_cfa_cpp_LDADD = -ldl			# yywrap
-driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I${abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14
+driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$(srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O2 -g -std=c++14
 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
 all: $(BUILT_SOURCES)
Index: src/benchmark/Makefile.am
===================================================================
--- src/benchmark/Makefile.am	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/benchmark/Makefile.am	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -18,7 +18,4 @@
 CFLAGS =
 AM_CFLAGS = \
-	-XCFA \
-	-t \
-	-B${abs_top_builddir}/src/driver \
 	-g \
 	-O2 \
@@ -27,11 +24,7 @@
 	-quiet \
 	-I$(srcdir) \
-	-L${abs_top_builddir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa/containers \
-	-I${abs_top_srcdir}/src/libcfa/concurrency \
-	-I${abs_top_srcdir}/src/libcfa/stdhdr
-
-CC = ${top_builddir}/src/driver/cfa
+	@BUILD_IN_TREE_FLAGS@
+
+CC = @CFACC@
 TOOLSDIR = ${abs_top_srcdir}/tools/
 REPEAT   = ${TOOLSDIR}repeat
Index: src/benchmark/Makefile.in
===================================================================
--- src/benchmark/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/benchmark/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -135,9 +135,13 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
-CC = ${top_builddir}/src/driver/cfa
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
+CC = @CFACC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -158,4 +162,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -248,7 +253,4 @@
 top_srcdir = @top_srcdir@
 AM_CFLAGS = \
-	-XCFA \
-	-t \
-	-B${abs_top_builddir}/src/driver \
 	-g \
 	-O2 \
@@ -257,9 +259,5 @@
 	-quiet \
 	-I$(srcdir) \
-	-L${abs_top_builddir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa/containers \
-	-I${abs_top_srcdir}/src/libcfa/concurrency \
-	-I${abs_top_srcdir}/src/libcfa/stdhdr
+	@BUILD_IN_TREE_FLAGS@
 
 TOOLSDIR = ${abs_top_srcdir}/tools/
Index: src/cfa.make
===================================================================
--- src/cfa.make	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
+++ src/cfa.make	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -0,0 +1,11 @@
+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 =
+
+.cfa.c:
+	$(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+	$(CFACOMPILE) -CFA -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+	$(am__mv) $$depbase.Tpo $$depbase.Po
Index: src/driver/Makefile.in
===================================================================
--- src/driver/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/driver/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -181,4 +181,6 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
 CC = @CC@
 CCAS = @CCAS@
@@ -186,4 +188,6 @@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -202,4 +206,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
Index: src/examples/Makefile.am
===================================================================
--- src/examples/Makefile.am	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/examples/Makefile.am	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -25,5 +25,5 @@
 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
 
-Bench : Bench.c
+Bench$(EXEEXT) : Bench.c
 	@for ccflags in "-debug" "-nodebug"; do \
 		echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\
Index: src/examples/Makefile.in
===================================================================
--- src/examples/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/examples/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -189,4 +189,6 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
 CC = @CFA_BINDIR@/@CFA_NAME@
 CCAS = @CCAS@
@@ -194,4 +196,6 @@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -212,4 +216,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -615,5 +620,5 @@
 
 
-Bench : Bench.c
+Bench$(EXEEXT) : Bench.c
 	@for ccflags in "-debug" "-nodebug"; do \
 		echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\
Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/libcfa/Makefile.am	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -43,6 +43,6 @@
 #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
+CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@ ${EXTRA_FLAGS}
+CC = @CFACC@
 
 headers = fstream iostream iterator limits rational time stdlib common \
@@ -92,5 +92,5 @@
 	${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
+${libobjs} : @CFACPP@ ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
 
 libcfa_a_SOURCES = ${libsrc}
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/libcfa/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -303,9 +303,13 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
-CC = ${abs_top_builddir}/src/driver/cfa
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
+CC = @CFACC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -319,5 +323,5 @@
 #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}
+CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@ ${EXTRA_FLAGS}
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
@@ -328,4 +332,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -1704,5 +1709,5 @@
 	${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
+${libobjs} : @CFACPP@ ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator
 
 maintainer-clean-local:
Index: src/prelude/Makefile.am
===================================================================
--- src/prelude/Makefile.am	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/prelude/Makefile.am	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -23,5 +23,5 @@
 noinst_DATA = ../libcfa/libcfa-prelude.c
 
-CC = ${abs_top_builddir}/src/driver/cfa
+CC = @CFACC@
 
 $(DEPDIR) :
@@ -58,9 +58,9 @@
 include $(DEPDIR)/builtins.Po
 
-../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
-	${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
+../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
+	${AM_V_GEN}@CFACPP@ -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
 
-bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
-	${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
+bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
+	${AM_V_GEN}@CFACPP@ -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
 
 maintainer-clean-local :
Index: src/prelude/Makefile.in
===================================================================
--- src/prelude/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/prelude/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -162,9 +162,13 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
-CC = ${abs_top_builddir}/src/driver/cfa
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
+CC = @CFACC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -183,4 +187,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -526,9 +531,9 @@
 include $(DEPDIR)/builtins.Po
 
-../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
-	${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
-
-bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp
-	${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
+../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
+	${AM_V_GEN}@CFACPP@ -l prelude.cf $@  # use src/cfa-cpp as not in lib until after install
+
+bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@
+	${AM_V_GEN}@CFACPP@ -tpm ${srcdir}/bootloader.cf $@  # use src/cfa-cpp as not in lib until after install
 
 maintainer-clean-local :
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/tests/Makefile.am	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -30,18 +30,10 @@
 # applies to both programs
 AM_CFLAGS = $(if $(test), 2> $(test), ) \
-	-XCFA \
-	-t \
-	-B${abs_top_builddir}/src/driver \
 	-g \
 	-Wall \
 	-Wno-unused-function \
 	-quiet @CFA_FLAGS@ \
-	-I. \
 	-DIN_DIR="${srcdir}/.in/" \
-	-L${abs_top_builddir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa/containers \
-	-I${abs_top_srcdir}/src/libcfa/concurrency \
-	-I${abs_top_srcdir}/src/libcfa/stdhdr
+	@BUILD_IN_TREE_FLAGS@
 
 if !BUILD_DEBUG
@@ -55,5 +47,5 @@
 endif
 
-CC = ${abs_top_builddir}/src/driver/cfa
+CC = @CFACC@
 
 .PHONY : list
@@ -93,5 +85,4 @@
 # implicit rule so not all test require a rule
 % : %.c $(CC)
-	echo $(headers_deps)
 	$(COMPILE) $(abspath ${<}) -o ${@}
 
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/tests/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -181,9 +181,13 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
-CC = ${abs_top_builddir}/src/driver/cfa
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
+CC = @CFACC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -202,4 +206,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -298,13 +303,8 @@
 
 # applies to both programs
-AM_CFLAGS = $(if $(test), 2> $(test), ) -XCFA -t \
-	-B${abs_top_builddir}/src/driver -g -Wall -Wno-unused-function \
-	-quiet @CFA_FLAGS@ -I. -DIN_DIR="${srcdir}/.in/" \
-	-L${abs_top_builddir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa \
-	-I${abs_top_srcdir}/src/libcfa/containers \
-	-I${abs_top_srcdir}/src/libcfa/concurrency \
-	-I${abs_top_srcdir}/src/libcfa/stdhdr $(am__append_1) \
-	$(am__append_2) $(am__append_3)
+AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \
+	-quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" \
+	@BUILD_IN_TREE_FLAGS@ $(am__append_1) $(am__append_2) \
+	$(am__append_3)
 fstream_test_SOURCES = fstream_test.c
 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
@@ -641,5 +641,4 @@
 # implicit rule so not all test require a rule
 % : %.c $(CC)
-	echo $(headers_deps)
 	$(COMPILE) $(abspath ${<}) -o ${@}
 
Index: src/tests/preempt_longrun/Makefile.am
===================================================================
--- src/tests/preempt_longrun/Makefile.am	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/tests/preempt_longrun/Makefile.am	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -32,5 +32,5 @@
 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell cat .type | tr a-z A-Z)
 CFLAGS = ${BUILD_FLAGS}
-CC = ${top_builddir}/src/driver/cfa
+CC = @CFACC@
 
 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
Index: src/tests/preempt_longrun/Makefile.in
===================================================================
--- src/tests/preempt_longrun/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ src/tests/preempt_longrun/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -337,9 +337,13 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
-CC = ${top_builddir}/src/driver/cfa
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
+CC = @CFACC@
 CCAS = @CCAS@
 CCASDEPMODE = @CCASDEPMODE@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -358,4 +362,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
Index: tools/Makefile.in
===================================================================
--- tools/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ tools/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -186,4 +186,6 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
 CC = @BACKEND_CC@
 CCAS = @CCAS@
@@ -191,4 +193,6 @@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -207,4 +211,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
Index: tools/prettyprinter/Makefile.in
===================================================================
--- tools/prettyprinter/Makefile.in	(revision 843002c94cffb7b53c5eed8eef50f1e471f60b8e)
+++ tools/prettyprinter/Makefile.in	(revision 82c607225c5319115eab4f5d4cd91903388ee58f)
@@ -210,4 +210,6 @@
 AWK = @AWK@
 BACKEND_CC = @BACKEND_CC@
+BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
+BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@
 CC = @CC@
 CCAS = @CCAS@
@@ -215,4 +217,6 @@
 CCASFLAGS = @CCASFLAGS@
 CCDEPMODE = @CCDEPMODE@
+CFACC = @CFACC@
+CFACPP = @CFACPP@
 CFA_BACKEND_CC = @CFA_BACKEND_CC@
 CFA_BINDIR = @CFA_BINDIR@
@@ -231,4 +235,5 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DRIVER_DIR = @DRIVER_DIR@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
