forked from Imagelibrary/rtems
Patches rtems-rc-20000118-5.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
that contains:
* The fix for the gen68360/network/Makefile.am
* automatically set permissions to 755 to scripts/buildall and
scripts-ada/buildall (I remembered a trick to achieve this :).
* automake support for libbsp/* and libcpu/* (Attn: This part will
finally break old-style configuration for all non-public cpus)
NOTES:
* This patch has only been tested for a random selection of BSPs (I
haven't rebuilt all toolchains yet).
* This patch is against rtem-cvs as of this morning (MET).
To apply:
patch -p1 <rtems-rc-20000118-5.diff
cvs rm -f ./c/src/lib/libbsp/Makefile.in
cvs rm -f ./c/src/lib/libbsp/shmdr/Makefile.in
cvs rm -f ./c/src/lib/libcpu/Makefile.in
cvs add ./c/src/lib/libbsp/Makefile.am
cvs add ./c/src/lib/libbsp/shmdr/Makefile.am
cvs add ./c/src/lib/libcpu/Makefile.am
./bootstrap
This commit is contained in:
19
c/src/lib/libbsp/Makefile.am
Normal file
19
c/src/lib/libbsp/Makefile.am
Normal file
@@ -0,0 +1,19 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
|
||||
|
||||
# If we are building a "real" BSP, then we need to descend into the
|
||||
# appropriate CPU specific directory. The bare BSP is a special
|
||||
# case which can be built for any CPU and it resides at the same
|
||||
# level as the CPUs. If we are building the bare BSP, then descend
|
||||
# into that directory.
|
||||
|
||||
SUBDIRS += shmdr @RTEMS_LIBBSP_CPU_SUBDIR@
|
||||
|
||||
EXTRA_DIST = MERGE.PROCEDURE bsp.am
|
||||
|
||||
include $(top_srcdir)/../../../../automake/subdirs.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
@@ -1,71 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
ACLOCAL_AMFLAGS = -I @RTEMS_TOPdir@/aclocal
|
||||
|
||||
RTEMS_ROOT = @RTEMS_ROOT@
|
||||
PROJECT_ROOT = @PROJECT_ROOT@
|
||||
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(RTEMS_ROOT)/make/directory.cfg
|
||||
|
||||
INSTALL_CHANGE = @INSTALL_CHANGE@
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
|
||||
|
||||
INSTALLDIRS = $(PROJECT_ROOT)/@RTEMS_BSP@/lib
|
||||
|
||||
$(INSTALLDIRS):
|
||||
@$(mkinstalldirs) $(INSTALLDIRS)
|
||||
|
||||
# shmdr is a portable shared memory MPCI layer
|
||||
# We only build it if HAS_MP was defined
|
||||
@HAS_MP_TRUE@MP_DRIVERS = shmdr
|
||||
|
||||
SUBDIRS = $(MP_DRIVERS)
|
||||
|
||||
# If we are building a "real" BSP, then we need to descend into the
|
||||
# appropriate CPU specific directory. The bare BSP is a special
|
||||
# case which can be built for any CPU and it resides at the same
|
||||
# level as the CPUs. If we are building the bare BSP, then descend
|
||||
# into that directory.
|
||||
|
||||
SUBDIRS += @RTEMS_LIBBSP_CPU_SUBDIR@
|
||||
|
||||
preinstall:
|
||||
@$(mkinstalldirs) $(PROJECT_ROOT)/@RTEMS_BSP@/lib
|
||||
@if test "@RTEMS_BSP@" = "bare"; then \
|
||||
$(INSTALL_CHANGE) -m 644 \
|
||||
$(srcdir)/bare/bsp_specs \
|
||||
$(PROJECT_ROOT)/@RTEMS_BSP@/lib; \
|
||||
else \
|
||||
$(INSTALL_CHANGE) -m 644 \
|
||||
$(srcdir)/$(RTEMS_CPU)/${RTEMS_BSP_FAMILY}/bsp_specs \
|
||||
$(PROJECT_ROOT)/@RTEMS_BSP@/lib; \
|
||||
fi
|
||||
|
||||
# HACK: Don't let them fail here
|
||||
dist:
|
||||
distdir:
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
@@ -8,12 +8,10 @@ RTEMS_TOP(../../../..)
|
||||
AC_CONFIG_AUX_DIR(../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
AM_INIT_AUTOMAKE(rtems-c-src-lib-libbsp,$RTEMS_VERSION,no)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
RTEMS_ENABLE_MULTIPROCESSING
|
||||
RTEMS_ENABLE_NETWORKING
|
||||
RTEMS_ENABLE_LIBCDIR
|
||||
RTEMS_ENABLE_BARE
|
||||
|
||||
@@ -30,7 +28,6 @@ RTEMS_CANONICALIZE_TOOLS
|
||||
|
||||
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
|
||||
RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
|
||||
RTEMS_CHECK_NETWORKING(RTEMS_BSP)
|
||||
|
||||
RTEMS_BSP_ALIAS(${RTEMS_BSP},bspdir)
|
||||
|
||||
@@ -57,45 +54,12 @@ else
|
||||
RTEMS_LIBBSP_CPU_SUBDIR=$RTEMS_CPU
|
||||
fi
|
||||
AC_SUBST(RTEMS_LIBBSP_CPU_SUBDIR)
|
||||
|
||||
if test ! -f ${srcdir}/${RTEMS_LIBBSP_CPU_SUBDIR}/configure.in
|
||||
then
|
||||
|
||||
# find all the Makefiles for the BSPs
|
||||
makefiles="$makefiles $RTEMS_CPU/Makefile"
|
||||
|
||||
if test -d "$srcdir/$bspcpudir$bspdir"; then
|
||||
RTEMS_CHECK_MAKEFILE(${bspcpudir}$bspdir)
|
||||
RTEMS_CHECK_MAKEFILE(${bspcpudir}shared)
|
||||
|
||||
# HACK: sed out bsp-tools from makefiles
|
||||
t="$bspcpudir$bspdir/tools"
|
||||
if test -d "$srcdir/$t"; then
|
||||
bsptools_cfgdirs="$bsptools_cfgdirs $t"
|
||||
makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([unable to find libbsp subdirectory ($bspdir) for ${RTEMS_BSP}])
|
||||
fi
|
||||
else
|
||||
cfg_subdirs="$RTEMS_LIBBSP_CPU_SUBDIR"
|
||||
fi
|
||||
|
||||
if test "$HAS_MP" = "yes"; then
|
||||
makefiles="$makefiles shmdr/Makefile"
|
||||
else
|
||||
# HACK: sed out shmsupp/Makefile from makefiles
|
||||
t="$bspcpudir$bspdir/shmsupp"
|
||||
makefiles=`echo "$makefiles" | sed -e "s%$t/.*Makefile%%g"`
|
||||
fi
|
||||
cfg_subdirs="$RTEMS_LIBBSP_CPU_SUBDIR"
|
||||
|
||||
AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes")
|
||||
|
||||
AC_CONFIG_SUBDIRS($bsptools_cfgdirs)
|
||||
|
||||
AC_CONFIG_SUBDIRS($cfg_subdirs)
|
||||
|
||||
# try to explicitly list a Makefile here
|
||||
# Explicitly list all Makefiles
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
$makefiles)
|
||||
shmdr/Makefile)
|
||||
|
||||
@@ -4,15 +4,12 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
PGM = ${ARCH}/network.rel
|
||||
PGM = $(ARCH)/network.rel
|
||||
|
||||
C_FILES = network.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
|
||||
|
||||
H_FILES =
|
||||
noinst_HEADERS = $(H_FILES)
|
||||
|
||||
network_rel_OBJECTS = $(C_O_FILES)
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
|
||||
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../../../../../../automake/lib.am
|
||||
@@ -23,14 +20,16 @@ include $(top_srcdir)/../../../../../../automake/lib.am
|
||||
|
||||
AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
|
||||
|
||||
$(PGM): ${network_rel_OBJECTS}
|
||||
$(PGM): $(OBJS)
|
||||
$(make-rel)
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||
|
||||
if HAS_NETWORKING
|
||||
all-local: ${ARCH} $(PGM)
|
||||
all-local: $(ARCH) $(OBJS) $(PGM)
|
||||
endif
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||
.PRECIOUS: $(PGM)
|
||||
|
||||
EXTRA_DIST = network.c
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
PGM = ${ARCH}/shmsupp.rel
|
||||
PGM = $(ARCH)/shmsupp.rel
|
||||
|
||||
C_FILES = addrconv.c getcfg.c lock.c mpisr.c
|
||||
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
|
||||
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
@@ -18,14 +18,16 @@ include $(top_srcdir)/../../../../../../automake/lib.am
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
$(PGM): ${OBJS}
|
||||
$(PGM): $(OBJS)
|
||||
$(make-rel)
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||
|
||||
if HAS_MP
|
||||
all-local: ${ARCH} $(OBJS) $(PGM)
|
||||
all-local: $(ARCH) $(OBJS) $(PGM)
|
||||
endif
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||
.PRECIOUS: $(PGM)
|
||||
|
||||
EXTRA_DIST = addrconv.c getcfg.c lock.c mpisr.c
|
||||
|
||||
|
||||
57
c/src/lib/libbsp/shmdr/Makefile.am
Normal file
57
c/src/lib/libbsp/shmdr/Makefile.am
Normal file
@@ -0,0 +1,57 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
PGM = $(ARCH)/shmdr.rel
|
||||
|
||||
C_FILES = addlq.c cnvpkt.c getlq.c dump.c fatal.c getpkt.c init.c initlq.c \
|
||||
intr.c mpisr.c poll.c receive.c retpkt.c send.c setckvec.c
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
|
||||
|
||||
H_FILES = shm_driver.h mpci.h
|
||||
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(top_srcdir)/../../../../automake/lib.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
$(PGM): $(OBJS)
|
||||
$(make-rel)
|
||||
|
||||
$(PROJECT_RELEASE)/lib/shmdr$(LIB_VARIANT).rel: $(ARCH)/shmdr.rel
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by
|
||||
# ../$(RTEMS_BSP_FAMILY)/wrapup/Makefile
|
||||
|
||||
$(PROJECT_INCLUDE):
|
||||
$(mkinstalldirs) $@
|
||||
|
||||
$(PROJECT_INCLUDE)/shm_driver.h: shm_driver.h
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
$(PROJECT_INCLUDE)/mpci.h: mpci.h
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE) $(PROJECT_INCLUDE)/shm_driver.h \
|
||||
$(PROJECT_INCLUDE)/mpci.h
|
||||
|
||||
TMPINSTALL_FILES += $(PROJECT_RELEASE)/lib/shmdr$(LIB_VARIANT).rel
|
||||
|
||||
if HAS_MP
|
||||
all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
|
||||
endif
|
||||
|
||||
.PRECIOUS: $(PGM)
|
||||
|
||||
EXTRA_DIST = README addlq.c cnvpkt.c dump.c fatal.c getlq.c getpkt.c init.c \
|
||||
initlq.c intr.c mpci.h mpisr.c poll.c receive.c retpkt.c send.c \
|
||||
setckvec.c shm_driver.h
|
||||
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
@@ -1,79 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ..
|
||||
subdir = shmdr
|
||||
|
||||
RTEMS_ROOT = @RTEMS_ROOT@
|
||||
PROJECT_ROOT = @PROJECT_ROOT@
|
||||
|
||||
VPATH = @srcdir@
|
||||
|
||||
PGM = ${ARCH}/shmdr.rel
|
||||
|
||||
# C source names, if any, go here -- minus the .c
|
||||
C_PIECES = addlq cnvpkt getlq dump fatal getpkt init initlq intr mpisr poll \
|
||||
receive retpkt send setckvec
|
||||
C_FILES = $(C_PIECES:%=%.c)
|
||||
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
|
||||
|
||||
H_PIECES = shm_driver mpci
|
||||
H_FILES = $(H_PIECES:%=$(srcdir)/%.h)
|
||||
|
||||
SRCS = $(C_FILES) $(H_FILES)
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(RTEMS_ROOT)/make/leaf.cfg
|
||||
|
||||
INSTALL_CHANGE = @INSTALL_CHANGE@
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
|
||||
|
||||
INSTALLDIRS = $(PROJECT_INCLUDE)
|
||||
|
||||
$(INSTALLDIRS):
|
||||
@$(mkinstalldirs) $(INSTALLDIRS)
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
DEFINES +=
|
||||
CPPFLAGS +=
|
||||
CFLAGS +=
|
||||
|
||||
LD_PATHS +=
|
||||
LD_LIBS +=
|
||||
LDFLAGS +=
|
||||
|
||||
#
|
||||
# Add your list of files to delete here. The config files
|
||||
# already know how to delete some stuff, so you may want
|
||||
# to just run 'make clean' first to see what gets missed.
|
||||
# 'make clobber' already includes 'make clean'
|
||||
#
|
||||
|
||||
CLEAN_ADDITIONS +=
|
||||
CLOBBER_ADDITIONS +=
|
||||
|
||||
$(PGM): ${OBJS}
|
||||
$(make-rel)
|
||||
|
||||
all: preinstall ${ARCH} $(SRCS) $(PGM)
|
||||
$(INSTALL_VARIANT) -m 644 $(PGM) $(PROJECT_RELEASE)/lib
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by
|
||||
# ../$(RTEMS_BSP_FAMILY)/wrapup/Makefile
|
||||
|
||||
preinstall:
|
||||
@$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
|
||||
|
||||
EXTRA_DIST = README
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
11
c/src/lib/libcpu/Makefile.am
Normal file
11
c/src/lib/libcpu/Makefile.am
Normal file
@@ -0,0 +1,11 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
|
||||
|
||||
SUBDIRS = @RTEMS_CPU_SUBDIR@
|
||||
|
||||
include $(top_srcdir)/../../../../automake/subdirs.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
@@ -1,41 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
ACLOCAL_AMFLAGS = -I @RTEMS_TOPdir@/aclocal
|
||||
|
||||
RTEMS_ROOT = @RTEMS_ROOT@
|
||||
PROJECT_ROOT = @PROJECT_ROOT@
|
||||
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||
include $(RTEMS_ROOT)/make/directory.cfg
|
||||
|
||||
INSTALL_CHANGE = @INSTALL_CHANGE@
|
||||
|
||||
SUBDIRS = $(wildcard $(RTEMS_CPU))
|
||||
|
||||
#HACK: Don't let them fail here
|
||||
dist:
|
||||
distdir:
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
@@ -7,37 +7,20 @@ AC_INIT(README)
|
||||
RTEMS_TOP(../../../..)
|
||||
AC_CONFIG_AUX_DIR(../../../..)
|
||||
|
||||
AC_PROG_MAKE_SET
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
|
||||
AM_INIT_AUTOMAKE(rtems-c-src-lib-libcpu,$RTEMS_VERSION,no)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
RTEMS_ENABLE_LIBCDIR
|
||||
RTEMS_ENABLE_BARE
|
||||
|
||||
RTEMS_ENV_RTEMSBSP
|
||||
|
||||
AC_PROG_INSTALL
|
||||
|
||||
RTEMS_CHECK_CPU
|
||||
RTEMS_CANONICAL_HOST
|
||||
|
||||
RTEMS_PROJECT_ROOT
|
||||
|
||||
dnl check target cc
|
||||
RTEMS_PROG_CC_FOR_TARGET
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
|
||||
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
|
||||
|
||||
# find all the CPU dependent library Makefiles
|
||||
if test -f $srcdir/$RTEMS_CPU/configure.in; then
|
||||
cfg_subdirs="$RTEMS_CPU"
|
||||
else
|
||||
RTEMS_CHECK_MAKEFILE($RTEMS_CPU)
|
||||
RTEMS_CPU_SUBDIR="$RTEMS_CPU"
|
||||
fi
|
||||
AC_CONFIG_SUBDIRS($cfg_subdirs)
|
||||
AC_SUBST(RTEMS_CPU_SUBDIR)
|
||||
|
||||
AC_CONFIG_SUBDIRS($RTEMS_CPU_SUBDIR)
|
||||
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
$makefiles)
|
||||
Makefile)
|
||||
|
||||
Reference in New Issue
Block a user