#
# Makefile for builtin perl interpreter
#
#
# Copyright (C) 1998 Free Software Foundation, Inc.     

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.

# Include some boilerplate Gnu makefile definitions.
prefix = /usr

exec_prefix = /usr
bindir = /usr/bin
libdir = /usr/lib
infodir = /usr/share/info
includedir = /usr/include

topdir = ../../../../bash-3.2.57
BUILD_DIR = /mnt/slave/workspace/izumo-bisyamon-common/projects/ebisu-bsp/imx-5.15.5_1.0.0/out_sony-model-vt-ae_sony-model-ae_release/tmp/work/cortexa53-crypto-poky-linux/bash/3.2.57-r0/archiver-work/build
srcdir = ../../../../bash-3.2.57/examples/loadables/perl
VPATH = .:../../../../bash-3.2.57/examples/loadables/perl


CC = aarch64-poky-linux-gcc  -mcpu=cortex-a53 -march=armv8-a+crc+crypto -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wdate-time --sysroot=/mnt/slave/workspace/izumo-bisyamon-common/projects/ebisu-bsp/imx-5.15.5_1.0.0/out_sony-model-vt-ae_sony-model-ae_release/tmp/work/cortexa53-crypto-poky-linux/bash/3.2.57-r0/recipe-sysroot
RM = rm -f

SHELL = /bin/sh

PERL5 = perl5

CFLAGS =  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/mnt/slave/workspace/izumo-bisyamon-common/projects/ebisu-bsp/imx-5.15.5_1.0.0/out_sony-model-vt-ae_sony-model-ae_release/tmp/work/cortexa53-crypto-poky-linux/bash/3.2.57-r0/archiver-work/=/usr/src/debug/bash/3.2.57-r0                      -fdebug-prefix-map=/mnt/slave/workspace/izumo-bisyamon-common/projects/ebisu-bsp/imx-5.15.5_1.0.0/out_sony-model-vt-ae_sony-model-ae_release/tmp/work/cortexa53-crypto-poky-linux/bash/3.2.57-r0/archiver-work/=/usr/src/debug/bash/3.2.57-r0                      -fdebug-prefix-map=/mnt/slave/workspace/izumo-bisyamon-common/projects/ebisu-bsp/imx-5.15.5_1.0.0/out_sony-model-vt-ae_sony-model-ae_release/tmp/work/cortexa53-crypto-poky-linux/bash/3.2.57-r0/recipe-sysroot=                      -fdebug-prefix-map=/mnt/slave/workspace/izumo-bisyamon-common/projects/ebisu-bsp/imx-5.15.5_1.0.0/out_sony-model-vt-ae_sony-model-ae_release/tmp/work/cortexa53-crypto-poky-linux/bash/3.2.57-r0/recipe-sysroot-native=  -DNON_INTERACTIVE_LOGIN_SHELLS

#
# These values are generated for configure by ${topdir}/support/shobj-conf.
# If your system is not supported by that script, but includes facilities for
# dynamic loading of shared objects, please update the script and send the
# changes to bash-maintainers@gnu.org.
#
SHOBJ_CC = aarch64-poky-linux-gcc -mcpu=cortex-a53 -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Wdate-time --sysroot=/mnt/slave/workspace/izumo-bisyamon-common/projects/ebisu-bsp/imx-5.15.5_1.0.0/out_sony-model-vt-ae_sony-model-ae_release/tmp/work/cortexa53-crypto-poky-linux/bash/3.2.57-r0/recipe-sysroot
SHOBJ_CFLAGS = -fPIC
SHOBJ_LD = ${CC}
SHOBJ_LDFLAGS = -shared -Wl,-soname,$@
SHOBJ_XLDFLAGS = 
SHOBJ_LIBS = 
SHOBJ_STATUS = supported

# Values used for compiling the perl files
PERL_LDOPTS = `${PERL5} -MExtUtils::Embed -e ldopts`
PERL_CFLAGS = ${CCFLAGS} `${PERL5} -MExtUtils::Embed -e ccopts`

SRC = bperl.c iperl.c perlxsi.c
OBJ = bperl.o iperl.o perlxsi.o

BUILTIN = bperl5

INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
      -I$(topdir)/include -I$(BUILD_DIR) -I$(BUILD_DIR)/lib \
      -I$(BUILD_DIR)/builtins


${BUILTIN}:	${OBJ}
	${RM} $@
	${SHOBJ_LD} ${SHOBJ_LDFLAGS} ${SHOBJ_XLDFLAGS} -o $@ ${OBJ} ${PERL_LDOPTS} ${SHOBJ_LIBS}

bperl.o:	bperl.c
	${RM} $@
	$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ ${srcdir}/bperl.c

iperl.o:	iperl.c
	${RM} $@
	$(SHOBJ_CC) ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ ${srcdir}/iperl.c

perlxsi.c:
	${PERL5} -MExtUtils::Embed -e xsinit -- -o $@

perlxsi.o:	perlxsi.c
	${RM} $@
	${SHOBJ_CC} ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ perlxsi.c

clean mostlyclean:
	${RM} ${OBJ}
	${RM} ${BUILTIN}

distclean maintainer-clean: clean
	${RM} perlxsi.c
