diff options
author | Oneric <oneric@oneric.stub> | 2022-04-04 23:41:23 +0200 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2022-05-12 21:13:00 +0200 |
commit | a2b39cde4ecb74d5e6fccab4a5f7d8ad52b2b1a4 (patch) | |
tree | f72dab3f4477d684ccb0839ed07aaf141f7f9eb6 | |
parent | 1af6240c5d1e499326146e0b88c987e626b13c23 (diff) | |
download | libass-a2b39cde4ecb74d5e6fccab4a5f7d8ad52b2b1a4.tar.bz2 libass-a2b39cde4ecb74d5e6fccab4a5f7d8ad52b2b1a4.tar.xz |
Switch to non-recursive Makefile
Non-recursive Makefiles allow better and more robust automatic
dependency resolution and higher parallelism for shorter build-times.
This change keeps all locations of the non-installed targets unchanged
for minimal firction. Calling make from subdirectories no longer works,
but instead the specific build targets can be invoked directly from the
toplevel.
If we bumped the required Automake version to 1.13+, the library
fragment could use %reldir% or %D% to be unaffected by potential
future directory moves, but it is unlikely we'll ever change the
location or name of the libass directory.
-rw-r--r-- | Makefile.am | 22 | ||||
-rw-r--r-- | Makefile_util.am | 23 | ||||
-rw-r--r-- | compare/Makefile.am | 7 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | libass/Makefile.am | 60 | ||||
-rw-r--r-- | libass/Makefile_library.am | 62 | ||||
-rw-r--r-- | profile/Makefile.am | 7 | ||||
-rw-r--r-- | test/Makefile.am | 7 |
8 files changed, 96 insertions, 96 deletions
diff --git a/Makefile.am b/Makefile.am index 3506e98..0c1a5b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,20 +1,16 @@ ACLOCAL_AMFLAGS = -I m4 +AM_CFLAGS = -std=gnu99 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter \ + -Werror-implicit-function-declaration -Wstrict-prototypes \ + -Wpointer-arith -Wredundant-decls -Wno-missing-field-initializers\ + -D_GNU_SOURCE + EXTRA_DIST = libass.pc.in Changelog MAINTAINERS ltnasm.sh pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libass.pc -if ENABLE_TEST - test = test -endif - -if ENABLE_COMPARE - compare = compare -endif - -if ENABLE_PROFILE - profile = profile -endif - -SUBDIRS = libass $(test) $(compare) $(profile) +lib_LTLIBRARIES = +noinst_PROGRAMS = +include libass/Makefile_library.am +include Makefile_util.am diff --git a/Makefile_util.am b/Makefile_util.am new file mode 100644 index 0000000..b150de0 --- /dev/null +++ b/Makefile_util.am @@ -0,0 +1,23 @@ +if ENABLE_TEST +noinst_PROGRAMS += test/test +endif +test_test_SOURCES = test/test.c +test_test_CPPFLAGS = -I$(top_srcdir)/libass +test_test_LDADD = libass/libass.la +test_test_LDFLAGS = $(AM_LDFLAGS) $(LIBPNG_LIBS) -static + +if ENABLE_PROFILE +noinst_PROGRAMS += profile/profile +endif +profile_profile_SOURCES = profile/profile.c +profile_profile_CPPFLAGS = -I$(top_srcdir)/libass +profile_profile_LDADD = libass/libass.la +profile_profile_LDFLAGS = $(AM_LDFLAGS) -static + +if ENABLE_COMPARE +noinst_PROGRAMS += compare/compare +endif +compare_compare_SOURCES = compare/image.h compare/image.c compare/compare.c +compare_compare_CPPFLAGS = -I$(top_srcdir)/libass +compare_compare_LDADD = libass/libass.la +compare_compare_LDFLAGS = $(AM_LDFLAGS) $(LIBPNG_LIBS) -static diff --git a/compare/Makefile.am b/compare/Makefile.am deleted file mode 100644 index 54645c1..0000000 --- a/compare/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -AM_CFLAGS = -Wall - -noinst_PROGRAMS = compare -compare_SOURCES = image.h image.c compare.c -compare_CPPFLAGS = -I$(top_srcdir)/libass -compare_LDADD = $(top_builddir)/libass/.libs/libass.a -compare_LDFLAGS = $(AM_LDFLAGS) $(LIBPNG_LIBS) -static diff --git a/configure.ac b/configure.ac index afac0ef..e785328 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_INIT(libass, 0.16.0) -AM_INIT_AUTOMAKE([foreign]) +AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_CONFIG_MACRO_DIR([m4]) # Disable Fortran checks define([AC_LIBTOOL_LANG_F77_CONFIG], [:]) @@ -367,5 +367,5 @@ AC_DEFINE_UNQUOTED([CONFIG_SOURCEVERSION], ["$srcversion_string"], ## Setup output beautifier. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) -AC_CONFIG_FILES([Makefile libass/Makefile test/Makefile compare/Makefile profile/Makefile libass.pc]) +AC_CONFIG_FILES([Makefile libass.pc]) AC_OUTPUT diff --git a/libass/Makefile.am b/libass/Makefile.am deleted file mode 100644 index 50a779f..0000000 --- a/libass/Makefile.am +++ /dev/null @@ -1,60 +0,0 @@ -AM_CFLAGS = -std=gnu99 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter \ - -Werror-implicit-function-declaration -Wstrict-prototypes \ - -Wpointer-arith -Wredundant-decls -Wno-missing-field-initializers\ - -D_GNU_SOURCE - -LIBASS_LT_CURRENT = 10 -LIBASS_LT_REVISION = 4 -LIBASS_LT_AGE = 1 - -nasm_verbose = $(nasm_verbose_$(V)) -nasm_verbose_ = $(nasm_verbose_$(AM_DEFAULT_VERBOSITY)) -nasm_verbose_0 = @echo " NASM " $@; - -.asm.lo: - $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(srcdir)/ -Dprivate_prefix=ass -o $@ $< - -SRC_X86 = x86/rasterizer.asm x86/blend_bitmaps.asm x86/be_blur.asm x86/blur.asm x86/cpuid.asm \ - x86/cpuid.h - -SRC_FONTCONFIG = ass_fontconfig.c ass_fontconfig.h -SRC_DIRECTWRITE = ass_directwrite.c ass_directwrite.h ass_directwrite_info_template.h dwrite_c.h -SRC_CORETEXT = ass_coretext.c ass_coretext.h - -lib_LTLIBRARIES = libass.la -libass_la_SOURCES = ass.h ass.c ass_types.h ass_utils.h ass_utils.c \ - ass_compat.h ass_string.h ass_string.c ass_strtod.c \ - ass_filesystem.h ass_filesystem.c ass_library.h ass_library.c \ - ass_cache.h ass_cache.c ass_cache_template.h \ - ass_font.h ass_font.c ass_fontselect.h ass_fontselect.c \ - ass_render.h ass_render.c ass_render_api.c \ - ass_parse.h ass_parse.c ass_priv.h ass_shaper.h ass_shaper.c \ - ass_outline.h ass_outline.c ass_drawing.h ass_drawing.c \ - ass_rasterizer.h ass_rasterizer.c ass_rasterizer_c.c \ - ass_bitmap.h ass_bitmap.c ass_blur.c ass_func_template.h wyhash.h - -libass_la_LDFLAGS = -no-undefined -version-info $(LIBASS_LT_CURRENT):$(LIBASS_LT_REVISION):$(LIBASS_LT_AGE) -libass_la_LDFLAGS += -export-symbols $(srcdir)/libass.sym - -if FONTCONFIG -libass_la_SOURCES += $(SRC_FONTCONFIG) -endif - -if DIRECTWRITE -libass_la_SOURCES += $(SRC_DIRECTWRITE) -endif - -if CORETEXT -libass_la_SOURCES += $(SRC_CORETEXT) -endif - -if ASM -if X86 -libass_la_SOURCES += $(SRC_X86) -endif -endif - -assheadersdir = $(includedir)/ass -dist_assheaders_HEADERS = ass.h ass_types.h - -EXTRA_DIST = libass.sym x86/x86inc.asm x86/utils.asm diff --git a/libass/Makefile_library.am b/libass/Makefile_library.am new file mode 100644 index 0000000..0323c25 --- /dev/null +++ b/libass/Makefile_library.am @@ -0,0 +1,62 @@ +LIBASS_LT_CURRENT = 10 +LIBASS_LT_REVISION = 4 +LIBASS_LT_AGE = 1 + +nasm_verbose = $(nasm_verbose_$(V)) +nasm_verbose_ = $(nasm_verbose_$(AM_DEFAULT_VERBOSITY)) +nasm_verbose_0 = @echo " NASM " $@; + +.asm.lo: + $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(top_srcdir)/libass/ -Dprivate_prefix=ass -o $@ $< + + +SRC_X86 = libass/x86/rasterizer.asm libass/x86/blend_bitmaps.asm libass/x86/be_blur.asm \ + libass/x86/blur.asm libass/x86/cpuid.asm libass/x86/cpuid.h + +SRC_FONTCONFIG = libass/ass_fontconfig.c libass/ass_fontconfig.h +SRC_DIRECTWRITE = libass/ass_directwrite.c libass/ass_directwrite.h \ + libass/ass_directwrite_info_template.h libass/dwrite_c.h +SRC_CORETEXT = libass/ass_coretext.c libass/ass_coretext.h + +lib_LTLIBRARIES += libass/libass.la +libass_libass_la_SOURCES = \ + libass/ass.h libass/ass.c libass/ass_bitmap.c libass/ass_bitmap.h \ + libass/ass_blur.c libass/ass_cache.c libass/ass_cache.h \ + libass/ass_cache_template.h libass/ass_compat.h libass/ass_drawing.c \ + libass/ass_drawing.h libass/ass_filesystem.c libass/ass_filesystem.h \ + libass/ass_font.c libass/ass_font.h libass/ass_fontselect.c \ + libass/ass_fontselect.h libass/ass_func_template.h \ + libass/ass_library.c libass/ass_library.h libass/ass_outline.c \ + libass/ass_outline.h libass/ass_parse.c libass/ass_parse.h \ + libass/ass_priv.h libass/ass_rasterizer.c libass/ass_rasterizer_c.c \ + libass/ass_rasterizer.h libass/ass_render_api.c libass/ass_render.c \ + libass/ass_render.h libass/ass_shaper.c libass/ass_shaper.h \ + libass/ass_string.c libass/ass_string.h libass/ass_strtod.c \ + libass/ass_types.h libass/ass_utils.c libass/ass_utils.h \ + libass/wyhash.h + +libass_libass_la_LDFLAGS = -no-undefined -version-info $(LIBASS_LT_CURRENT):$(LIBASS_LT_REVISION):$(LIBASS_LT_AGE) +libass_libass_la_LDFLAGS += -export-symbols $(top_srcdir)/libass/libass.sym + +if FONTCONFIG +libass_libass_la_SOURCES += $(SRC_FONTCONFIG) +endif + +if DIRECTWRITE +libass_libass_la_SOURCES += $(SRC_DIRECTWRITE) +endif + +if CORETEXT +libass_libass_la_SOURCES += $(SRC_CORETEXT) +endif + +if ASM +if X86 +libass_libass_la_SOURCES += $(SRC_X86) +endif +endif + +assheadersdir = $(includedir)/ass +dist_assheaders_HEADERS = libass/ass.h libass/ass_types.h + +EXTRA_DIST += libass/libass.sym libass/x86/x86inc.asm libass/x86/utils.asm diff --git a/profile/Makefile.am b/profile/Makefile.am deleted file mode 100644 index f970636..0000000 --- a/profile/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -AM_CFLAGS = -Wall - -noinst_PROGRAMS = profile -profile_SOURCES = profile.c -profile_CPPFLAGS = -I$(top_srcdir)/libass -profile_LDADD = $(top_builddir)/libass/.libs/libass.a -profile_LDFLAGS = $(AM_LDFLAGS) -static diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index 54a179a..0000000 --- a/test/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -AM_CFLAGS = -Wall - -noinst_PROGRAMS = test -test_SOURCES = test.c -test_CPPFLAGS = -I$(top_srcdir)/libass -test_LDADD = $(top_builddir)/libass/.libs/libass.a -test_LDFLAGS = $(AM_LDFLAGS) $(LIBPNG_LIBS) -static |