diff --git a/Makefile.am b/Makefile.am index 76652ce5..eefeca22 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,83 +2,83 @@ bin_PROGRAMS = snapraid check_PROGRAMS = mktest snapraid_SOURCES = \ - src/raid/raid.c \ - src/raid/module.c \ - src/raid/tables.c \ - src/raid/int.c \ - src/raid/x86.c \ - src/raid/intz.c \ - src/raid/x86z.c \ - src/raid/helper.c \ - src/raid/memory.c \ - src/raid/test.c \ - src/raid/tag.c \ - src/tommyds/tommy.c \ - src/snapraid.c \ - src/util.c \ - src/elem.c \ - src/state.c \ - src/scan.c \ - src/sync.c \ - src/check.c \ - src/dry.c \ - src/rehash.c \ - src/scrub.c \ - src/status.c \ - src/dup.c \ - src/list.c \ - src/pool.c \ - src/parity.c \ - src/handle.c \ - src/fnmatch.c \ - src/selftest.c \ - src/speed.c \ - src/import.c \ - src/mingw.c \ - src/unix.c + raid/raid.c \ + raid/module.c \ + raid/tables.c \ + raid/int.c \ + raid/x86.c \ + raid/intz.c \ + raid/x86z.c \ + raid/helper.c \ + raid/memory.c \ + raid/test.c \ + raid/tag.c \ + tommyds/tommy.c \ + cmdline/snapraid.c \ + cmdline/util.c \ + cmdline/elem.c \ + cmdline/state.c \ + cmdline/scan.c \ + cmdline/sync.c \ + cmdline/check.c \ + cmdline/dry.c \ + cmdline/rehash.c \ + cmdline/scrub.c \ + cmdline/status.c \ + cmdline/dup.c \ + cmdline/list.c \ + cmdline/pool.c \ + cmdline/parity.c \ + cmdline/handle.c \ + cmdline/fnmatch.c \ + cmdline/selftest.c \ + cmdline/speed.c \ + cmdline/import.c \ + cmdline/mingw.c \ + cmdline/unix.c noinst_HEADERS = \ - src/raid/raid.h \ - src/raid/helper.h \ - src/raid/internal.h \ - src/raid/cpu.h \ - src/raid/gf.h \ - src/raid/combo.h \ - src/raid/memory.h \ - src/raid/test.h \ - src/tommyds/tommyarray.h \ - src/tommyds/tommyarrayblk.h \ - src/tommyds/tommyarrayblkof.h \ - src/tommyds/tommychain.h \ - src/tommyds/tommyhash.h \ - src/tommyds/tommyhashdyn.h \ - src/tommyds/tommylist.h \ - src/tommyds/tommytypes.h \ - src/tommyds/tommyarray.c \ - src/tommyds/tommyarrayblk.c \ - src/tommyds/tommyarrayblkof.c \ - src/tommyds/tommyhash.c \ - src/tommyds/tommyhashdyn.c \ - src/tommyds/tommylist.c \ - src/portable.h \ - src/snapraid.h \ - src/util.h \ - src/elem.h \ - src/state.h \ - src/parity.h \ - src/handle.h \ - src/murmur3.c \ - src/murmur3test.c \ - src/spooky2.c \ - src/spooky2test.c \ - src/fnmatch.h \ - src/import.h \ - src/mingw.h \ - src/unix.h + raid/raid.h \ + raid/helper.h \ + raid/internal.h \ + raid/cpu.h \ + raid/gf.h \ + raid/combo.h \ + raid/memory.h \ + raid/test.h \ + tommyds/tommyarray.h \ + tommyds/tommyarrayblk.h \ + tommyds/tommyarrayblkof.h \ + tommyds/tommychain.h \ + tommyds/tommyhash.h \ + tommyds/tommyhashdyn.h \ + tommyds/tommylist.h \ + tommyds/tommytypes.h \ + tommyds/tommyarray.c \ + tommyds/tommyarrayblk.c \ + tommyds/tommyarrayblkof.c \ + tommyds/tommyhash.c \ + tommyds/tommyhashdyn.c \ + tommyds/tommylist.c \ + cmdline/portable.h \ + cmdline/snapraid.h \ + cmdline/util.h \ + cmdline/elem.h \ + cmdline/state.h \ + cmdline/parity.h \ + cmdline/handle.h \ + cmdline/murmur3.c \ + cmdline/murmur3test.c \ + cmdline/spooky2.c \ + cmdline/spooky2test.c \ + cmdline/fnmatch.h \ + cmdline/import.h \ + cmdline/mingw.h \ + cmdline/unix.h mktest_SOURCES = \ - src/mktest.c \ - src/mingw.c + cmdline/mktest.c \ + cmdline/mingw.c EXTRA_DIST = \ autogen.sh \ @@ -94,13 +94,13 @@ EXTRA_DIST = \ snapraid.conf.example \ configure.windows-x86 configure.windows-x64 snapraid.conf.example.windows \ acinclude.m4 \ - src/tommyds/LICENSE \ - src/raid/COPYING \ - src/raid/test/Makefile \ - src/raid/test/fulltest.c \ - src/raid/test/selftest.c \ - src/raid/test/speedtest.c \ - src/raid/test/invtest.c + tommyds/LICENSE \ + raid/COPYING \ + raid/test/Makefile \ + raid/test/fulltest.c \ + raid/test/selftest.c \ + raid/test/speedtest.c \ + raid/test/invtest.c man_MANS = snapraid.1 @@ -108,9 +108,9 @@ clean-local: rm -f valgrind.log callgrind.log cachegrind.log rm -rf bench rm -f test*.log output.log - rm -f src/*.gcda src/*.gcno src/*.gcov - rm -f src/raid/*.gcda src/raid/*.gcno src/raid/*.gcov - rm -f src/tommyds/*.gcda src/tommyds/*.gcno src/tommyds/*.gcov + rm -f cmdline/*.gcda cmdline/*.gcno cmdline/*.gcov + rm -f raid/*.gcda raid/*.gcno raid/*.gcov + rm -f tommyds/*.gcda tommyds/*.gcno tommyds/*.gcov rm -rf cov rm -f lcov.info rm -f gmon.out @@ -617,11 +617,11 @@ cachegrind: tail cachegrind.log lcov_reset: - lcov --directory src -z + lcov --directory . -z rm -f ./lcov.info lcov_capture: - lcov --directory src --capture -o lcov.info + lcov --directory . --capture -o lcov.info lcov_html: rm -rf ./cov diff --git a/src/check.c b/cmdline/check.c similarity index 100% rename from src/check.c rename to cmdline/check.c diff --git a/src/dry.c b/cmdline/dry.c similarity index 100% rename from src/dry.c rename to cmdline/dry.c diff --git a/src/dup.c b/cmdline/dup.c similarity index 100% rename from src/dup.c rename to cmdline/dup.c diff --git a/src/elem.c b/cmdline/elem.c similarity index 100% rename from src/elem.c rename to cmdline/elem.c diff --git a/src/elem.h b/cmdline/elem.h similarity index 100% rename from src/elem.h rename to cmdline/elem.h diff --git a/src/fnmatch.c b/cmdline/fnmatch.c similarity index 100% rename from src/fnmatch.c rename to cmdline/fnmatch.c diff --git a/src/fnmatch.h b/cmdline/fnmatch.h similarity index 100% rename from src/fnmatch.h rename to cmdline/fnmatch.h diff --git a/src/handle.c b/cmdline/handle.c similarity index 100% rename from src/handle.c rename to cmdline/handle.c diff --git a/src/handle.h b/cmdline/handle.h similarity index 100% rename from src/handle.h rename to cmdline/handle.h diff --git a/src/import.c b/cmdline/import.c similarity index 100% rename from src/import.c rename to cmdline/import.c diff --git a/src/import.h b/cmdline/import.h similarity index 100% rename from src/import.h rename to cmdline/import.h diff --git a/src/list.c b/cmdline/list.c similarity index 100% rename from src/list.c rename to cmdline/list.c diff --git a/src/mingw.c b/cmdline/mingw.c similarity index 100% rename from src/mingw.c rename to cmdline/mingw.c diff --git a/src/mingw.h b/cmdline/mingw.h similarity index 100% rename from src/mingw.h rename to cmdline/mingw.h diff --git a/src/mktest.c b/cmdline/mktest.c similarity index 100% rename from src/mktest.c rename to cmdline/mktest.c diff --git a/src/murmur3.c b/cmdline/murmur3.c similarity index 100% rename from src/murmur3.c rename to cmdline/murmur3.c diff --git a/src/murmur3test.c b/cmdline/murmur3test.c similarity index 100% rename from src/murmur3test.c rename to cmdline/murmur3test.c diff --git a/src/parity.c b/cmdline/parity.c similarity index 100% rename from src/parity.c rename to cmdline/parity.c diff --git a/src/parity.h b/cmdline/parity.h similarity index 100% rename from src/parity.h rename to cmdline/parity.h diff --git a/src/pool.c b/cmdline/pool.c similarity index 100% rename from src/pool.c rename to cmdline/pool.c diff --git a/src/portable.h b/cmdline/portable.h similarity index 100% rename from src/portable.h rename to cmdline/portable.h diff --git a/src/rehash.c b/cmdline/rehash.c similarity index 100% rename from src/rehash.c rename to cmdline/rehash.c diff --git a/src/scan.c b/cmdline/scan.c similarity index 100% rename from src/scan.c rename to cmdline/scan.c diff --git a/src/scrub.c b/cmdline/scrub.c similarity index 100% rename from src/scrub.c rename to cmdline/scrub.c diff --git a/src/selftest.c b/cmdline/selftest.c similarity index 100% rename from src/selftest.c rename to cmdline/selftest.c diff --git a/src/snapraid.c b/cmdline/snapraid.c similarity index 100% rename from src/snapraid.c rename to cmdline/snapraid.c diff --git a/src/snapraid.h b/cmdline/snapraid.h similarity index 100% rename from src/snapraid.h rename to cmdline/snapraid.h diff --git a/src/speed.c b/cmdline/speed.c similarity index 100% rename from src/speed.c rename to cmdline/speed.c diff --git a/src/spooky2.c b/cmdline/spooky2.c similarity index 100% rename from src/spooky2.c rename to cmdline/spooky2.c diff --git a/src/spooky2test.c b/cmdline/spooky2test.c similarity index 100% rename from src/spooky2test.c rename to cmdline/spooky2test.c diff --git a/src/state.c b/cmdline/state.c similarity index 100% rename from src/state.c rename to cmdline/state.c diff --git a/src/state.h b/cmdline/state.h similarity index 100% rename from src/state.h rename to cmdline/state.h diff --git a/src/status.c b/cmdline/status.c similarity index 100% rename from src/status.c rename to cmdline/status.c diff --git a/src/sync.c b/cmdline/sync.c similarity index 100% rename from src/sync.c rename to cmdline/sync.c diff --git a/src/unix.c b/cmdline/unix.c similarity index 100% rename from src/unix.c rename to cmdline/unix.c diff --git a/src/unix.h b/cmdline/unix.h similarity index 100% rename from src/unix.h rename to cmdline/unix.h diff --git a/src/util.c b/cmdline/util.c similarity index 100% rename from src/util.c rename to cmdline/util.c diff --git a/src/util.h b/cmdline/util.h similarity index 100% rename from src/util.h rename to cmdline/util.h diff --git a/configure.ac b/configure.ac index a11aa8a4..2d9d5365 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) AC_INIT([snapraid], [6.0], [], [], [http://snapraid.sourceforge.net]) AM_INIT_AUTOMAKE([foreign no-dependencies subdir-objects]) -AC_CONFIG_SRCDIR([src/snapraid.c]) +AC_CONFIG_SRCDIR([cmdline/snapraid.c]) AC_CONFIG_HEADER([config.h]) AC_CANONICAL_HOST @@ -170,6 +170,9 @@ AC_ARG_ENABLE([warning], ], []) +dnl Default include dir for libraries +CFLAGS="$CFLAGS $(srcdir)" + AC_ARG_VAR([TESTENV], [Test environment]) AC_ARG_VAR([FAILENV], [Test environment for failing tests]) AC_CONFIG_FILES([Makefile]) diff --git a/src/raid/COPYING b/raid/COPYING similarity index 100% rename from src/raid/COPYING rename to raid/COPYING diff --git a/src/raid/combo.h b/raid/combo.h similarity index 100% rename from src/raid/combo.h rename to raid/combo.h diff --git a/src/raid/cpu.h b/raid/cpu.h similarity index 100% rename from src/raid/cpu.h rename to raid/cpu.h diff --git a/src/raid/gf.h b/raid/gf.h similarity index 100% rename from src/raid/gf.h rename to raid/gf.h diff --git a/src/raid/helper.c b/raid/helper.c similarity index 100% rename from src/raid/helper.c rename to raid/helper.c diff --git a/src/raid/helper.h b/raid/helper.h similarity index 100% rename from src/raid/helper.h rename to raid/helper.h diff --git a/src/raid/int.c b/raid/int.c similarity index 100% rename from src/raid/int.c rename to raid/int.c diff --git a/src/raid/internal.h b/raid/internal.h similarity index 100% rename from src/raid/internal.h rename to raid/internal.h diff --git a/src/raid/intz.c b/raid/intz.c similarity index 100% rename from src/raid/intz.c rename to raid/intz.c diff --git a/src/raid/memory.c b/raid/memory.c similarity index 100% rename from src/raid/memory.c rename to raid/memory.c diff --git a/src/raid/memory.h b/raid/memory.h similarity index 100% rename from src/raid/memory.h rename to raid/memory.h diff --git a/src/raid/mktables.c b/raid/mktables.c similarity index 100% rename from src/raid/mktables.c rename to raid/mktables.c diff --git a/src/raid/module.c b/raid/module.c similarity index 100% rename from src/raid/module.c rename to raid/module.c diff --git a/src/raid/raid.c b/raid/raid.c similarity index 100% rename from src/raid/raid.c rename to raid/raid.c diff --git a/src/raid/raid.h b/raid/raid.h similarity index 100% rename from src/raid/raid.h rename to raid/raid.h diff --git a/src/raid/sort.c b/raid/sort.c similarity index 100% rename from src/raid/sort.c rename to raid/sort.c diff --git a/src/raid/tables.c b/raid/tables.c similarity index 100% rename from src/raid/tables.c rename to raid/tables.c diff --git a/src/raid/tag.c b/raid/tag.c similarity index 100% rename from src/raid/tag.c rename to raid/tag.c diff --git a/src/raid/test.c b/raid/test.c similarity index 100% rename from src/raid/test.c rename to raid/test.c diff --git a/src/raid/test.h b/raid/test.h similarity index 100% rename from src/raid/test.h rename to raid/test.h diff --git a/src/raid/test/Makefile b/raid/test/Makefile similarity index 100% rename from src/raid/test/Makefile rename to raid/test/Makefile diff --git a/src/raid/test/fulltest.c b/raid/test/fulltest.c similarity index 100% rename from src/raid/test/fulltest.c rename to raid/test/fulltest.c diff --git a/src/raid/test/invtest.c b/raid/test/invtest.c similarity index 100% rename from src/raid/test/invtest.c rename to raid/test/invtest.c diff --git a/src/raid/test/selftest.c b/raid/test/selftest.c similarity index 100% rename from src/raid/test/selftest.c rename to raid/test/selftest.c diff --git a/src/raid/test/speedtest.c b/raid/test/speedtest.c similarity index 100% rename from src/raid/test/speedtest.c rename to raid/test/speedtest.c diff --git a/src/raid/x86.c b/raid/x86.c similarity index 100% rename from src/raid/x86.c rename to raid/x86.c diff --git a/src/raid/x86z.c b/raid/x86z.c similarity index 100% rename from src/raid/x86z.c rename to raid/x86z.c diff --git a/src/tommyds/LICENSE b/tommyds/LICENSE similarity index 100% rename from src/tommyds/LICENSE rename to tommyds/LICENSE diff --git a/src/tommyds/tommy.c b/tommyds/tommy.c similarity index 92% rename from src/tommyds/tommy.c rename to tommyds/tommy.c index b826e56f..4b2cce3b 100644 --- a/src/tommyds/tommy.c +++ b/tommyds/tommy.c @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#include "../portable.h" -#include "../util.h" /* for safe_malloc */ +#include "cmdline/portable.h" +#include "cmdline/util.h" /* for safe_malloc */ /* redefine the malloc for tommy use */ #define tommy_malloc malloc_nofail diff --git a/src/tommyds/tommyarray.c b/tommyds/tommyarray.c similarity index 100% rename from src/tommyds/tommyarray.c rename to tommyds/tommyarray.c diff --git a/src/tommyds/tommyarray.h b/tommyds/tommyarray.h similarity index 100% rename from src/tommyds/tommyarray.h rename to tommyds/tommyarray.h diff --git a/src/tommyds/tommyarrayblk.c b/tommyds/tommyarrayblk.c similarity index 100% rename from src/tommyds/tommyarrayblk.c rename to tommyds/tommyarrayblk.c diff --git a/src/tommyds/tommyarrayblk.h b/tommyds/tommyarrayblk.h similarity index 100% rename from src/tommyds/tommyarrayblk.h rename to tommyds/tommyarrayblk.h diff --git a/src/tommyds/tommyarrayblkof.c b/tommyds/tommyarrayblkof.c similarity index 100% rename from src/tommyds/tommyarrayblkof.c rename to tommyds/tommyarrayblkof.c diff --git a/src/tommyds/tommyarrayblkof.h b/tommyds/tommyarrayblkof.h similarity index 100% rename from src/tommyds/tommyarrayblkof.h rename to tommyds/tommyarrayblkof.h diff --git a/src/tommyds/tommychain.h b/tommyds/tommychain.h similarity index 100% rename from src/tommyds/tommychain.h rename to tommyds/tommychain.h diff --git a/src/tommyds/tommyhash.c b/tommyds/tommyhash.c similarity index 100% rename from src/tommyds/tommyhash.c rename to tommyds/tommyhash.c diff --git a/src/tommyds/tommyhash.h b/tommyds/tommyhash.h similarity index 100% rename from src/tommyds/tommyhash.h rename to tommyds/tommyhash.h diff --git a/src/tommyds/tommyhashdyn.c b/tommyds/tommyhashdyn.c similarity index 100% rename from src/tommyds/tommyhashdyn.c rename to tommyds/tommyhashdyn.c diff --git a/src/tommyds/tommyhashdyn.h b/tommyds/tommyhashdyn.h similarity index 100% rename from src/tommyds/tommyhashdyn.h rename to tommyds/tommyhashdyn.h diff --git a/src/tommyds/tommylist.c b/tommyds/tommylist.c similarity index 100% rename from src/tommyds/tommylist.c rename to tommyds/tommylist.c diff --git a/src/tommyds/tommylist.h b/tommyds/tommylist.h similarity index 100% rename from src/tommyds/tommylist.h rename to tommyds/tommylist.h diff --git a/src/tommyds/tommytypes.h b/tommyds/tommytypes.h similarity index 100% rename from src/tommyds/tommytypes.h rename to tommyds/tommytypes.h