1#
2# Makefile for builtin perl interpreter
3#
4#
5# Copyright (C) 1998 Free Software Foundation, Inc.     
6
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2, or (at your option)
10# any later version.
11
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
20
21# Include some boilerplate Gnu makefile definitions.
22prefix = @prefix@
23
24exec_prefix = @exec_prefix@
25bindir = @bindir@
26libdir = @libdir@
27infodir = @infodir@
28includedir = @includedir@
29
30topdir = @top_srcdir@
31BUILD_DIR = @BUILD_DIR@
32srcdir = @srcdir@
33VPATH = .:@srcdir@
34
35@SET_MAKE@
36CC = @CC@
37RM = rm -f
38
39SHELL = @MAKE_SHELL@
40
41PERL5 = perl5
42
43CFLAGS = @CFLAGS@
44
45#
46# These values are generated for configure by ${topdir}/support/shobj-conf.
47# If your system is not supported by that script, but includes facilities for
48# dynamic loading of shared objects, please update the script and send the
49# changes to bash-maintainers@gnu.org.
50#
51SHOBJ_CC = @SHOBJ_CC@
52SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
53SHOBJ_LD = @SHOBJ_LD@
54SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
55SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
56SHOBJ_LIBS = @SHOBJ_LIBS@
57SHOBJ_STATUS = @SHOBJ_STATUS@
58
59# Values used for compiling the perl files
60PERL_LDOPTS = `${PERL5} -MExtUtils::Embed -e ldopts`
61PERL_CFLAGS = ${CCFLAGS} `${PERL5} -MExtUtils::Embed -e ccopts`
62
63SRC = bperl.c iperl.c perlxsi.c
64OBJ = bperl.o iperl.o perlxsi.o
65
66BUILTIN = bperl5
67
68INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
69      -I$(topdir)/include -I$(BUILD_DIR) -I$(BUILD_DIR)/lib \
70      -I$(BUILD_DIR)/builtins
71
72
73${BUILTIN}:	${OBJ}
74	${RM} $@
75	${SHOBJ_LD} ${SHOBJ_LDFLAGS} ${SHOBJ_XLDFLAGS} -o $@ ${OBJ} ${PERL_LDOPTS} ${SHOBJ_LIBS}
76
77bperl.o:	bperl.c
78	${RM} $@
79	$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ ${srcdir}/bperl.c
80
81iperl.o:	iperl.c
82	${RM} $@
83	$(SHOBJ_CC) ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ ${srcdir}/iperl.c
84
85perlxsi.c:
86	${PERL5} -MExtUtils::Embed -e xsinit -- -o $@
87
88perlxsi.o:	perlxsi.c
89	${RM} $@
90	${SHOBJ_CC} ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ perlxsi.c
91
92clean mostlyclean:
93	${RM} ${OBJ}
94	${RM} ${BUILTIN}
95
96distclean maintainer-clean: clean
97	${RM} perlxsi.c
98