Skip to content

Commit

Permalink
2009-12-19 Joel Sherrill <joel.sherrill@oarcorp.com>
Browse files Browse the repository at this point in the history
	* .cvsignore, Makefile.settings, do_it: New files.
	Can now build with do_it.  Crude but works.
  • Loading branch information
joelsherrill committed Dec 20, 2009
1 parent be64e2b commit c768d24
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions .cvsignore
@@ -0,0 +1 @@
RTEMS_SETTINGS
6 changes: 6 additions & 0 deletions ChangeLog
@@ -0,0 +1,6 @@
2009-12-19 Joel Sherrill <joel.sherrill@oarcorp.com>

* .cvsignore, Makefile.settings, do_it: New files.
Can now build with do_it. Crude but works.


27 changes: 27 additions & 0 deletions Makefile.settings
@@ -0,0 +1,27 @@
#
# Makefile to pull BSP specific information into a form the script can use
#

include $(RTEMS_MAKEFILE_PATH)/Makefile.inc

include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg

# Tool helpers
rtemsdir=${RTEMS_MAKEFILE_PATH}
CARGS += $(CPU_CFLAGS) $(LDFLAGS) $(AM_LDFLAGS)

all: RTEMS_SETTINGS

RTEMS_SETTINGS:
(echo "CC=\"$(CC)\""; \
echo "AS=$(AS)"; \
echo "TARGET=$(AS:%-as=%)" ; \
echo "CPU_CFLAGS=\"$(CPU_CFLAGS)\""; \
echo "CFLAGS=\"$(CFLAGS)\"" ; \
echo "LDFLAGS=\"$(LDFLAGS)\"" ; \
) >$@
@cat RTEMS_SETTINGS

clean:
rm -f RTEMS_SETTINGS
88 changes: 88 additions & 0 deletions do_it
@@ -0,0 +1,88 @@
#! /bin/sh
#
# $Id$
#

test_exit()
{
exit_code=$1
exit $exit_code
}

progname=${0##*/} # fast basename hack for ksh, bash

USAGE=\
"usage: $progname [ -opts ] test [ test ... ]
"

check_status()
{
if [ $1 -ne 0 ] ; then
shift
echo "FAILED: " "$*" >&2
exit 1
fi
}


if [ X${RTEMS_MAKEFILE_PATH} = X ] ; then
echo RTEMS_MAKEFILE_PATH not set
exit 1
fi

make -f Makefile.settings
check_status $? Could not generate RTEMS_SETTINGS

source ./RTEMS_SETTINGS

PREFIX=/tmp/joel

echo WARNING USING ${PREFIX} for install point!!!

case $1 in
configure)
cd jpeg-7
check_status $? Could not cd to jpeg-7

echo "configuring jpeg-7 ..."
CFLAGS="${CPU_CFLAGS}" ./configure --build=${TARGET} --prefix=${PREFIX} \
>c.log 2>&1
check_status $? Could not configure jpeg-7

cd ../tiff-3.9.2
check_status $? Could not cd to tiff-3.9.2

echo "configuring tiff-3.9.2 ..."
CFLAGS="${CPU_CFLAGS}" ./configure --build=${TARGET} --prefix=${PREFIX} \
>c.log 2>&1
check_status $? Could not configure tiff-3.9.2

cd ..
;;
build|clean|distclean|install)
action=${1}
if [ ${1} = build ] ; then
action=
fi

for d in jpeg-7 tiff-3.9.2
do
echo "Performing ${1} on ${d} ..."

cd ${d}
check_status $? Could not cd to ${d}
make ${action} >${1}.log 2>&1
check_status $? Could not ${1} in ${d}

#if [ ${1} = distclean ] ; then
# rm -f build.log c.log clean.log distclean.log
#fi
cd ..
done
;;
*)
check_status 1 Unknown action ${1}
;;
esac

exit 0

0 comments on commit c768d24

Please sign in to comment.