diff --git a/Makefile.am b/Makefile.am index d4c545a..57e88bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = libx52 cli util libusbx52 test +SUBDIRS = lib utils # Extra files that need to be in the distribution EXTRA_DIST = README.md LICENSE diff --git a/configure.ac b/configure.ac index d62eb6e..0c9df83 100644 --- a/configure.ac +++ b/configure.ac @@ -24,15 +24,16 @@ AS_IF([test "x${have_libusb}" != xyes], [ ]) AC_SUBST([X52_PKG_VERSION], [0.1]) -AC_SUBST([X52_INCLUDE], ["-I \$(top_srcdir)/libx52"]) -AC_SUBST([X52_CORE_LIB], [../libx52/libx52.la]) +AC_SUBST([X52_INCLUDE], ["-I \$(top_srcdir)/lib/libx52"]) AC_CONFIG_FILES([ Makefile - libx52/Makefile - libusbx52/Makefile - cli/Makefile - util/Makefile - test/Makefile + lib/Makefile + lib/libx52/Makefile + lib/libusbx52/Makefile + lib/libx52util/Makefile + utils/Makefile + utils/cli/Makefile + utils/test/Makefile ]) AC_OUTPUT diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..891dcef --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = libx52 libx52util libusbx52 + diff --git a/libusbx52/Makefile.am b/lib/libusbx52/Makefile.am similarity index 100% rename from libusbx52/Makefile.am rename to lib/libusbx52/Makefile.am diff --git a/libusbx52/README.md b/lib/libusbx52/README.md similarity index 100% rename from libusbx52/README.md rename to lib/libusbx52/README.md diff --git a/libusbx52/libusbx52.h b/lib/libusbx52/libusbx52.h similarity index 100% rename from libusbx52/libusbx52.h rename to lib/libusbx52/libusbx52.h diff --git a/libusbx52/usb_x52_stub.c b/lib/libusbx52/usb_x52_stub.c similarity index 100% rename from libusbx52/usb_x52_stub.c rename to lib/libusbx52/usb_x52_stub.c diff --git a/libusbx52/util/create_device_list.c b/lib/libusbx52/util/create_device_list.c similarity index 100% rename from libusbx52/util/create_device_list.c rename to lib/libusbx52/util/create_device_list.c diff --git a/libusbx52/util/log_actions.c b/lib/libusbx52/util/log_actions.c similarity index 100% rename from libusbx52/util/log_actions.c rename to lib/libusbx52/util/log_actions.c diff --git a/libx52/Makefile.am b/lib/libx52/Makefile.am similarity index 100% rename from libx52/Makefile.am rename to lib/libx52/Makefile.am diff --git a/libx52/README.md b/lib/libx52/README.md similarity index 100% rename from libx52/README.md rename to lib/libx52/README.md diff --git a/libx52/libx52.h b/lib/libx52/libx52.h similarity index 100% rename from libx52/libx52.h rename to lib/libx52/libx52.h diff --git a/libx52/x52_commands.h b/lib/libx52/x52_commands.h similarity index 100% rename from libx52/x52_commands.h rename to lib/libx52/x52_commands.h diff --git a/libx52/x52_common.h b/lib/libx52/x52_common.h similarity index 100% rename from libx52/x52_common.h rename to lib/libx52/x52_common.h diff --git a/libx52/x52_control.c b/lib/libx52/x52_control.c similarity index 100% rename from libx52/x52_control.c rename to lib/libx52/x52_control.c diff --git a/libx52/x52_core.c b/lib/libx52/x52_core.c similarity index 100% rename from libx52/x52_core.c rename to lib/libx52/x52_core.c diff --git a/libx52/x52_date_time.c b/lib/libx52/x52_date_time.c similarity index 100% rename from libx52/x52_date_time.c rename to lib/libx52/x52_date_time.c diff --git a/libx52/x52_mfd_led.c b/lib/libx52/x52_mfd_led.c similarity index 100% rename from libx52/x52_mfd_led.c rename to lib/libx52/x52_mfd_led.c diff --git a/util/Makefile.am b/lib/libx52util/Makefile.am similarity index 100% rename from util/Makefile.am rename to lib/libx52util/Makefile.am diff --git a/util/libx52util.h b/lib/libx52util/libx52util.h similarity index 100% rename from util/libx52util.h rename to lib/libx52util/libx52util.h diff --git a/util/x52_char_map.cfg b/lib/libx52util/x52_char_map.cfg similarity index 100% rename from util/x52_char_map.cfg rename to lib/libx52util/x52_char_map.cfg diff --git a/util/x52_char_map.h b/lib/libx52util/x52_char_map.h similarity index 100% rename from util/x52_char_map.h rename to lib/libx52util/x52_char_map.h diff --git a/util/x52_char_map_gen.py b/lib/libx52util/x52_char_map_gen.py similarity index 100% rename from util/x52_char_map_gen.py rename to lib/libx52util/x52_char_map_gen.py diff --git a/util/x52_char_map_lookup.c b/lib/libx52util/x52_char_map_lookup.c similarity index 100% rename from util/x52_char_map_lookup.c rename to lib/libx52util/x52_char_map_lookup.c diff --git a/utils/Makefile.am b/utils/Makefile.am new file mode 100644 index 0000000..a5816ab --- /dev/null +++ b/utils/Makefile.am @@ -0,0 +1,2 @@ +SUBDIRS = cli test + diff --git a/cli/Makefile.am b/utils/cli/Makefile.am similarity index 83% rename from cli/Makefile.am rename to utils/cli/Makefile.am index 19e7592..7bb6bb3 100644 --- a/cli/Makefile.am +++ b/utils/cli/Makefile.am @@ -5,7 +5,7 @@ bin_PROGRAMS = x52cli # Command line utility that front ends the core library x52cli_SOURCES = x52_cli.c x52cli_CFLAGS = @X52_INCLUDE@ -x52cli_LDADD = @X52_CORE_LIB@ +x52cli_LDADD = ../../lib/libx52/libx52.la # Man pages for CLI utility dist_man1_MANS = x52cli.man diff --git a/cli/x52_cli.c b/utils/cli/x52_cli.c similarity index 100% rename from cli/x52_cli.c rename to utils/cli/x52_cli.c diff --git a/cli/x52cli.man b/utils/cli/x52cli.man similarity index 100% rename from cli/x52cli.man rename to utils/cli/x52cli.man diff --git a/test/Makefile.am b/utils/test/Makefile.am similarity index 87% rename from test/Makefile.am rename to utils/test/Makefile.am index 22b8423..ee8dc83 100644 --- a/test/Makefile.am +++ b/utils/test/Makefile.am @@ -5,7 +5,7 @@ bin_PROGRAMS = x52test # Test utility that exercises all the library functions x52test_SOURCES = x52_test.c x52_test_mfd.c x52_test_led.c x52_test_clock.c x52test_CFLAGS = @X52_INCLUDE@ -x52test_LDADD = @X52_CORE_LIB@ +x52test_LDADD = ../../lib/libx52/libx52.la # Extra files that need to be in the distribution EXTRA_DIST = x52_test_common.h diff --git a/test/x52_test.c b/utils/test/x52_test.c similarity index 100% rename from test/x52_test.c rename to utils/test/x52_test.c diff --git a/test/x52_test_clock.c b/utils/test/x52_test_clock.c similarity index 100% rename from test/x52_test_clock.c rename to utils/test/x52_test_clock.c diff --git a/test/x52_test_common.h b/utils/test/x52_test_common.h similarity index 100% rename from test/x52_test_common.h rename to utils/test/x52_test_common.h diff --git a/test/x52_test_led.c b/utils/test/x52_test_led.c similarity index 100% rename from test/x52_test_led.c rename to utils/test/x52_test_led.c diff --git a/test/x52_test_mfd.c b/utils/test/x52_test_mfd.c similarity index 100% rename from test/x52_test_mfd.c rename to utils/test/x52_test_mfd.c