1 ## Process this file with automake to generate Makefile.in
3 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 -DGNASHBINDIR=\"${bindir}\"
27 plugindir = $(KDE4_PLUGINDIR)
28 kde_servicesdir = $(KDE4_SERVICESDIR)
29 kde_rcdir = $(KDE4_APPSDATADIR)
30 #$(prefix)/share/apps/klash
31 kde_appsdatadir = $(KDE4_APPSDATADIR)
32 #$(prefix)/share/apps/klash
33 kde_configdir = $(KDE4_CONFIGDIR)
34 #$(prefix)/share/config
36 plugin_LTLIBRARIES= libklashpart.la
38 libklashpart_la_SOURCES = klash_part.cpp klash_part.h
39 libklashpart_la_DEPENDENCIES = klash_part.moc
40 if PLUGIN_LINK_UNDEFINED
41 libklashpart_la_LDFLAGS = -avoid-version -L$(plugindir) $(KDE4_LIBS) $(QT4_LIBS)
43 libklashpart_la_LDFLAGS = -module -avoid-version -L$(plugindir) $(KDE4_LIBS) $(QT4_LIBS)
46 dist_kde_services_DATA = klash_part.desktop
47 dist_kde_rc_DATA = klashpartui.rc
48 dist_kde_appsdata_DATA = pluginsinfo
49 #dist_kde_config_DATA = klashrc
51 # DIST_COMMON = $(dist_kde_appsdata_DATA) $(dist_kde_services_DATA) $(dist_kde_rc_DATA)
53 BUILT_SOURCES = klash_part.moc
54 CLEANFILES = klash_part.moc
56 klash_part.moc: $(srcdir)/klash_part.h
57 @if test x"$(MOC4)" != x; then \
58 echo "Generating MOC 4.x file..."; \
59 $(MOC4) $(srcdir)/klash_part.h -o klash_part.moc; \
61 echo "WARNING: Install QT 4.x moc tool! Linking to default MOC file"; \
62 ln -s $(srcdir)/klash_part.moc.in klash_part.moc; \
65 install-data: $(dist_kde_services_DATA)
66 test -d $(DESTDIR)$(kde_servicesdir) || $(mkinstalldirs) $(DESTDIR)$(kde_servicesdir)
67 $(INSTALL) $(dist_kde_services_DATA) $(DESTDIR)$(kde_servicesdir)
70 @if test ! -w $(DESTDIR)$(kde_appsdatadir) -o ! -w $(DESTDIR)$(kde_servicesdir); then \
71 if test -d $(DESTDIR)$(kde_appsdatadir); then \
72 echo "WARNING: Improper permissions for $(DESTDIR)$(kde_appsdatadir)!"; \
73 echo "You probably need to be root"; \
74 echo "Or configure with --with-kde-prefix= set to a writable directory"; \
77 if test -d $(DESTDIR)$(kde_servicesdir) -a -d $(DESTDIR)$(kde_appsdatadir); then \
78 echo "WARNING: Improper permissions for $(DESTDIR)$(kde_appsdatadir) and $(DESTDIR)$(kde_servicesdir)!"; \
79 echo "You probably need to be root"; \
80 echo "Or configure with --with-kde-prefix= set to a writable directory"; \
85 install-data-am: $(dist_kde_services_DATA) $(dist_kde_appsdata_DATA)
86 test -d $(DESTDIR)$(kde_servicesdir) || $(mkinstalldirs) $(DESTDIR)$(kde_servicesdir)
87 $(INSTALL) $(srcdir)/$(dist_kde_services_DATA) $(DESTDIR)$(kde_servicesdir)
88 test -d $(DESTDIR)$(kde_appsdatadir) || $(mkinstalldirs) $(DESTDIR)$(kde_appsdatadir)
89 $(INSTALL) $(srcdir)/$(dist_kde_appsdata_DATA) $(DESTDIR)$(kde_appsdatadir)
91 install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
92 @echo "Nothing to install here now."
93 @echo "Use \"make install-plugin\" to install the KDE plugin to $(DESTDIR)$(plugindir)."
95 install-plugin install-plugins: test_perms $(plugin_LTLIBRARIES) $(dist_kde_services_DATA) \
96 install-dist_kde_appsdataDATA install-dist_kde_rcDATA \
97 install-dist_kde_servicesDATA
98 test -d $(DESTDIR)$(plugindir) || $(mkinstalldirs) $(DESTDIR)$(plugindir)
99 $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $(plugin_LTLIBRARIES) $(DESTDIR)$(plugindir)
102 $(RM) -f $(DESTDIR)$(plugindir)/libklashpart.so
103 $(RM) -f $(DESTDIR)$(plugindir)/libklashpart.la
104 $(RM) -f $(DESTDIR)$(plugindir)/libklashpart.a
110 .PHONY : install-plugins install-plugin test_perms