diff --git a/.gitignore b/.gitignore
index 6f97059..9399e3c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.a
+c3-*.tar.gz
c3c/c3c
config.mk
*.core
diff --git a/Makefile b/Makefile
index 5ed5077..c25eabd 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,11 @@ debug:
${MAKE} -C ic3 debug
${MAKE} -C test debug
+dist: c3-${C3_VERSION}.tar.gz
+
+c3-${C3_VERSION}.tar.gz:
+ pax -wz < c3.index > c3-${C3_VERSION}.tar.gz
+
distclean:
${MAKE} -C libtommath distclean
${MAKE} -C ucd2c distclean
diff --git a/c3.index b/c3.index
new file mode 100644
index 0000000..59ef48b
--- /dev/null
+++ b/c3.index
@@ -0,0 +1,404 @@
+AUTHORS
+Makefile
+README.md
+c3.index
+c3.version
+c3c/Makefile
+c3c/c3c.c
+c3c/configure
+config.subr
+configure
+ic3/Makefile
+ic3/buf_readline.c
+ic3/buf_readline.h
+ic3/configure
+ic3/ic3.c
+libc3/Makefile
+libc3/bool.c
+libc3/bool.h
+libc3/buf.c
+libc3/buf.h
+libc3/buf_file.c
+libc3/buf_file.h
+libc3/buf_inspect.c
+libc3/buf_inspect.h
+libc3/buf_parse.c
+libc3/buf_parse.h
+libc3/buf_parse_c.c
+libc3/buf_parse_c.h
+libc3/buf_save.c
+libc3/buf_save.h
+libc3/c3.c
+libc3/c3.h
+libc3/c_types.h
+libc3/call.c
+libc3/call.h
+libc3/character.c
+libc3/character.h
+libc3/configure
+libc3/debug.c
+libc3/debug.h
+libc3/env.c
+libc3/env.h
+libc3/error_handler.c
+libc3/error_handler.h
+libc3/eval.c
+libc3/eval.h
+libc3/f32.c
+libc3/f32.h
+libc3/f64.c
+libc3/f64.h
+libc3/fact.c
+libc3/fact.h
+libc3/facts.c
+libc3/facts.h
+libc3/facts_cursor.c
+libc3/facts_cursor.h
+libc3/facts_spec.c
+libc3/facts_spec.h
+libc3/facts_spec_cursor.c
+libc3/facts_spec_cursor.h
+libc3/facts_with.c
+libc3/facts_with.h
+libc3/facts_with_cursor.c
+libc3/facts_with_cursor.h
+libc3/frame.c
+libc3/frame.h
+libc3/hash.c
+libc3/hash.h
+libc3/ident.c
+libc3/ident.h
+libc3/integer.c
+libc3/integer.h
+libc3/list.c
+libc3/list.h
+libc3/module.h
+libc3/ptag.c
+libc3/ptag.h
+libc3/ptr.c
+libc3/ptr.h
+libc3/quote.c
+libc3/quote.h
+libc3/s16.c
+libc3/s16.h
+libc3/s32.c
+libc3/s32.h
+libc3/s64.c
+libc3/s64.h
+libc3/s8.c
+libc3/s8.h
+libc3/set.c.in
+libc3/set.h.in
+libc3/set__fact.c
+libc3/set__fact.h
+libc3/set__tag.c
+libc3/set__tag.h
+libc3/set_cursor.c.in
+libc3/set_cursor.h.in
+libc3/set_cursor__fact.c
+libc3/set_cursor__fact.h
+libc3/set_cursor__tag.c
+libc3/set_cursor__tag.h
+libc3/set_item.c.in
+libc3/set_item.h.in
+libc3/set_item__fact.c
+libc3/set_item__fact.h
+libc3/set_item__tag.c
+libc3/set_item__tag.h
+libc3/sha1.c
+libc3/sha1.h
+libc3/skiplist.c.in
+libc3/skiplist.h.in
+libc3/skiplist__fact.c
+libc3/skiplist__fact.h
+libc3/skiplist_node.c.in
+libc3/skiplist_node.h.in
+libc3/skiplist_node__fact.c
+libc3/skiplist_node__fact.h
+libc3/str.c
+libc3/str.h
+libc3/sym.c
+libc3/sym.h
+libc3/tag.c
+libc3/tag.h
+libc3/tuple.c
+libc3/tuple.h
+libc3/types.h
+libc3/u16.c
+libc3/u16.h
+libc3/u32.c
+libc3/u32.h
+libc3/u64.c
+libc3/u64.h
+libc3/u8.c
+libc3/u8.h
+libc3/ucd.c
+libc3/ucd.h
+libffi/ffi.h
+libffi/ffitarget.h
+libtommath/Makefile
+libtommath/README.md
+libtommath/bn_cutoffs.c
+libtommath/bn_deprecated.c
+libtommath/bn_mp_2expt.c
+libtommath/bn_mp_abs.c
+libtommath/bn_mp_add.c
+libtommath/bn_mp_add_d.c
+libtommath/bn_mp_addmod.c
+libtommath/bn_mp_and.c
+libtommath/bn_mp_clamp.c
+libtommath/bn_mp_clear.c
+libtommath/bn_mp_clear_multi.c
+libtommath/bn_mp_cmp.c
+libtommath/bn_mp_cmp_d.c
+libtommath/bn_mp_cmp_mag.c
+libtommath/bn_mp_cnt_lsb.c
+libtommath/bn_mp_complement.c
+libtommath/bn_mp_copy.c
+libtommath/bn_mp_count_bits.c
+libtommath/bn_mp_decr.c
+libtommath/bn_mp_div.c
+libtommath/bn_mp_div_2.c
+libtommath/bn_mp_div_2d.c
+libtommath/bn_mp_div_3.c
+libtommath/bn_mp_div_d.c
+libtommath/bn_mp_dr_is_modulus.c
+libtommath/bn_mp_dr_reduce.c
+libtommath/bn_mp_dr_setup.c
+libtommath/bn_mp_error_to_string.c
+libtommath/bn_mp_exch.c
+libtommath/bn_mp_expt_u32.c
+libtommath/bn_mp_exptmod.c
+libtommath/bn_mp_exteuclid.c
+libtommath/bn_mp_fread.c
+libtommath/bn_mp_from_sbin.c
+libtommath/bn_mp_from_ubin.c
+libtommath/bn_mp_fwrite.c
+libtommath/bn_mp_gcd.c
+libtommath/bn_mp_get_double.c
+libtommath/bn_mp_get_i32.c
+libtommath/bn_mp_get_i64.c
+libtommath/bn_mp_get_l.c
+libtommath/bn_mp_get_ll.c
+libtommath/bn_mp_get_mag_u32.c
+libtommath/bn_mp_get_mag_u64.c
+libtommath/bn_mp_get_mag_ul.c
+libtommath/bn_mp_get_mag_ull.c
+libtommath/bn_mp_grow.c
+libtommath/bn_mp_incr.c
+libtommath/bn_mp_init.c
+libtommath/bn_mp_init_copy.c
+libtommath/bn_mp_init_i32.c
+libtommath/bn_mp_init_i64.c
+libtommath/bn_mp_init_l.c
+libtommath/bn_mp_init_ll.c
+libtommath/bn_mp_init_multi.c
+libtommath/bn_mp_init_set.c
+libtommath/bn_mp_init_size.c
+libtommath/bn_mp_init_u32.c
+libtommath/bn_mp_init_u64.c
+libtommath/bn_mp_init_ul.c
+libtommath/bn_mp_init_ull.c
+libtommath/bn_mp_invmod.c
+libtommath/bn_mp_is_square.c
+libtommath/bn_mp_iseven.c
+libtommath/bn_mp_isodd.c
+libtommath/bn_mp_kronecker.c
+libtommath/bn_mp_lcm.c
+libtommath/bn_mp_log_u32.c
+libtommath/bn_mp_lshd.c
+libtommath/bn_mp_mod.c
+libtommath/bn_mp_mod_2d.c
+libtommath/bn_mp_mod_d.c
+libtommath/bn_mp_montgomery_calc_normalization.c
+libtommath/bn_mp_montgomery_reduce.c
+libtommath/bn_mp_montgomery_setup.c
+libtommath/bn_mp_mul.c
+libtommath/bn_mp_mul_2.c
+libtommath/bn_mp_mul_2d.c
+libtommath/bn_mp_mul_d.c
+libtommath/bn_mp_mulmod.c
+libtommath/bn_mp_neg.c
+libtommath/bn_mp_or.c
+libtommath/bn_mp_pack.c
+libtommath/bn_mp_pack_count.c
+libtommath/bn_mp_prime_fermat.c
+libtommath/bn_mp_prime_frobenius_underwood.c
+libtommath/bn_mp_prime_is_prime.c
+libtommath/bn_mp_prime_miller_rabin.c
+libtommath/bn_mp_prime_next_prime.c
+libtommath/bn_mp_prime_rabin_miller_trials.c
+libtommath/bn_mp_prime_rand.c
+libtommath/bn_mp_prime_strong_lucas_selfridge.c
+libtommath/bn_mp_radix_size.c
+libtommath/bn_mp_radix_smap.c
+libtommath/bn_mp_rand.c
+libtommath/bn_mp_read_radix.c
+libtommath/bn_mp_reduce.c
+libtommath/bn_mp_reduce_2k.c
+libtommath/bn_mp_reduce_2k_l.c
+libtommath/bn_mp_reduce_2k_setup.c
+libtommath/bn_mp_reduce_2k_setup_l.c
+libtommath/bn_mp_reduce_is_2k.c
+libtommath/bn_mp_reduce_is_2k_l.c
+libtommath/bn_mp_reduce_setup.c
+libtommath/bn_mp_root_u32.c
+libtommath/bn_mp_rshd.c
+libtommath/bn_mp_sbin_size.c
+libtommath/bn_mp_set.c
+libtommath/bn_mp_set_double.c
+libtommath/bn_mp_set_i32.c
+libtommath/bn_mp_set_i64.c
+libtommath/bn_mp_set_l.c
+libtommath/bn_mp_set_ll.c
+libtommath/bn_mp_set_u32.c
+libtommath/bn_mp_set_u64.c
+libtommath/bn_mp_set_ul.c
+libtommath/bn_mp_set_ull.c
+libtommath/bn_mp_shrink.c
+libtommath/bn_mp_signed_rsh.c
+libtommath/bn_mp_sqr.c
+libtommath/bn_mp_sqrmod.c
+libtommath/bn_mp_sqrt.c
+libtommath/bn_mp_sqrtmod_prime.c
+libtommath/bn_mp_sub.c
+libtommath/bn_mp_sub_d.c
+libtommath/bn_mp_submod.c
+libtommath/bn_mp_to_radix.c
+libtommath/bn_mp_to_sbin.c
+libtommath/bn_mp_to_ubin.c
+libtommath/bn_mp_ubin_size.c
+libtommath/bn_mp_unpack.c
+libtommath/bn_mp_xor.c
+libtommath/bn_mp_zero.c
+libtommath/bn_prime_tab.c
+libtommath/bn_s_mp_add.c
+libtommath/bn_s_mp_balance_mul.c
+libtommath/bn_s_mp_exptmod.c
+libtommath/bn_s_mp_exptmod_fast.c
+libtommath/bn_s_mp_get_bit.c
+libtommath/bn_s_mp_invmod_fast.c
+libtommath/bn_s_mp_invmod_slow.c
+libtommath/bn_s_mp_karatsuba_mul.c
+libtommath/bn_s_mp_karatsuba_sqr.c
+libtommath/bn_s_mp_montgomery_reduce_fast.c
+libtommath/bn_s_mp_mul_digs.c
+libtommath/bn_s_mp_mul_digs_fast.c
+libtommath/bn_s_mp_mul_high_digs.c
+libtommath/bn_s_mp_mul_high_digs_fast.c
+libtommath/bn_s_mp_prime_is_divisible.c
+libtommath/bn_s_mp_rand_jenkins.c
+libtommath/bn_s_mp_rand_platform.c
+libtommath/bn_s_mp_reverse.c
+libtommath/bn_s_mp_sqr.c
+libtommath/bn_s_mp_sqr_fast.c
+libtommath/bn_s_mp_sub.c
+libtommath/bn_s_mp_toom_mul.c
+libtommath/bn_s_mp_toom_sqr.c
+libtommath/configure
+libtommath/demo/mtest_opponent.c
+libtommath/demo/shared.c
+libtommath/demo/shared.h
+libtommath/demo/test.c
+libtommath/demo/timing.c
+libtommath/etc/drprime.c
+libtommath/etc/mersenne.c
+libtommath/etc/mont.c
+libtommath/etc/pprime.c
+libtommath/etc/tune.c
+libtommath/libtommath.pc.in
+libtommath/logs/Makefile
+libtommath/mtest/logtab.h
+libtommath/mtest/mpi-config.h
+libtommath/mtest/mpi-types.h
+libtommath/mtest/mpi.c
+libtommath/mtest/mpi.h
+libtommath/mtest/mtest.c
+libtommath/tommath.h
+libtommath/tommath_class.h
+libtommath/tommath_cutoffs.h
+libtommath/tommath_private.h
+libtommath/tommath_superclass.h
+test/Makefile
+test/bool_test.c
+test/buf_file_test.c
+test/buf_inspect_test.c
+test/buf_parse_test.c
+test/buf_test.c
+test/call_test.c
+test/character_test.c
+test/configure
+test/f32_test.c
+test/f64_test.c
+test/fact_test.c
+test/fact_test.h
+test/facts_cursor_test.c
+test/facts_test.c
+test/facts_test_dump.facts.expected
+test/facts_test_log_add.facts.expected
+test/facts_test_log_remove.facts.expected
+test/facts_with_test.c
+test/ic3/bool.err.expected
+test/ic3/bool.in
+test/ic3/bool.out.expected
+test/ic3/bool.ret.expected
+test/ic3/call.err.expected
+test/ic3/call.in
+test/ic3/call.out.expected
+test/ic3/call.ret.expected
+test/ic3/character.err.expected
+test/ic3/character.in
+test/ic3/character.out.expected
+test/ic3/character.ret.expected
+test/ic3/comment.err.expected
+test/ic3/comment.in
+test/ic3/comment.out.expected
+test/ic3/comment.ret.expected
+test/ic3/hello.err.expected
+test/ic3/hello.in
+test/ic3/hello.out.expected
+test/ic3/hello.ret.expected
+test/ic3/ident.err.expected
+test/ic3/ident.in
+test/ic3/ident.out.expected
+test/ic3/ident.ret.expected
+test/ic3/integer.err.expected
+test/ic3/integer.in
+test/ic3/integer.out.expected
+test/ic3/integer.ret.expected
+test/ic3/list.err.expected
+test/ic3/list.in
+test/ic3/list.out.expected
+test/ic3/list.ret.expected
+test/ic3/str.err.expected
+test/ic3/str.in
+test/ic3/str.out.expected
+test/ic3/str.ret.expected
+test/ic3/sym.err.expected
+test/ic3/sym.in
+test/ic3/sym.out.expected
+test/ic3/sym.ret.expected
+test/ic3/tuple.err.expected
+test/ic3/tuple.in
+test/ic3/tuple.out.expected
+test/ic3/tuple.ret.expected
+test/ident_test.c
+test/libc3_test.c
+test/list_test.c
+test/set__fact_test.c
+test/set__tag_test.c
+test/sha1_test.c
+test/skiplist__fact_test.c
+test/str_test.c
+test/sym_test.c
+test/tag_test.c
+test/tag_test.h
+test/test.c
+test/test.h
+test/tuple_test.c
+test/types_test.c
+ucd2c/Makefile
+ucd2c/configure
+ucd2c/ucd.c
+ucd2c/ucd.h
+ucd2c/ucd2c.c
diff --git a/c3.version b/c3.version
new file mode 100644
index 0000000..49d5957
--- /dev/null
+++ b/c3.version
@@ -0,0 +1 @@
+0.1
diff --git a/configure b/configure
index eac0693..77e5a09 100755
--- a/configure
+++ b/configure
@@ -34,4 +34,8 @@ echo "C3_CONFIGURES = $C3_CONFIGURES" >> ${CONFIG_MK}
echo "C3_MAKEFILES = $C3_MAKEFILES" >> ${CONFIG_MK}
echo "C3_C_SOURCES = $C3_C_SOURCES" >> ${CONFIG_MK}
+C3_VERSION="$(cat c3.version)"
+echo "C3_VERSION = $C3_VERSION" >> ${CONFIG_MK}
+echo "c3-${C3_VERSION}.tar.gz: $(tr '\n' ' ' < c3.index)" >> ${CONFIG_MK}
+
update_config_mk