#
# Sample makefile for bash loadable builtin development
#
# Copyright (C) 2015 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
#

PACKAGE = bash
VERSION = 5.0-release

PACKAGE_NAME = bash
PACKAGE_VERSION = 5.0-release

# Include some boilerplate Gnu makefile definitions.
prefix = /opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr

exec_prefix = /opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr
bindir = /opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/bin
libdir = /opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/lib
infodir = /opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/share/info
includedir = /opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/include

datarootdir = ${prefix}/share

loadablesdir = ${libdir}/bash
headersdir = /opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/include/nativesdk-bash

topdir = ../../../bash-5.0
BUILD_DIR = /scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-bash/5.0-r0/build
srcdir = ../../../bash-5.0/examples/loadables
VPATH = ../../../bash-5.0/examples/loadables

# Support an alternate destination root directory for package building
DESTDIR =

INSTALL = /scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/hosttools/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALLMODE= -m 0755


CC = x86_64-petalinux-linux-gcc  --sysroot=/scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-bash/5.0-r0/recipe-sysroot
RM = rm -f

SHELL = /bin/sh

host_os = linux-gnu
host_cpu = x86_64
host_vendor = petalinux

CFLAGS =  -O2 -pipe -fmacro-prefix-map=/scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-bash/5.0-r0=/usr/src/debug/nativesdk-bash/5.0-r0                      -fdebug-prefix-map=/scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-bash/5.0-r0=/usr/src/debug/nativesdk-bash/5.0-r0                      -fdebug-prefix-map=/scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-bash/5.0-r0/recipe-sysroot=                      -fdebug-prefix-map=/scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-bash/5.0-r0/recipe-sysroot-native=  -Wno-parentheses -Wno-format-security
LOCAL_CFLAGS = 
DEFS = -DHAVE_CONFIG_H
LOCAL_DEFS = -DSHELL

CPPFLAGS = 

BASHINCDIR = ${topdir}/include

SUPPORT_SRC = $(topdir)/support/

LIBBUILD = ${BUILD_DIR}/lib

INTL_LIBSRC = ${topdir}/lib/intl
INTL_BUILDDIR = ${LIBBUILD}/intl
INTL_INC = 
LIBINTL_H = 

CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS)

#
# 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 = x86_64-petalinux-linux-gcc --sysroot=/scratch/jenkins-BUILDS-eSDK-2020.2_stable-pipeline-build-168_VersalFullPrime/build/tmp/work/x86_64-nativesdk-petalinux-linux/nativesdk-bash/5.0-r0/recipe-sysroot
SHOBJ_CFLAGS = -fPIC
SHOBJ_LD = ${CC}
SHOBJ_LDFLAGS = -shared -Wl,-soname,$@ -Wl,-O1
SHOBJ_XLDFLAGS = 
SHOBJ_LIBS = 
SHOBJ_STATUS = supported

INC = -I$(headersdir) -I$(headersdir)/include -I$(headersdir)/builtins

.c.o:
	$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<

all:	example

example:	example.o
	$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS)

example.o: example.c
