2009-05-12 21:56:56 +00:00
|
|
|
EXTRA_DIST =Makefile.PL libapparmor_wrap.c LibAppArmor.pm examples/*.pl
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
if HAVE_PERL
|
2010-07-13 16:38:39 -07:00
|
|
|
noinst_DATA =LibAppArmor.so
|
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
libapparmor_wrap.c: $(srcdir)/../SWIG/libapparmor.i
|
|
|
|
$(SWIG) -perl -I$(srcdir)/../../src -module LibAppArmor -o $@ $(srcdir)/../SWIG/libapparmor.i
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
MOSTLYCLEANFILES=libapparmor_wrap.c LibAppArmor.pm
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
Makefile.perl: Makefile.PL
|
|
|
|
$(PERL) $< PREFIX=$(prefix) MAKEFILE=$@
|
2011-02-08 09:48:57 -08:00
|
|
|
sed -ie 's/^LD_RUN_PATH.*//g' Makefile.perl
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
LibAppArmor.so: libapparmor_wrap.c Makefile.perl
|
|
|
|
if test ! -f libapparmor_wrap.c; then cp $(srcdir)/libapparmor_wrap.c . ; fi
|
|
|
|
$(MAKE) -fMakefile.perl
|
|
|
|
if test $(top_srcdir) != $(top_builddir) ; then rm -f libapparmor_wrap.c ; fi
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
install-exec-local: Makefile.perl
|
|
|
|
$(MAKE) -fMakefile.perl install_vendor
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
# sadly there is no make uninstall for perl
|
|
|
|
#uninstall-local: Makefile.perl
|
|
|
|
#$(MAKE) -fMakefile.perl uninstall
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2009-05-12 21:56:56 +00:00
|
|
|
clean-local:
|
|
|
|
if test -f Makefile.perl; then $(MAKE) -fMakefile.perl realclean; fi
|
|
|
|
#rm -f Makefile.perl Makefile.perl.old
|
|
|
|
rm -f *.so # *.o
|
2007-07-28 15:41:04 +00:00
|
|
|
|
2010-07-13 16:38:39 -07:00
|
|
|
endif
|