Update with current status
[gnash.git] / plugin / klash4 / Makefile.am
blobfc434514b6c8b4383a4b7028268a49e07a58a2c2
1 ## Process this file with automake to generate Makefile.in
2
3 #   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
4 #   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 = 
21 if KPARTS4
22 AM_CPPFLAGS = \
23         $(KDE4_CFLAGS) \
24         $(QT4_CFLAGS) \
25         $(X11_CFLAGS) \
26         -I$(top_srcdir)/libbase \
27         -DGNASHBINDIR=\"${bindir}\" \
28         $(NULL)
30 plugindir   = $(KDE4_PLUGINDIR)
31 kde_servicesdir = $(KDE4_SERVICESDIR)
32 kde_rcdir       = $(KDE4_APPSDATADIR)
33 #$(prefix)/share/apps/klash
34 kde_appsdatadir = $(KDE4_APPSDATADIR)
35 #$(prefix)/share/apps/klash
36 kde_configdir   = $(KDE4_CONFIGDIR)
37 #$(prefix)/share/config
39 plugin_LTLIBRARIES= libklashpart.la
41 libklashpart_la_SOURCES = klash_part.cpp klash_part.h
42 libklashpart_la_DEPENDENCIES = klash_part.moc
43 libklashpart_la_LDFLAGS = -module -avoid-version -L$(plugindir) $(KDE4_LIBS) $(QT4_LIBS)
45 dist_kde_services_DATA = klash_part.desktop
46 dist_kde_rc_DATA = klashpartui.rc
47 dist_kde_appsdata_DATA = pluginsinfo
48 #dist_kde_config_DATA = klashrc
50 # DIST_COMMON = $(dist_kde_appsdata_DATA) $(dist_kde_services_DATA) $(dist_kde_rc_DATA)
52 BUILT_SOURCES = klash_part.moc
53 CLEANFILES = klash_part.moc
55 klash_part.moc: $(srcdir)/klash_part.h
56         @if test x"$(MOC4)" != x; then \
57           echo "Generating MOC 4.x file..."; \
58         $(MOC4) $(srcdir)/klash_part.h -o klash_part.moc; \
59         else  \
60           echo "WARNING: Install QT 4.x moc tool! Linking to default MOC file"; \
61           ln -s $(srcdir)/klash_part.moc.in klash_part.moc; \
62         fi
64 install-data: $(dist_kde_services_DATA)
65         test -d $(DESTDIR)$(kde_servicesdir) || $(mkinstalldirs) $(DESTDIR)$(kde_servicesdir)
66         $(INSTALL) $(dist_kde_services_DATA) $(DESTDIR)$(kde_servicesdir)
68 test_perms:
69         @if test ! -w $(DESTDIR)$(kde_appsdatadir) -o ! -w $(DESTDIR)$(kde_servicesdir); then \
70           if test -d $(DESTDIR)$(kde_appsdatadir); then \
71             echo "WARNING: Improper permissions for $(DESTDIR)$(kde_appsdatadir)!"; \
72             echo "You probably need to be root"; \
73             echo "Or configure with --with-kde-prefix= set to a writable directory"; \
74             exit 1; \
75           fi; \
76           if test -d $(DESTDIR)$(kde_servicesdir) -a -d $(DESTDIR)$(kde_appsdatadir); then \
77             echo "WARNING: Improper permissions for $(DESTDIR)$(kde_appsdatadir) and $(DESTDIR)$(kde_servicesdir)!"; \
78             echo "You probably need to be root"; \
79             echo "Or configure with --with-kde-prefix= set to a writable directory"; \
80             exit 1; \
81           fi; \
82         fi
84 install-data-am: $(dist_kde_services_DATA) $(dist_kde_appsdata_DATA)
85         test -d $(DESTDIR)$(kde_servicesdir) || $(mkinstalldirs) $(DESTDIR)$(kde_servicesdir)
86         $(INSTALL) $(srcdir)/$(dist_kde_services_DATA) $(DESTDIR)$(kde_servicesdir)
87         test -d $(DESTDIR)$(kde_appsdatadir) || $(mkinstalldirs) $(DESTDIR)$(kde_appsdatadir)
88         $(INSTALL) $(srcdir)/$(dist_kde_appsdata_DATA) $(DESTDIR)$(kde_appsdatadir)
90 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
91         @echo "Nothing to install here now."
92         @echo "Use \"make install-plugin\" to install the KDE plugin to $(DESTDIR)$(plugindir)."
94 install-plugin install-plugins: test_perms $(plugin_LTLIBRARIES) $(dist_kde_services_DATA) \
95         install-dist_kde_appsdataDATA install-dist_kde_rcDATA \
96         install-dist_kde_servicesDATA
97         test -d $(DESTDIR)$(plugindir) || $(mkinstalldirs) $(DESTDIR)$(plugindir)
98         $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) libklashpart.* $(DESTDIR)$(plugindir)
99         $(RM) $(DESTDIR)$(plugindir)/libklashpart.la
101 uninstall-plugins: 
102         $(RM) -f $(DESTDIR)$(plugindir)/libklashpart.so
104 endif
106 force:
108 .PHONY : install-plugins install-plugin test_perms