From: Pierre Ossman Date: Mon, 16 Mar 2009 13:34:18 +0000 (+0000) Subject: Work around subdirectory bug in older automake. X-Git-Tag: v0.0.90~110 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39170cf556874949317835049ccc6ae92ba1d6f9;p=tigervnc.git Work around subdirectory bug in older automake. Older versions of automake doesn't properly support no-recursive make. Reimplement the build system by having a local Makefile.am in the simd/ directory. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3679 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/common/jpeg/Makefile.am b/common/jpeg/Makefile.am index 7f67542e..1d868b7b 100644 --- a/common/jpeg/Makefile.am +++ b/common/jpeg/Makefile.am @@ -15,30 +15,8 @@ libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \ if WITH_SIMD -BUILT_SOURCES = simd/jsimdcfg.inc - -EXTRA_DIST = nasm_lt.sh - -libjpeg_la_SOURCES += simd/jsimd.h simd/jsimdcfg.inc.h \ - simd/jsimdext.inc simd/jcolsamp.inc simd/jdct.inc \ - simd/jsimdcpu.asm \ - simd/jccolmmx.asm simd/jdcolmmx.asm \ - simd/jcsammmx.asm simd/jdsammmx.asm simd/jdmermmx.asm \ - simd/jcqntmmx.asm simd/jfmmxfst.asm simd/jfmmxint.asm \ - simd/jimmxred.asm simd/jimmxint.asm simd/jimmxfst.asm \ - simd/jcqnt3dn.asm simd/jf3dnflt.asm simd/ji3dnflt.asm \ - simd/jcqntsse.asm simd/jfsseflt.asm simd/jisseflt.asm \ - simd/jccolss2.asm simd/jdcolss2.asm \ - simd/jcsamss2.asm simd/jdsamss2.asm simd/jdmerss2.asm \ - simd/jcqnts2i.asm simd/jfss2fst.asm simd/jfss2int.asm \ - simd/jiss2red.asm simd/jiss2int.asm simd/jiss2fst.asm \ - simd/jcqnts2f.asm simd/jiss2flt.asm +SUBDIRS = simd +libjpeg_la_LIBADD = simd/libsimd.la endif -.asm.lo: - $(LIBTOOL) --mode=compile --tag NASM ./nasm_lt.sh $(NASM) $(NAFLAGS) $< -o $@ - -simd/jsimdcfg.inc: simd/jsimdcfg.inc.h jpeglib.h jconfig.h jmorecfg.h - $(CPP) $< | grep ^[\;%] | sed 's%_cpp_protection_%%' > $@ - diff --git a/common/jpeg/configure.ac b/common/jpeg/configure.ac index ea03c740..8c23a501 100644 --- a/common/jpeg/configure.ac +++ b/common/jpeg/configure.ac @@ -107,5 +107,5 @@ AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"]) # jconfig.h is a minimal version that allows this package to be built AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([jconfig.h]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile simd/Makefile]) AC_OUTPUT diff --git a/common/jpeg/nasm_lt.sh b/common/jpeg/nasm_lt.sh deleted file mode 100755 index ef5a591e..00000000 --- a/common/jpeg/nasm_lt.sh +++ /dev/null @@ -1,57 +0,0 @@ -#! /bin/sh -command="" -infile="" -o_opt=no -pic=no -while [ $# -gt 0 ]; do - case "$1" in - -DPIC|-fPIC|-fpic) - if [ "$pic" != "yes" ] ; then - command="$command -DPIC" - pic=yes - fi - ;; - -f|-fbin|-faout|-faoutb|-fcoff|-felf|-fas86| \ - -fobj|-fwin32|-frdf|-fieee|-fmacho) - # it's a file format specifier for nasm. - command="$command $1" - ;; - -f*) - # maybe a code-generation flag for gcc. - ;; - -[Ii]*) - incdir=`echo "$1" | sed 's/^-[Ii]//'` - if [ "x$incdir" = x -a "x$2" != x ] ; then - case "$2" in - -*) ;; - *) incdir="$2"; shift;; - esac - fi - if [ "x$incdir" != x ] ; then - # In the case of NASM, the trailing slash is necessary. - incdir=`echo "$incdir" | sed 's%/*$%/%'` - command="$command -I$incdir" - fi - ;; - -o*) - o_opt=yes - command="$command $1" - ;; - *.asm) - infile=$1 - command="$command $1" - ;; - *) - command="$command $1" - ;; - esac - shift -done -if [ "$o_opt" != yes ] ; then - # By default, NASM creates an output file - # in the same directory as the input file. - outfile="-o `echo $infile | sed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.o" - command="$command $outfile" -fi -echo $command -exec $command diff --git a/common/jpeg/simd/Makefile.am b/common/jpeg/simd/Makefile.am new file mode 100644 index 00000000..ea53fee4 --- /dev/null +++ b/common/jpeg/simd/Makefile.am @@ -0,0 +1,27 @@ +noinst_LTLIBRARIES = libsimd.la + +BUILT_SOURCES = jsimdcfg.inc + +EXTRA_DIST = nasm_lt.sh + +libsimd_la_SOURCES = jsimd.h jsimdcfg.inc.h \ + jsimdext.inc jcolsamp.inc jdct.inc \ + jsimdcpu.asm \ + jccolmmx.asm jdcolmmx.asm \ + jcsammmx.asm jdsammmx.asm jdmermmx.asm \ + jcqntmmx.asm jfmmxfst.asm jfmmxint.asm \ + jimmxred.asm jimmxint.asm jimmxfst.asm \ + jcqnt3dn.asm jf3dnflt.asm ji3dnflt.asm \ + jcqntsse.asm jfsseflt.asm jisseflt.asm \ + jccolss2.asm jdcolss2.asm \ + jcsamss2.asm jdsamss2.asm jdmerss2.asm \ + jcqnts2i.asm jfss2fst.asm jfss2int.asm \ + jiss2red.asm jiss2int.asm jiss2fst.asm \ + jcqnts2f.asm jiss2flt.asm + +.asm.lo: + $(LIBTOOL) --mode=compile --tag NASM ./nasm_lt.sh $(NASM) $(NAFLAGS) $< -o $@ + +jsimdcfg.inc: jsimdcfg.inc.h ../jpeglib.h ../jconfig.h ../jmorecfg.h + $(CPP) $< | grep ^[\;%] | sed 's%_cpp_protection_%%' > $@ + diff --git a/common/jpeg/simd/jccolmmx.asm b/common/jpeg/simd/jccolmmx.asm index 701a3271..340af00a 100644 --- a/common/jpeg/simd/jccolmmx.asm +++ b/common/jpeg/simd/jccolmmx.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jcolsamp.inc" +%include "jsimdext.inc" +%include "jcolsamp.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jccolss2.asm b/common/jpeg/simd/jccolss2.asm index 99473b65..c13f89e2 100644 --- a/common/jpeg/simd/jccolss2.asm +++ b/common/jpeg/simd/jccolss2.asm @@ -13,8 +13,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jcolsamp.inc" +%include "jsimdext.inc" +%include "jcolsamp.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jcqnt3dn.asm b/common/jpeg/simd/jcqnt3dn.asm index bc9b0273..194b7f9b 100644 --- a/common/jpeg/simd/jcqnt3dn.asm +++ b/common/jpeg/simd/jcqnt3dn.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jcqntmmx.asm b/common/jpeg/simd/jcqntmmx.asm index 6096eaa9..fa54902a 100644 --- a/common/jpeg/simd/jcqntmmx.asm +++ b/common/jpeg/simd/jcqntmmx.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jcqnts2f.asm b/common/jpeg/simd/jcqnts2f.asm index eef547a6..19c1d017 100644 --- a/common/jpeg/simd/jcqnts2f.asm +++ b/common/jpeg/simd/jcqnts2f.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jcqnts2i.asm b/common/jpeg/simd/jcqnts2i.asm index 7414e41a..404ae957 100644 --- a/common/jpeg/simd/jcqnts2i.asm +++ b/common/jpeg/simd/jcqnts2i.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jcqntsse.asm b/common/jpeg/simd/jcqntsse.asm index da7a3ff6..0f412d7e 100644 --- a/common/jpeg/simd/jcqntsse.asm +++ b/common/jpeg/simd/jcqntsse.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jcsammmx.asm b/common/jpeg/simd/jcsammmx.asm index 5de36372..982a6e0d 100644 --- a/common/jpeg/simd/jcsammmx.asm +++ b/common/jpeg/simd/jcsammmx.asm @@ -16,7 +16,7 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" +%include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jcsamss2.asm b/common/jpeg/simd/jcsamss2.asm index ec2df9ae..98e97da4 100644 --- a/common/jpeg/simd/jcsamss2.asm +++ b/common/jpeg/simd/jcsamss2.asm @@ -16,7 +16,7 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" +%include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jdcolmmx.asm b/common/jpeg/simd/jdcolmmx.asm index 33d50634..742c9ceb 100644 --- a/common/jpeg/simd/jdcolmmx.asm +++ b/common/jpeg/simd/jdcolmmx.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jcolsamp.inc" +%include "jsimdext.inc" +%include "jcolsamp.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jdcolss2.asm b/common/jpeg/simd/jdcolss2.asm index 3fd591b5..6f74cc63 100644 --- a/common/jpeg/simd/jdcolss2.asm +++ b/common/jpeg/simd/jdcolss2.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jcolsamp.inc" +%include "jsimdext.inc" +%include "jcolsamp.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jdmermmx.asm b/common/jpeg/simd/jdmermmx.asm index 8d82e40a..8ebe243d 100644 --- a/common/jpeg/simd/jdmermmx.asm +++ b/common/jpeg/simd/jdmermmx.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jcolsamp.inc" +%include "jsimdext.inc" +%include "jcolsamp.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jdmerss2.asm b/common/jpeg/simd/jdmerss2.asm index c0804ecd..8a7c68f0 100644 --- a/common/jpeg/simd/jdmerss2.asm +++ b/common/jpeg/simd/jdmerss2.asm @@ -16,8 +16,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jcolsamp.inc" +%include "jsimdext.inc" +%include "jcolsamp.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jdsammmx.asm b/common/jpeg/simd/jdsammmx.asm index f061ee93..e05d540e 100644 --- a/common/jpeg/simd/jdsammmx.asm +++ b/common/jpeg/simd/jdsammmx.asm @@ -16,7 +16,7 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" +%include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_CONST diff --git a/common/jpeg/simd/jdsamss2.asm b/common/jpeg/simd/jdsamss2.asm index bd967dba..7d787f1c 100644 --- a/common/jpeg/simd/jdsamss2.asm +++ b/common/jpeg/simd/jdsamss2.asm @@ -16,7 +16,7 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" +%include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_CONST diff --git a/common/jpeg/simd/jf3dnflt.asm b/common/jpeg/simd/jf3dnflt.asm index 30d33403..ed7e6a0b 100644 --- a/common/jpeg/simd/jf3dnflt.asm +++ b/common/jpeg/simd/jf3dnflt.asm @@ -20,8 +20,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_CONST diff --git a/common/jpeg/simd/jfmmxfst.asm b/common/jpeg/simd/jfmmxfst.asm index 46556b13..3511457d 100644 --- a/common/jpeg/simd/jfmmxfst.asm +++ b/common/jpeg/simd/jfmmxfst.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jfmmxint.asm b/common/jpeg/simd/jfmmxint.asm index 87935a97..e018e6bf 100644 --- a/common/jpeg/simd/jfmmxint.asm +++ b/common/jpeg/simd/jfmmxint.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jfss2fst.asm b/common/jpeg/simd/jfss2fst.asm index e42d2251..f0ad9621 100644 --- a/common/jpeg/simd/jfss2fst.asm +++ b/common/jpeg/simd/jfss2fst.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jfss2int.asm b/common/jpeg/simd/jfss2int.asm index 6e37497c..5338db32 100644 --- a/common/jpeg/simd/jfss2int.asm +++ b/common/jpeg/simd/jfss2int.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jfsseflt.asm b/common/jpeg/simd/jfsseflt.asm index 6469f3c4..9b8d04ce 100644 --- a/common/jpeg/simd/jfsseflt.asm +++ b/common/jpeg/simd/jfsseflt.asm @@ -20,8 +20,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/ji3dnflt.asm b/common/jpeg/simd/ji3dnflt.asm index 0f5cbd81..6c9abca7 100644 --- a/common/jpeg/simd/ji3dnflt.asm +++ b/common/jpeg/simd/ji3dnflt.asm @@ -20,8 +20,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- SECTION SEG_CONST diff --git a/common/jpeg/simd/jimmxfst.asm b/common/jpeg/simd/jimmxfst.asm index 662a522f..e5802ace 100644 --- a/common/jpeg/simd/jimmxfst.asm +++ b/common/jpeg/simd/jimmxfst.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jimmxint.asm b/common/jpeg/simd/jimmxint.asm index 775b1e8c..563f41c5 100644 --- a/common/jpeg/simd/jimmxint.asm +++ b/common/jpeg/simd/jimmxint.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jimmxred.asm b/common/jpeg/simd/jimmxred.asm index a5ad52bc..4ee34a0a 100644 --- a/common/jpeg/simd/jimmxred.asm +++ b/common/jpeg/simd/jimmxred.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jiss2flt.asm b/common/jpeg/simd/jiss2flt.asm index 6bb429a2..fc9e21a2 100644 --- a/common/jpeg/simd/jiss2flt.asm +++ b/common/jpeg/simd/jiss2flt.asm @@ -20,8 +20,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jiss2fst.asm b/common/jpeg/simd/jiss2fst.asm index aafa8101..fda073f5 100644 --- a/common/jpeg/simd/jiss2fst.asm +++ b/common/jpeg/simd/jiss2fst.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jiss2int.asm b/common/jpeg/simd/jiss2int.asm index 4122c640..d568dada 100644 --- a/common/jpeg/simd/jiss2int.asm +++ b/common/jpeg/simd/jiss2int.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jiss2red.asm b/common/jpeg/simd/jiss2red.asm index b31346a8..10046e9a 100644 --- a/common/jpeg/simd/jiss2red.asm +++ b/common/jpeg/simd/jiss2red.asm @@ -21,8 +21,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jisseflt.asm b/common/jpeg/simd/jisseflt.asm index 6de93ada..db9d1a39 100644 --- a/common/jpeg/simd/jisseflt.asm +++ b/common/jpeg/simd/jisseflt.asm @@ -20,8 +20,8 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" -%include "simd/jdct.inc" +%include "jsimdext.inc" +%include "jdct.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/jsimdcpu.asm b/common/jpeg/simd/jsimdcpu.asm index 7838e27a..31f2a6ac 100644 --- a/common/jpeg/simd/jsimdcpu.asm +++ b/common/jpeg/simd/jsimdcpu.asm @@ -16,7 +16,7 @@ ; ; [TAB8] -%include "simd/jsimdext.inc" +%include "jsimdext.inc" ; -------------------------------------------------------------------------- SECTION SEG_TEXT diff --git a/common/jpeg/simd/jsimdext.inc b/common/jpeg/simd/jsimdext.inc index 8bbf64eb..d82b970e 100644 --- a/common/jpeg/simd/jsimdext.inc +++ b/common/jpeg/simd/jsimdext.inc @@ -272,6 +272,6 @@ const_base: ; -------------------------------------------------------------------------- ; Defines picked up from the C headers ; -%include "simd/jsimdcfg.inc" +%include "jsimdcfg.inc" ; -------------------------------------------------------------------------- diff --git a/common/jpeg/simd/nasm_lt.sh b/common/jpeg/simd/nasm_lt.sh new file mode 100755 index 00000000..ef5a591e --- /dev/null +++ b/common/jpeg/simd/nasm_lt.sh @@ -0,0 +1,57 @@ +#! /bin/sh +command="" +infile="" +o_opt=no +pic=no +while [ $# -gt 0 ]; do + case "$1" in + -DPIC|-fPIC|-fpic) + if [ "$pic" != "yes" ] ; then + command="$command -DPIC" + pic=yes + fi + ;; + -f|-fbin|-faout|-faoutb|-fcoff|-felf|-fas86| \ + -fobj|-fwin32|-frdf|-fieee|-fmacho) + # it's a file format specifier for nasm. + command="$command $1" + ;; + -f*) + # maybe a code-generation flag for gcc. + ;; + -[Ii]*) + incdir=`echo "$1" | sed 's/^-[Ii]//'` + if [ "x$incdir" = x -a "x$2" != x ] ; then + case "$2" in + -*) ;; + *) incdir="$2"; shift;; + esac + fi + if [ "x$incdir" != x ] ; then + # In the case of NASM, the trailing slash is necessary. + incdir=`echo "$incdir" | sed 's%/*$%/%'` + command="$command -I$incdir" + fi + ;; + -o*) + o_opt=yes + command="$command $1" + ;; + *.asm) + infile=$1 + command="$command $1" + ;; + *) + command="$command $1" + ;; + esac + shift +done +if [ "$o_opt" != yes ] ; then + # By default, NASM creates an output file + # in the same directory as the input file. + outfile="-o `echo $infile | sed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.o" + command="$command $outfile" +fi +echo $command +exec $command