summaryrefslogtreecommitdiff
path: root/plugins/ffap/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ffap/Makefile.am')
-rw-r--r--plugins/ffap/Makefile.am22
1 files changed, 20 insertions, 2 deletions
diff --git a/plugins/ffap/Makefile.am b/plugins/ffap/Makefile.am
index a3671fbe..16110b94 100644
--- a/plugins/ffap/Makefile.am
+++ b/plugins/ffap/Makefile.am
@@ -1,8 +1,26 @@
if HAVE_FFAP
ffapdir = $(libdir)/$(PACKAGE)
pkglib_LTLIBRARIES = ffap.la
-ffap_la_SOURCES = ffap.c
+
+topsrcdir = @top_srcdir@
+EXTRA_PROGRAMS = foo
+YASM=$(topsrcdir)/yasmwrapper.sh
+SUFFIXES = .asm
+
+if HAVE_YASM
+INTEL_SRC=dsputil_yasm.asm
+YASM_FLAGS="-f elf -D ARCH_X86_64 -m amd64"
+ffap_la_DEPENDENCIES=dsputil_yasm.lo
+endif
+
+ffap_la_SOURCES = ffap.c $(INTEL_SRC)
+
+if HAVE_YASM
+.asm.lo:
+ $(LIBTOOL) --tag=CC --mode=compile $(YASM) $(YASM_FLAGS) -o $@ $<
+endif
+
ffap_la_LDFLAGS = -module
-AM_CFLAGS = $(CFLAGS) -std=c99
+AM_CFLAGS = $(CFLAGS) -fPIC -std=c99
endif