Makefile.am 952 Bytes
Newer Older
1 2
#
# Makefile for the Python Gnumeric plugin.
3 4
#

5 6 7 8 9 10 11 12 13 14
#
# Where can we find the Gnumeric include files.
#
GNUMERIC_SRC_DIR = $(srcdir)/../../src

#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins

15
CFLAGS += $(PERL_CCCDLFLAGS)				\
16 17 18 19 20 21
	-I$(GNUMERIC_SRC_DIR)				\
	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" 	\
	-I$(includedir)					\
	$(PERL_CCOPTS)					\
	$(GNOME_INCLUDEDIR)

22

23
noinst_PROGRAMS = perl.so
24 25 26 27

.c.o:
	$(CC) $(CFLAGS) -c $<

28 29
perl_so_SOURCES = perl.c

30
perl.so: perl.o xsinit.o ext.timestamp
Arturo Espinosa's avatar
Arturo Espinosa committed
31
	-$(PERL_LD) $(PERL_LDDLFLAGS) -o perl.so perl.o xsinit.o $(PERL_LDOPTS)
32 33

xsinit.c:
Arturo Espinosa's avatar
Arturo Espinosa committed
34
	-perl -MExtUtils::Embed -e xsinit -- -o xsinit.c
35

36
ext.timestamp:
Arturo Espinosa's avatar
Arturo Espinosa committed
37
	-( cd ext ; perl Makefile.PL LIB=$(datadir)/gnumeric/perl/lib )
38 39
	touch ext.timestamp

40 41 42 43 44
Perlscriptsdir = $(datadir)/gnumeric/perl

Perlscripts_DATA = startup.pl

EXTRA_DIST = startup.pl
45 46 47 48

dist-hook:
	mkdir $(distdir)/ext
	cp $(srcdir)/ext/Gnumeric.* $(srcdir)/ext/Makefile.PL.in $(distdir)/ext