forked from Imagelibrary/rtems
Fixed to correctly operate on target variants like debug and profile.
This commit is contained in:
@@ -29,26 +29,30 @@ program_prefix=@program_prefix@
|
|||||||
gnusize=${program_prefix}size
|
gnusize=${program_prefix}size
|
||||||
|
|
||||||
# check usage
|
# check usage
|
||||||
if [ $# -ne 1 ] ; then
|
if [ $# -ne 2 ] ; then
|
||||||
echo usage ${0}: bsp
|
echo usage ${0}: bsp object_directory
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsp=$1
|
bsp=$1
|
||||||
board=$1
|
board=$1
|
||||||
|
ARCH=$2
|
||||||
|
|
||||||
cpu=`echo $target | sed -e 's/-.*//'`
|
cpu=`echo $target | sed -e 's/-.*//'`
|
||||||
|
|
||||||
echo $target
|
|
||||||
case $target in
|
case $target in
|
||||||
sparc-sun-solaris*)
|
sparc-sun-solaris*)
|
||||||
rtems_cpu=unix
|
rtems_cpu=unix
|
||||||
bsp=solaris2
|
bsp=solaris2
|
||||||
|
echo Not supported on unix port.
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
i[3456]86-pc-linux-gnu)
|
i[3456]86-pc-linux-gnu)
|
||||||
echo linux
|
echo linux
|
||||||
rtems_cpu=unix
|
rtems_cpu=unix
|
||||||
bsp=linux1
|
bsp=linux1
|
||||||
|
echo Not supported on unix port.
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
*-rtems*)
|
*-rtems*)
|
||||||
cpu=`echo $target | sed -e 's/-.*//'`
|
cpu=`echo $target | sed -e 's/-.*//'`
|
||||||
@@ -64,10 +68,20 @@ case $target in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case $ARCH in
|
||||||
|
*debug*) VARIANT=debug ;;
|
||||||
|
*profile*) VARIANT=profile ;;
|
||||||
|
*) VARIANT=optimized;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo Generating sizes for CPU ${cpu} on board ${board}
|
echo Size Information for the Following Configuration:
|
||||||
|
echo CPU: ${cpu}
|
||||||
|
echo BSP: ${board}
|
||||||
|
echo VARIANT: ${VARIANT}
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# KLUDGE to figure out at runtime how to echo a line without a
|
# KLUDGE to figure out at runtime how to echo a line without a
|
||||||
# newline.
|
# newline.
|
||||||
@@ -87,11 +101,11 @@ if [ ! -d ${board} ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#DIRLIST -- so greps for DIRLIST will find this file
|
#DIRLIST -- so greps for DIRLIST will find this file
|
||||||
CPUOBJ=c/src/exec/score/cpu/${rtems_cpu}/o-${bsp}
|
CPUOBJ=c/src/exec/score/cpu/${rtems_cpu}/${ARCH}
|
||||||
COREOBJ=c/src/exec/score/src/o-${bsp}
|
COREOBJ=c/src/exec/score/src/${ARCH}
|
||||||
RTEMSOBJ=c/src/exec/rtems/src/o-${bsp}
|
RTEMSOBJ=c/src/exec/rtems/src/${ARCH}
|
||||||
SAPIOBJ=c/src/exec/sapi/src/o-${bsp}
|
SAPIOBJ=c/src/exec/sapi/src/${ARCH}
|
||||||
OPTOBJ=${board}/lib
|
OPTOBJ=c/src/exec/rtems/optman/${ARCH}
|
||||||
|
|
||||||
MANLIST=" \
|
MANLIST=" \
|
||||||
${RTEMSOBJ}/clock.o \
|
${RTEMSOBJ}/clock.o \
|
||||||
|
|||||||
@@ -41,11 +41,18 @@ LDFLAGS +=
|
|||||||
CLEAN_ADDITIONS +=
|
CLEAN_ADDITIONS +=
|
||||||
CLOBBER_ADDITIONS +=
|
CLOBBER_ADDITIONS +=
|
||||||
|
|
||||||
|
EXTENSION_SUFFIX_$(TARGET_ARCH)_V=
|
||||||
|
EXTENSION_SUFFIX_$(TARGET_ARCH)-debug_V=_debug
|
||||||
|
EXTENSION_SUFFIX_$(TARGET_ARCH)-profile_V=_profile
|
||||||
|
|
||||||
|
EXTENSION_VARIANT=$(EXTENSION_SUFFIX_$(ARCH)_V)
|
||||||
|
|
||||||
|
|
||||||
$(LIB): ${OBJS}
|
$(LIB): ${OBJS}
|
||||||
$(make-library)
|
$(make-library)
|
||||||
-cd $(PROJECT_ROOT) ; \
|
cd $(PROJECT_ROOT) ; \
|
||||||
$(PROJECT_RELEASE)/bin/size_rtems $(RTEMS_BSP) \
|
$(PROJECT_RELEASE)/bin/size_rtems $(RTEMS_BSP) $(ARCH) \
|
||||||
>$(PROJECT_RELEASE)/lib/sizeinfo.txt
|
>$(PROJECT_RELEASE)/lib/sizeinfo$(EXTENSION_VARIANT).txt
|
||||||
|
|
||||||
all: ${ARCH} $(SRCS) $(LIB)
|
all: ${ARCH} $(SRCS) $(LIB)
|
||||||
$(INSTALL_VARIANT) -m 644 $(LIB) ${PROJECT_RELEASE}/lib
|
$(INSTALL_VARIANT) -m 644 $(LIB) ${PROJECT_RELEASE}/lib
|
||||||
|
|||||||
@@ -29,26 +29,30 @@ program_prefix=@program_prefix@
|
|||||||
gnusize=${program_prefix}size
|
gnusize=${program_prefix}size
|
||||||
|
|
||||||
# check usage
|
# check usage
|
||||||
if [ $# -ne 1 ] ; then
|
if [ $# -ne 2 ] ; then
|
||||||
echo usage ${0}: bsp
|
echo usage ${0}: bsp object_directory
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsp=$1
|
bsp=$1
|
||||||
board=$1
|
board=$1
|
||||||
|
ARCH=$2
|
||||||
|
|
||||||
cpu=`echo $target | sed -e 's/-.*//'`
|
cpu=`echo $target | sed -e 's/-.*//'`
|
||||||
|
|
||||||
echo $target
|
|
||||||
case $target in
|
case $target in
|
||||||
sparc-sun-solaris*)
|
sparc-sun-solaris*)
|
||||||
rtems_cpu=unix
|
rtems_cpu=unix
|
||||||
bsp=solaris2
|
bsp=solaris2
|
||||||
|
echo Not supported on unix port.
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
i[3456]86-pc-linux-gnu)
|
i[3456]86-pc-linux-gnu)
|
||||||
echo linux
|
echo linux
|
||||||
rtems_cpu=unix
|
rtems_cpu=unix
|
||||||
bsp=linux1
|
bsp=linux1
|
||||||
|
echo Not supported on unix port.
|
||||||
|
exit 0
|
||||||
;;
|
;;
|
||||||
*-rtems*)
|
*-rtems*)
|
||||||
cpu=`echo $target | sed -e 's/-.*//'`
|
cpu=`echo $target | sed -e 's/-.*//'`
|
||||||
@@ -64,10 +68,20 @@ case $target in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case $ARCH in
|
||||||
|
*debug*) VARIANT=debug ;;
|
||||||
|
*profile*) VARIANT=profile ;;
|
||||||
|
*) VARIANT=optimized;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo Generating sizes for CPU ${cpu} on board ${board}
|
echo Size Information for the Following Configuration:
|
||||||
|
echo CPU: ${cpu}
|
||||||
|
echo BSP: ${board}
|
||||||
|
echo VARIANT: ${VARIANT}
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# KLUDGE to figure out at runtime how to echo a line without a
|
# KLUDGE to figure out at runtime how to echo a line without a
|
||||||
# newline.
|
# newline.
|
||||||
@@ -87,11 +101,11 @@ if [ ! -d ${board} ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#DIRLIST -- so greps for DIRLIST will find this file
|
#DIRLIST -- so greps for DIRLIST will find this file
|
||||||
CPUOBJ=c/src/exec/score/cpu/${rtems_cpu}/o-${bsp}
|
CPUOBJ=c/src/exec/score/cpu/${rtems_cpu}/${ARCH}
|
||||||
COREOBJ=c/src/exec/score/src/o-${bsp}
|
COREOBJ=c/src/exec/score/src/${ARCH}
|
||||||
RTEMSOBJ=c/src/exec/rtems/src/o-${bsp}
|
RTEMSOBJ=c/src/exec/rtems/src/${ARCH}
|
||||||
SAPIOBJ=c/src/exec/sapi/src/o-${bsp}
|
SAPIOBJ=c/src/exec/sapi/src/${ARCH}
|
||||||
OPTOBJ=${board}/lib
|
OPTOBJ=c/src/exec/rtems/optman/${ARCH}
|
||||||
|
|
||||||
MANLIST=" \
|
MANLIST=" \
|
||||||
${RTEMSOBJ}/clock.o \
|
${RTEMSOBJ}/clock.o \
|
||||||
|
|||||||
Reference in New Issue
Block a user