Index: libcfa/Makefile.am
===================================================================
--- libcfa/Makefile.am	(revision 915aa111c36336c37d46b1b266c76addaf34a7fa)
+++ libcfa/Makefile.am	(revision d5f46131be643704ce63e4727b87001e3c5f3459)
@@ -16,4 +16,4 @@
 
 AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names
-ACLOCAL_AMFLAGS  = -I automake
+ACLOCAL_AMFLAGS  = -I ../automake
 SUBDIRS = prelude src      # order important
Index: libcfa/Makefile.dist.am
===================================================================
--- libcfa/Makefile.dist.am	(revision d5f46131be643704ce63e4727b87001e3c5f3459)
+++ libcfa/Makefile.dist.am	(revision d5f46131be643704ce63e4727b87001e3c5f3459)
@@ -0,0 +1,27 @@
+######################## -*- Mode: Makefile-Automake -*- ######################
+##
+## Cforall Version 1.0.0 Copyright (C) 2020 University of Waterloo
+##
+## The contents of this file are covered under the licence agreement in the
+## file "LICENCE" distributed with Cforall.
+##
+## Makefile.dist.am --
+##
+## Author           : Thierry Delisle
+## Created On       : Fri Aug dd 12:53:35 2020
+## Last Modified By :
+## Last Modified On :
+## Update Count     :
+###############################################################################
+
+AUTOMAKE_OPTIONS = foreign    # do not require all the GNU file names
+ACLOCAL_AMFLAGS  = -I automake
+
+distdir:
+	@echo "Distributing libcfa from '@LIBCFA_1TARGET_DIR@'"
+	+make -C $(abs_top_builddir)/@LIBCFA_1TARGET_DIR@ distdir \
+	top_distdir=$(top_distdir) \
+	distdir=../$(distdir) \
+	am__remove_distdir=$$(am__remove_distdir) \
+	am__skip_length_check=$(am__skip_length_check) \
+	am__skip_mode_fix=$(am__skip_mode_fix)
Index: libcfa/configure.ac
===================================================================
--- libcfa/configure.ac	(revision 915aa111c36336c37d46b1b266c76addaf34a7fa)
+++ libcfa/configure.ac	(revision d5f46131be643704ce63e4727b87001e3c5f3459)
@@ -4,6 +4,6 @@
 AC_PREREQ([2.68])
 AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca])
-AC_CONFIG_AUX_DIR([automake])
-AC_CONFIG_MACRO_DIRS([automake])
+AC_CONFIG_AUX_DIR([../automake])
+AC_CONFIG_MACRO_DIRS([../automake])
 AM_SILENT_RULES([yes])
 
Index: libcfa/prelude/Makefile.am
===================================================================
--- libcfa/prelude/Makefile.am	(revision 915aa111c36336c37d46b1b266c76addaf34a7fa)
+++ libcfa/prelude/Makefile.am	(revision d5f46131be643704ce63e4727b87001e3c5f3459)
@@ -17,9 +17,11 @@
 # create object files in directory with source files
 AUTOMAKE_OPTIONS = foreign subdir-objects
-ACLOCAL_AMFLAGS  = -I automake
+ACLOCAL_AMFLAGS  = -I ../automake
 
 # put into lib for now
 cfalibdir = ${CFA_LIBDIR}
 cfalib_DATA = gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c defines.hfa
+
+EXTRA_DIST = bootloader.cf builtins.c builtins.def extras.c extras.regx extras.regx2 prelude-gen.cc prototypes.awk prototypes.c prototypes.sed sync-builtins.cf
 
 CC = @LOCAL_CFACC@
Index: libcfa/src/Makefile.am
===================================================================
--- libcfa/src/Makefile.am	(revision 915aa111c36336c37d46b1b266c76addaf34a7fa)
+++ libcfa/src/Makefile.am	(revision d5f46131be643704ce63e4727b87001e3c5f3459)
@@ -17,5 +17,5 @@
 # create object files in directory with source files
 AUTOMAKE_OPTIONS = foreign subdir-objects
-ACLOCAL_AMFLAGS  = -I automake
+ACLOCAL_AMFLAGS  = -I ../automake
 
 include $(top_srcdir)/../tools/build/cfa.make
@@ -31,5 +31,5 @@
 # AM_CFAFLAGS for only cfa source
 # use -no-include-stdhdr to prevent rebuild cycles
-# The built sources must not depend on the installed headers
+# The built sources must not depend on the installed inst_headers_src
 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -fexceptions -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
@@ -39,31 +39,90 @@
 #----------------------------------------------------------------------------------------------------------------
 if BUILDLIB
-headers_nosrc = bitmanip.hfa exception.hfa math.hfa gmp.hfa time_t.hfa clock.hfa \
-		bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa \
-		containers/list.hfa containers/stackLockFree.hfa concurrency/iofwd.hfa
+inst_headers_nosrc = \
+	bitmanip.hfa \
+	clock.hfa \
+	exception.hfa \
+	gmp.hfa \
+	math.hfa \
+	time_t.hfa \
+	bits/align.hfa \
+	bits/containers.hfa \
+	bits/debug.hfa \
+	bits/defs.hfa \
+	bits/locks.hfa \
+	concurrency/iofwd.hfa \
+	containers/list.hfa \
+	containers/stackLockFree.hfa
 
-headers = common.hfa fstream.hfa heap.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa \
-		time.hfa stdlib.hfa parseargs.hfa \
-		containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/vector.hfa
+inst_headers_src = \
+	common.hfa \
+	fstream.hfa \
+	heap.hfa \
+	iostream.hfa \
+	iterator.hfa \
+	limits.hfa \
+	parseargs.hfa \
+	rational.hfa \
+	stdlib.hfa \
+	time.hfa \
+	containers/maybe.hfa \
+	containers/pair.hfa \
+	containers/result.hfa \
+	containers/vector.hfa
 
-libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c ${headers:.hfa=.cfa}
+libsrc = ${inst_headers_src} ${inst_headers_src:.hfa=.cfa} \
+	assert.cfa \
+	bits/algorithm.hfa \
+	bits/debug.cfa \
+	exception.c \
+	exception.h \
+	interpose.cfa \
+	lsda.h \
+	startup.cfa \
+	startup.hfa \
+	virtual.c \
+	virtual.h
 
 # not all platforms support concurrency, add option do disable it
-thread_headers_nosrc = bits/random.hfa concurrency/invoke.h concurrency/kernel/fwd.hfa
+inst_thread_headers_nosrc = \
+	bits/random.hfa \
+	concurrency/invoke.h \
+	concurrency/kernel/fwd.hfa
 
-thread_headers = concurrency/coroutine.hfa concurrency/thread.hfa concurrency/kernel.hfa \
-		concurrency/monitor.hfa concurrency/mutex.hfa concurrency/exception.hfa
+inst_thread_headers_src = \
+	concurrency/coroutine.hfa \
+	concurrency/exception.hfa \
+	concurrency/kernel.hfa \
+	concurrency/monitor.hfa \
+	concurrency/mutex.hfa \
+	concurrency/thread.hfa
 
-thread_libsrc = concurrency/CtxSwitch-@ARCHITECTURE@.S concurrency/alarm.cfa \
-		concurrency/invoke.c concurrency/io.cfa concurrency/iocall.cfa \
-		concurrency/io/setup.cfa \
-		concurrency/kernel/startup.cfa concurrency/preemption.cfa \
-		concurrency/ready_queue.cfa concurrency/stats.cfa \
-		${thread_headers:.hfa=.cfa}
+thread_libsrc = ${inst_thread_headers_src} ${inst_thread_headers_src:.hfa=.cfa} \
+	bits/signal.hfa \
+	concurrency/alarm.cfa \
+	concurrency/alarm.hfa \
+	concurrency/CtxSwitch-@ARCHITECTURE@.S \
+	concurrency/invoke.c \
+	concurrency/io.cfa \
+	concurrency/io/setup.cfa \
+	concurrency/io/types.hfa \
+	concurrency/iocall.cfa \
+	concurrency/iofwd.hfa \
+	concurrency/kernel_private.hfa \
+	concurrency/kernel/startup.cfa \
+	concurrency/preemption.cfa \
+	concurrency/preemption.hfa \
+	concurrency/ready_queue.cfa \
+	concurrency/ready_subqueue.hfa \
+	concurrency/snzi.hfa \
+	concurrency/stats.cfa \
+	concurrency/stats.hfa \
+	concurrency/stats.hfa
+
 else
-headers =
-thread_headers =
-headers_nosrc =
-thread_headers_nosrc =
+inst_headers_src =
+inst_thread_headers_src =
+inst_headers_nosrc =
+inst_thread_headers_nosrc =
 libsrc =
 endif
@@ -115,5 +174,6 @@
 
 #----------------------------------------------------------------------------------------------------------------
-libcfa_la_SOURCES = prelude.cfa ${libsrc}
+libcfa_la_SOURCES = ${libsrc}
+nodist_libcfa_la_SOURCES = prelude.cfa
 libcfa_la_LDFLAGS = -version-info @CFA_VERSION@
 
@@ -124,5 +184,6 @@
 
 cfa_includedir = $(CFA_INCDIR)
-nobase_cfa_include_HEADERS = ${stdhdr} ${headers} ${headers_nosrc} ${thread_headers} ${thread_headers_nosrc}
+nobase_cfa_include_HEADERS = ${stdhdr} ${inst_headers_src} ${inst_headers_nosrc} ${inst_thread_headers_src} ${inst_thread_headers_nosrc}
+EXTRA_DIST = stdhdr
 
 #----------------------------------------------------------------------------------------------------------------
