Merged silc_1_0_branch to trunk.
[silc.git] / apps / irssi / src / perl / Makefile.am
index 965605a2c7d8449242be3b40872423517dcf0f40..ac8fa7e7f47d22d900d1e045216e28e4fcb8f08a 100644 (file)
@@ -4,6 +4,8 @@ include $(top_srcdir)/Makefile.defines.in
 
 moduledir = $(silc_modulesdir)
 
+perl_dirs = common ui textui silc
+
 module_LTLIBRARIES = $(perl_module_lib) $(perl_module_fe_lib)
 noinst_LTLIBRARIES = $(perl_static_lib) $(perl_static_fe_lib)
 EXTRA_LTLIBRARIES = \
@@ -21,7 +23,7 @@ INCLUDES = \
        -I$(top_srcdir)/src/fe-common/core \
        -I$(top_srcdir)/src/fe-common/silc \
        $(GLIB_CFLAGS) \
-       -DSCRIPTDIR=\""$(libdir)/irssi/scripts"\" \
+       -DSCRIPTDIR=\""$(datadir)/silc/scripts"\" \
        -DPERL_USE_LIB=\""$(PERL_USE_LIB)"\" \
        -DPERL_STATIC_LIBS=$(PERL_STATIC_LIBS) \
        $(PERL_CFLAGS)
@@ -79,6 +81,7 @@ common_sources = \
        common/Irssi.pm \
        common/Channel.xs \
        common/Core.xs \
+       common/Expando.xs \
        common/Ignore.xs \
        common/Log.xs \
        common/Masks.xs \
@@ -110,6 +113,15 @@ textui_sources = \
        textui/typemap \
        textui/module.h
 
+silc_sources = \
+       silc/Silc.xs \
+       silc/Silc.pm \
+       silc/Channel.xs \
+       silc/Server.xs \
+       silc/Query.xs \
+       silc/typemap \
+       silc/module.h
+
 EXTRA_DIST = \
        libperl_dynaloader.la \
        libperl_orig.la \
@@ -117,10 +129,11 @@ EXTRA_DIST = \
        irssi-core.pl \
        $(common_sources) \
        $(ui_sources) \
-       $(textui_sources)
+       $(textui_sources) \
+       $(silc_sources)
 
 all-local:
-       for dir in common ui textui; do \
+       for dir in $(perl_dirs); do \
          cd $$dir && \
          if [ ! -f Makefile ]; then \
             $(perlpath) Makefile.PL $(PERL_MM_PARAMS); \
@@ -130,16 +143,22 @@ all-local:
        done
 
 install-exec-local:
-       for dir in common ui textui; do \
+       for dir in $(perl_dirs); do \
          cd $$dir && $(MAKE) install && cd ..; \
        done
 
 clean-generic:
-       rm -f common/Makefile ui/Makefile textui/Makefile
+       for dir in $(perl_dirs); do \
+         cd $$dir; \
+         $(MAKE) clean; \
+         cd ..; \
+       done
 
 distclean-generic:
-       -(cd common && $(MAKE) realclean && rm -f Makefile.PL)
-       -(cd ui && $(MAKE) realclean && rm -f Makefile.PL)
-       -(cd textui && $(MAKE) realclean && rm -f Makefile.PL)
+       for dir in $(perl_dirs); do \
+         cd $$dir && \
+         $(MAKE) realclean && rm -f Makefile.PL && \
+         cd ..; \
+       done
 
 libperl_core_la_LIBADD = $(PERL_LDFLAGS)