3af9b85433299ce8883692218c2ab1c8d4d6f793
[platform/upstream/bash.git] / examples / loadables / perl / Makefile.in
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.
22 prefix = @prefix@
23
24 exec_prefix = @exec_prefix@
25 bindir = @bindir@
26 libdir = @libdir@
27 infodir = @infodir@
28 includedir = @includedir@
29
30 topdir = @top_srcdir@
31 BUILD_DIR = @BUILD_DIR@
32 srcdir = @srcdir@
33 VPATH = .:@srcdir@
34
35 @SET_MAKE@
36 CC = @CC@
37 RM = rm -f
38
39 SHELL = @MAKE_SHELL@
40
41 PERL5 = perl5
42
43 CFLAGS = @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 #
51 SHOBJ_CC = @SHOBJ_CC@
52 SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
53 SHOBJ_LD = @SHOBJ_LD@
54 SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
55 SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
56 SHOBJ_LIBS = @SHOBJ_LIBS@
57 SHOBJ_STATUS = @SHOBJ_STATUS@
58
59 # Values used for compiling the perl files
60 PERL_LDOPTS = `${PERL5} -MExtUtils::Embed -e ldopts`
61 PERL_CFLAGS = ${CCFLAGS} `${PERL5} -MExtUtils::Embed -e ccopts`
62
63 SRC = bperl.c iperl.c perlxsi.c
64 OBJ = bperl.o iperl.o perlxsi.o
65
66 BUILTIN = bperl5
67
68 INC = -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
77 bperl.o:        bperl.c
78         ${RM} $@
79         $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ ${srcdir}/bperl.c
80
81 iperl.o:        iperl.c
82         ${RM} $@
83         $(SHOBJ_CC) ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ ${srcdir}/iperl.c
84
85 perlxsi.c:
86         ${PERL5} -MExtUtils::Embed -e xsinit -- -o $@
87
88 perlxsi.o:      perlxsi.c
89         ${RM} $@
90         ${SHOBJ_CC} ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ perlxsi.c
91
92 clean mostlyclean:
93         ${RM} ${OBJ}
94         ${RM} ${BUILTIN}
95
96 distclean maintainer-clean: clean
97         ${RM} perlxsi.c