Merge branch 'master' into release_0_8_9
[gnash.git] / extensions / fileio / Makefile.am
blob2d1da581c73a8a39e397ed37a0eb058ef12703d5
1 ## Process this file with automake to generate Makefile.in
2
3 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
4 #   2011 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19 AUTOMAKE_OPTIONS = dejagnu
21 EXTRA_DIST = test.as
23 # this is where Gnash plugins get installed
24 pluginsdir = $(libdir)/gnash/plugins
26 plugins_LTLIBRARIES = fileio.la
28 DEF_MAKESWF_FLAGS = -I $(top_srcdir)/testsuite/actionscript.all
30 INCLUDES =  \
31             -I$(top_srcdir)/libbase \
32             -I$(top_srcdir)/libcore \
33             -I$(top_srcdir)/libcore/abc \
34             -I$(top_srcdir)/libcore/swf \
35             -I$(top_srcdir)/libcore/vm \
36             -I$(top_srcdir)/libcore/parser \
37             -I$(top_srcdir)/libcore/asobj \
38             $(BOOST_CFLAGS) \
39             $(PTHREAD_CFLAGS) \
40             $(NULL)
42 AM_LDFLAGS =  \
43         $(top_builddir)/libbase/libgnashbase.la \
44         $(top_builddir)/libcore/libgnashcore.la \
45         $(BOOST_LIBS) \
46         $(PTHREAD_LIBS) \
47         $(NULL)
49 fileio_la_SOURCES = fileio.cpp fileio.h
50 fileio_la_LDFLAGS = -module -avoid-version -no-undefined
51 fileio_la_LIBDADD = $(LIBADD_DL) $(AM_LDFLAGS)
54 check_SCRIPTS =
56 if ENABLE_MING
57  check_SCRIPTS += test
58 endif
60 CLEANFILES = \
61         gnash-dbg.log \
62         test.swf.frame0.pp \
63         test.swf \
64         test \
65         logfile \
66         testrun.log \
67         testrun.sum \
68         site.exp.bak
70 install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
71         test -d "$(DESTDIR)$(pluginsdir)" || $(mkinstalldirs) "$(DESTDIR)$(pluginsdir)"
72         $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $(plugins_LTLIBRARIES) "$(DESTDIR)$(pluginsdir)/$(plugins_LTLIBRARIES)"
73         $(RM) $(DESTDIR)$(pluginsdir)/*.*a 
75 test: $(srcdir)/../../testsuite/generic-testrunner.sh test.swf
76         GNASH_PLUGINS=$(PWD)/.libs GNASHRC=$(srcdir)/../gnashrc sh $< $(top_builddir) test.swf > $@
77         chmod +x $@
79 uninstall-local:
80         $(RM) $(DESTDIR)$(pluginsdir)/fileio.so
82 # Wrap a single .as tests in dejagnu_so importer.
83 # At play time, if the relative url '../ming-misc.all/Dejagnu.swf' 
84 # takes to the Dejagnu.swf shared library we'll get visual traces,
85 # otherwise normal traces will be used.
86 SUFFIXES = as swf
87 .as.swf: 
88         $(MAKESWF) $(DEF_MAKESWF_FLAGS) $(MAKESWF_FLAGS) -o $@ $<
90 TEST_DRIVERS = ../../testsuite/simple.exp
91 TEST_CASES = \
92         $(check_SCRIPTS)
94 site-update: site.exp
95         @rm -fr site.exp.bak
96         @cp site.exp site.exp.bak
97         @sed -e '/testcases/d' site.exp.bak > site.exp
98         @echo "# This is a list of the pre-compiled testcases" >> site.exp
99         @echo "set testcases \"$(TEST_CASES)\"" >> site.exp
101 check-DEJAGNU: site-update $(TEST_CASES)
102         @runtest=$(RUNTEST); \
103         if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
104             $$runtest $(RUNTESTFLAGS) $(TEST_DRIVERS); \
105         else \
106           echo "WARNING: could not find \`runtest'" 1>&2; \
107           for i in "$(TEST_CASES)"; do \
108             $(SHELL) $$i; \
109           done; \
110         fi