diff --git a/Makefile.am b/Makefile.am index 5b58dc4d..af77d2ae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,12 +38,7 @@ AM_CPPFLAGS += \ $(LTDLINCL) \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/compat \ - -I$(top_srcdir)/src/libmpg123 \ - -I$(top_srcdir)/src/libsyn123 \ - -I$(top_srcdir)/src/libout123 \ - -I$(top_builddir)/src/libmpg123 \ - -I$(top_builddir)/src/libsyn123 \ - -I$(top_builddir)/src/libout123 + -I$(top_srcdir)/src/common # Include Make modules from subdirectories. include src/Makemodule.am @@ -53,15 +48,18 @@ if NEED_MAINLIB pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = -# Stuff from this directory. +# Pkg-config files and library includes. if BUILD_LIBMPG123 pkgconfig_DATA += libmpg123.pc +AM_CPPFLAGS += -I$(top_srcdir)/src/libmpg123 endif if BUILD_LIBOUT123 pkgconfig_DATA += libout123.pc +AM_CPPFLAGS += -I$(top_srcdir)/src/libout123 endif if BUILD_LIBSYN123 pkgconfig_DATA += libsyn123.pc +AM_CPPFLAGS += -I$(top_srcdir)/src/libsyn123 endif endif diff --git a/NEWS b/NEWS index 01ee7231..c353896f 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 1.32.4 ------ - build: +-- Reorganize shared headers. -- Group C99 feature checks and make several standard headers mandatory. -- Get rid of SIZE_P, OFF_P and friends. diff --git a/ports/cmake/src/CMakeLists.txt b/ports/cmake/src/CMakeLists.txt index 97220171..bc65c53e 100644 --- a/ports/cmake/src/CMakeLists.txt +++ b/ports/cmake/src/CMakeLists.txt @@ -342,6 +342,7 @@ include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/" "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/compat" + "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/common" "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libsyn123" "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libout123" "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/libmpg123") diff --git a/src/Makemodule.am b/src/Makemodule.am index b894a8aa..48632b57 100644 --- a/src/Makemodule.am +++ b/src/Makemodule.am @@ -2,6 +2,7 @@ include src/tests/Makemodule.am include src/compat/Makemodule.am +include src/common/Makemodule.am if NEED_LIB include src/libout123/Makemodule.am if NEED_MAINLIB diff --git a/src/common/Makemodule.am b/src/common/Makemodule.am new file mode 100644 index 00000000..4a31b96b --- /dev/null +++ b/src/common/Makemodule.am @@ -0,0 +1,7 @@ +# common headers shared between subprojects +EXTRA_DIST += \ + src/common/abi_align.h \ + src/common/debug.h \ + src/common/sample.h \ + src/common/swap_bytes_impl.h \ + src/common/true.h diff --git a/src/libmpg123/abi_align.h b/src/common/abi_align.h similarity index 100% rename from src/libmpg123/abi_align.h rename to src/common/abi_align.h diff --git a/src/libmpg123/debug.h b/src/common/debug.h similarity index 100% rename from src/libmpg123/debug.h rename to src/common/debug.h diff --git a/src/libmpg123/sample.h b/src/common/sample.h similarity index 100% rename from src/libmpg123/sample.h rename to src/common/sample.h diff --git a/src/libmpg123/swap_bytes_impl.h b/src/common/swap_bytes_impl.h similarity index 100% rename from src/libmpg123/swap_bytes_impl.h rename to src/common/swap_bytes_impl.h diff --git a/src/libmpg123/true.h b/src/common/true.h similarity index 100% rename from src/libmpg123/true.h rename to src/common/true.h diff --git a/src/libmpg123/Makemodule.am b/src/libmpg123/Makemodule.am index 48e3820f..2557154a 100644 --- a/src/libmpg123/Makemodule.am +++ b/src/libmpg123/Makemodule.am @@ -45,12 +45,9 @@ src_libmpg123_libmpg123_la_SOURCES = \ src/libmpg123/parse.h \ src/libmpg123/frame.c \ src/libmpg123/format.c \ - src/libmpg123/swap_bytes_impl.h \ src/libmpg123/frame.h \ src/libmpg123/reader.h \ - src/libmpg123/debug.h \ src/libmpg123/decode.h \ - src/libmpg123/sample.h \ src/libmpg123/dct64.c \ src/libmpg123/synth.h \ src/libmpg123/synth_mono.h \ @@ -63,7 +60,6 @@ src_libmpg123_libmpg123_la_SOURCES = \ src/libmpg123/icy2utf8.h \ src/libmpg123/id3.h \ src/libmpg123/id3.c \ - src/libmpg123/true.h \ src/libmpg123/getbits.h \ src/libmpg123/optimize.h \ src/libmpg123/optimize.c \ @@ -74,7 +70,6 @@ src_libmpg123_libmpg123_la_SOURCES = \ src/libmpg123/libmpg123.c \ src/libmpg123/gapless.h \ src/libmpg123/mpg123lib_intern.h \ - src/libmpg123/abi_align.h \ src/libmpg123/mangle.h \ src/libmpg123/getcpuflags.h \ src/libmpg123/index.h \