Debian Codegraph @

modules/scripting/perl/Makefile

raw
1 # Copyright (c) 2010 Atheme Development Group
2 # Rights to this code are documented in doc/LICENSE.
3
4 PLUGIN = perl$(PLUGIN_SUFFIX)
5
6 SRCS = perl_module.c perl_object_list.c perlxsi.c
7
8 SUBDIRS = api
9
10 include ../../../extra.mk
11 include ../../../buildsys.mk
12
13 plugindir = $(MODDIR)/modules/scripting
14
15 CPPFLAGS += -I../../../include -I. $(PERL_CFLAGS) -DPERL_MODDIR=\"$(plugindir)\"
16 CFLAGS += $(PLUGIN_CFLAGS)
17 LDFLAGS += $(PLUGIN_LDFLAGS) $(PERL_LIBS)
18 LIBS += -L../../../libathemecore -lathemecore ${LDFLAGS_RPATH}
19
20 # Some of the code from Perl is not designed to compile with warnings.
21 PERL_WARN_HACKS = -Wno-redundant-decls -Wno-float-equal -Wno-unused-value
22 PERL_WARN_HACKS += -Wno-nested-externs
23 CFLAGS += $(PERL_WARN_HACKS)
24 # This does not make any sense, but other warning flags are in CPPFLAGS too.
25 CPPFLAGS += $(PERL_WARN_HACKS)
26
27 perlxsi.c:
28 perl -MExtUtils::Embed -e xsinit
29
30 install-extra:
31 ${MKDIR_P} '${DESTDIR}'${plugindir}/lib
32 ${INSTALL} -m644 lib/*.pl lib/*.pm '${DESTDIR}'${plugindir}/lib
33 ${MKDIR_P} '${DESTDIR}'${plugindir}/lib/Atheme
34 ${INSTALL} -m644 lib/Atheme/*.pm '${DESTDIR}'${plugindir}/lib/Atheme
35 ${MKDIR_P} '${DESTDIR}'${plugindir}/lib/Atheme/Internal
36 ${INSTALL} -m644 lib/Atheme/Internal/*.pm '${DESTDIR}'${plugindir}/lib/Atheme/Internal
37 ${MKDIR_P} '${DESTDIR}'${plugindir}/examples
38 ${INSTALL} -m644 examples/*.pl '${DESTDIR}'${plugindir}/examples