summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--src/post/deinterlace/plugins/Makefile.am40
-rw-r--r--src/post/goom/Makefile.am42
-rw-r--r--src/post/planar/Makefile.am22
4 files changed, 56 insertions, 60 deletions
diff --git a/configure.ac b/configure.ac
index 10fd9116b..4b012a868 100644
--- a/configure.ac
+++ b/configure.ac
@@ -761,6 +761,10 @@ if test "x$has_vis" = "xyes"; then
fi
AM_CONDITIONAL([ENABLE_VIS], test x"$has_vis" = x"yes")
+O1_CFLAGS="$O1_CFLAGS $optflags $cpuflags"
+O2_CFLAGS="$O2_CFLAGS $optflags $cpuflags"
+O3_CFLAGS="$O3_CFLAGS $optflags $cpuflags"
+
dnl Allow turning off/on of optimizations. By default, optimizations are
dnl enabled if --enable-debug is not specified. Even with --enable-debug,
dnl optimizations can be enabled by explicitly specifying --enable-optimizations
@@ -769,14 +773,8 @@ AC_ARG_ENABLE([optimizations],
[], [test x"$enable_debug" != x"no" && enable_optimizations="no"])
AM_CONDITIONAL([DISABLE_OPTIMIZATIONS], [test x"$enable_optimizations" = x"no"])
if test x"$enable_optimizations" = x"no"; then
- O1_CFLAGS="$O0_CLFAGS"
- O2_CFLAGS="$O0_CFLAGS"
- O3_CFLAGS="$O0_CFLAGS"
+ DEFAULT_OCFLAGS='$(O0_CFLAGS)'
else
- O1_CFLAGS="$O1_CFLAGS $optflags $cpuflags"
- O2_CFLAGS="$O2_CFLAGS $optflags $cpuflags"
- O3_CFLAGS="$O3_CFLAGS $optflags $cpuflags"
-
dnl For multi-pass compilation: never when cross-compiling
if test x"$cross_compiling" != x"yes"; then
if test x"$GCC" = x"yes"; then
diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am
index c04c3b7b2..4185b5706 100644
--- a/src/post/deinterlace/plugins/Makefile.am
+++ b/src/post/deinterlace/plugins/Makefile.am
@@ -17,6 +17,11 @@ include $(top_srcdir)/misc/Makefile.common
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# libpostproc is here so we can use their nice mangle.h
+AM_CFLAGS = $(VISIBILITY_FLAG)
+AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \
+ -I$(top_srcdir)/contrib/ffmpeg/libpostproc
+
EXTRA_DIST = greedy2frame_template.c greedyh.asm \
tomsmocomp/SearchLoop0A.inc tomsmocomp/SearchLoopBottom.inc \
tomsmocomp/SearchLoopEdgeA.inc tomsmocomp/SearchLoopEdgeA8.inc \
@@ -30,29 +35,24 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \
noinst_HEADERS = plugins.h greedyhmacros.h
-# libpostproc is here so we can use their nice mangle.h
-AM_CFLAGS = $(VISIBILITY_FLAG)
-AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \
- -I$(top_srcdir)/contrib/ffmpeg/libpostproc
+if DEBUG_BUILD
+debug_sources = greedy2frame.c
+nodebug_sources =
+else
+debug_sources =
+nodebug_sources = greedy2frame.c
+endif
# per-object CFLAGS -- drop optimization on kdetv_greedyh.c so that gcc
# doesn't run out of general registers trying to compile it.
noinst_LTLIBRARIES = libdeinterlacepluginsO1.la libdeinterlaceplugins.la
-
-libdeinterlacepluginsO1_la_SOURCES = kdetv_greedyh.c
-libdeinterlacepluginsO1_la_CFLAGS = $(AM_CFLAGS) $(O1_CFLAGS)
-
-libdeinterlaceplugins_la_SOURCES = \
- double.c \
- greedy.c \
- linear.c \
- linearblend.c \
- vfir.c \
- weave.c \
- greedy2frame.c \
- scalerbob.c \
- kdetv_tomsmocomp.c
-libdeinterlaceplugins_la_LIBADD = libdeinterlacepluginsO1.la $(XINE_LIB)
-libdeinterlaceplugins_la_CFLAGS = $(AM_CFLAGS) $(DEFAULT_OCFLAGS)
+libdeinterlacepluginsO1_la_SOURCES = kdetv_greedyh.c $(debug_sources)
+libdeinterlacepluginsO1_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS)
+
+libdeinterlaceplugins_la_SOURCES = double.c greedy.c linear.c linearblend.c \
+ vfir.c weave.c scalerbob.c kdetv_tomsmocomp.c \
+ $(nodebug_sources)
+libdeinterlaceplugins_la_LIBADD = $(XINE_LIB) libdeinterlacepluginsO1.la
+libdeinterlaceplugins_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
libdeinterlaceplugins_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags)
diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am
index eeed54697..40636736c 100644
--- a/src/post/goom/Makefile.am
+++ b/src/post/goom/Makefile.am
@@ -1,20 +1,6 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG)
-AM_LDFLAGS = $(xineplug_ldflags)
-
-EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \
- gfontrle.c mathtools.c
-
-## -fomit-frame-pointer segfaults here
-## Use -O2 if -Os is stripped or x86 does not build
-#CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-Os/-O2/g'`
-#CFLAGS = `echo @CFLAGS@ | sed -e 's/-Os/-O2/g'`
-
-# Avoid errors with -O0
-#xineplug_post_goom_la-xmmx.o xineplug_post_goom_la-xmmx.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-
-xinepost_LTLIBRARIES = xineplug_post_goom.la
+AM_CFLAGS = $(VISIBILITY_FLAG)
## doesn't work
#if ARCH_PPC
@@ -22,12 +8,8 @@ xinepost_LTLIBRARIES = xineplug_post_goom.la
#AM_CPPFLAGS = -DCPU_POWERPC
#endif
-xineplug_post_goom_la_SOURCES = mmx.c xmmx.c xine_goom.c \
- config_param.c convolve_fx.c cpu_info.c drawmethods.c filters.c flying_stars_fx.c \
- gfontlib.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c goomsl_heap.c \
- goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c \
- plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c
-xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) -lm
+EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \
+ gfontrle.c mathtools.c
noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \
goom_config.h goom_config_param.h goom_filters.h goom_fx.h goom_graphic.h \
@@ -35,3 +17,21 @@ noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \
goomsl_heap.h goomsl_private.h goomsl_yacc.h ifs.h lines.h mathtools.h mmx.h \
ppc_drawings.h ppc_zoom_ultimate.h sound_tester.h surf3d.h tentacle3d.h v3d.h \
motif_goom1.h motif_goom2.h
+
+noinst_LTLIBRARIES = libpost_goom_asm.la
+libpost_goom_asm_la_SOURCES = xmmx.c
+if DEBUG_BUILD
+libpost_goom_asm_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS)
+else
+libpost_goom_asm_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
+endif
+
+xinepost_LTLIBRARIES = xineplug_post_goom.la
+xineplug_post_goom_la_SOURCES = mmx.c xine_goom.c \
+ config_param.c convolve_fx.c cpu_info.c drawmethods.c filters.c flying_stars_fx.c \
+ gfontlib.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c goomsl_heap.c \
+ goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c \
+ plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c
+xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) -lm $(noinst_LTLIBRARIES)
+xineplug_post_goom_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
+xineplug_post_goom_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags)
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am
index a4e8cb825..5d6da97cd 100644
--- a/src/post/planar/Makefile.am
+++ b/src/post/planar/Makefile.am
@@ -1,14 +1,12 @@
include $(top_srcdir)/misc/Makefile.common
-# -fomit-frame-pointer is always needed. it might cause debug to not
-# work, but at least it compiles.
-AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(ff_cflags) -fomit-frame-pointer
+AM_CFLAGS = $(VISIBILITY_FLAG) $(ff_cflags)
AM_CPPFLAGS =
-AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)
+AM_LDFLAGS =
if WITH_EXTERNAL_FFMPEG
postproc_lib = $(FFMPEG_POSTPROC_LIBS)
-ff_cflags = $(FFMPEG_POSTPROC_CFLAGS)
+ff_cflags = $(FFMPEG_POSTPROC_CFLAGS)
else
AM_CPPFLAGS += -I$(top_srcdir)/contrib/ffmpeg/libpostproc
postproc_lib = $(top_builddir)/contrib/ffmpeg/libpostproc/libpostproc.a \
@@ -20,13 +18,13 @@ $(top_builddir)/contrib/ffmpeg/libavutil/libavutil.a:
$(MAKE) -C $(top_builddir)/contrib ffmpeg/libavutil/libavutil.a
endif
-# Avoid errors with -O0
-#xineplug_post_planar_la-eq.o xineplug_post_planar_la-eq.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-#xineplug_post_planar_la-eq2.o xineplug_post_planar_la-eq2.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
-#xineplug_post_planar_la-noise.o xineplug_post_planar_la-noise.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'`
+noinst_LTLIBRARIES = libpost_planar_asm.la
+libpost_planar_asm_la_SOURCES = eq.c eq2.c noise.c
+libpost_planar_asm_la_CFLAGS = $(O1_CFLAGS) -fomit-frame-pointer $(AM_CFLAGS)
xinepost_LTLIBRARIES = xineplug_post_planar.la
-
xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \
- denoise3d.c eq.c eq2.c unsharp.c pp.c noise.c
-xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS)
+ denoise3d.c unsharp.c pp.c
+xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS) $(noinst_LTLIBRARIES)
+xineplug_post_planar_la_CFLAGS = $(DEFAULT_OCFLAGS) $(AM_CFLAGS)
+xineplug_post_planar_la_LDFLAGS = $(AM_LDFLAGS) $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS)