| 1 |
pippijn |
1.6 |
# Makefile.in: This file contains build instructions. |
| 2 |
|
|
# |
| 3 |
pippijn |
1.4 |
# Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
| 4 |
pippijn |
1.6 |
# Rights to this code are as documented in COPYING. |
| 5 |
|
|
# |
| 6 |
|
|
# |
| 7 |
|
|
# Portions of this file were derived from sources bearing the following license: |
| 8 |
pippijn |
1.1 |
# Copyright © 2003-2004 E. Will et al. |
| 9 |
pippijn |
1.2 |
# Rights to this code are documented in doc/pod/license.pod. |
| 10 |
pippijn |
1.1 |
# |
| 11 |
pippijn |
1.6 |
# $Id: Makefile.in,v 1.3 2007-08-28 17:08:07 pippijn Exp $ |
| 12 |
pippijn |
1.1 |
# |
| 13 |
|
|
|
| 14 |
|
|
MODULE = misc |
| 15 |
|
|
|
| 16 |
|
|
include ../Makefile.defs |
| 17 |
|
|
|
| 18 |
|
|
BASE_SRCS = \ |
| 19 |
|
|
$(SRCDIR)/svsperl.C |
| 20 |
|
|
|
| 21 |
|
|
include ../Makefile.common |
| 22 |
|
|
|
| 23 |
|
|
$(SRCDIR)/svsperl.C: $(SRCDIR)/svsperl.xs $(SRCDIR)/svsperl/typemap |
| 24 |
|
|
|
| 25 |
pippijn |
1.4 |
$(SRCDIR)/svsperl.o: $(SRCDIR)/svsperl.C |
| 26 |
pippijn |
1.1 |
@if [ "${HAVE_PERL}" = "yes" ]; then \ |
| 27 |
|
|
echo " LD $@"; \ |
| 28 |
pippijn |
1.5 |
${CXX} -c ${PICFLAGS} ${CXXFLAGS} ${CPPFLAGS} ${PERLFLAGS} $< -o $@; \ |
| 29 |
pippijn |
1.1 |
else \ |
| 30 |
pippijn |
1.4 |
echo "Not compiling perl module"; \ |
| 31 |
pippijn |
1.1 |
fi |
| 32 |
|
|
|
| 33 |
|
|
$(SRCDIR)/svsperl.C: $(SRCDIR)/svsperl.xs $(SRCDIR)/svsperl/typemap $(SRCDIR)/perlxsi.c $(SRCDIR)/svsperl/genacc |
| 34 |
|
|
@if [ "${HAVE_PERL}" = "yes" ]; then \ |
| 35 |
pippijn |
1.4 |
echo "Generating $@"; \ |
| 36 |
pippijn |
1.1 |
PERL="${PERL}" SRCDIR="${SRCDIR}" \ |
| 37 |
pippijn |
1.3 |
${PERL} ${PERLPRIVLIBEXP}/ExtUtils/xsubpp -C++ -csuffix .C \ |
| 38 |
|
|
-typemap ${PERLPRIVLIBEXP}/ExtUtils/typemap -typemap $(SRCDIR)/svsperl/typemap \ |
| 39 |
pippijn |
1.1 |
-prototypes $< > $@; \ |
| 40 |
|
|
else \ |
| 41 |
pippijn |
1.4 |
echo "Not generating $@"; \ |
| 42 |
pippijn |
1.1 |
echo -n > $@; \ |
| 43 |
|
|
fi |
| 44 |
|
|
|
| 45 |
|
|
$(SRCDIR)/perlxsi.c: |
| 46 |
|
|
@${PERL} -MExtUtils::Embed -e xsinit -- -std svs |
| 47 |
|
|
|
| 48 |
|
|
extra-clean: |
| 49 |
|
|
@${RM} -f svsperl.C perlxsi.c |
| 50 |
|
|
|
| 51 |
pippijn |
1.4 |
install: |
| 52 |
pippijn |
1.1 |
@$(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir) |
| 53 |
|
|
@$(INSTALL) -m 640 -c $(SRCDIR)/svsperl/svs.pm ${sysconfdir} |
| 54 |
|
|
|
| 55 |
|
|
depend: ${SRCDIR}/svsperl.C |