add new master Makefile
using the Makefile in the 'src' directory, we nwo build everything
This commit is contained in:
parent
50b5545d6e
commit
e61df0c60e
|
@ -0,0 +1,85 @@
|
|||
|
||||
# this is not really used as we don't do 'make install'. You can still specify
|
||||
# it in case you _want_ to manually 'make install' the target libosmocore.
|
||||
CROSS_INST_PREFIX=/usr/local/gnuarm-4.0.2/arm-elf
|
||||
|
||||
# this is the prefix of your cross-toolchain programs
|
||||
CROSS_TOOL_PREFIX=arm-elf-
|
||||
|
||||
TOPDIR=$(shell pwd)
|
||||
OSMOCORE_CONFIGURE_ENV= LIBOSMOCORE_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/.libs/libosmocore.a \
|
||||
LIBOSMOCORE_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include
|
||||
|
||||
all: libosmocore-host libosmocore-target layer2 osmocon firmware
|
||||
|
||||
libosmocore-host: shared/libosmocore/build-host/src/.libs/libosmocore.la
|
||||
|
||||
shared/libosmocore/build-host:
|
||||
mkdir $@
|
||||
|
||||
shared/libosmocore/configure: shared/libosmocore/configure.in
|
||||
cd shared/libosmocore && autoreconf -i
|
||||
|
||||
shared/libosmocore/build-host/Makefile: shared/libosmocore/configure shared/libosmocore/build-host
|
||||
cd shared/libosmocore/build-host && ../configure
|
||||
|
||||
shared/libosmocore/build-host/src/.libs/libosmocore.la: shared/libosmocore/build-host/Makefile
|
||||
cd shared/libosmocore/build-host && make
|
||||
|
||||
|
||||
libosmocore-target: shared/libosmocore/build-target/src/.libs/libosmocore.a
|
||||
|
||||
shared/libosmocore/build-target:
|
||||
mkdir $@
|
||||
|
||||
shared/libosmocore/build-target/Makefile: shared/libosmocore/configure shared/libosmocore/build-target
|
||||
cd shared/libosmocore/build-target && ../configure --host=arm-elf-linux --disable-shared
|
||||
|
||||
shared/libosmocore/build-target/src/.libs/libosmocore.a: shared/libosmocore/build-target/Makefile
|
||||
cd shared/libosmocore/build-target && make
|
||||
|
||||
|
||||
.PHONY: osmocon
|
||||
osmocon: host/osmocon/osmocon
|
||||
|
||||
host/osmocon/configure: host/osmocon/configure.ac
|
||||
cd host/osmocon && autoreconf -i
|
||||
|
||||
host/osmocon/Makefile: host/osmocon/configure
|
||||
cd host/osmocon && $(OSMOCORE_CONFIGURE_ENV) ./configure
|
||||
|
||||
host/osmocon/osmocon: host/osmocon/Makefile libosmocore-host
|
||||
make -C host/osmocon
|
||||
|
||||
|
||||
.PHONY: layer2
|
||||
layer2: host/layer2/layer2
|
||||
|
||||
host/layer2/configure: host/layer2/configure.ac
|
||||
cd host/layer2 && autoreconf -i
|
||||
|
||||
host/layer2/Makefile: host/layer2/configure
|
||||
cd host/layer2 && $(OSMOCORE_CONFIGURE_ENV) ./configure
|
||||
|
||||
host/layer2/layer2: host/layer2/Makefile libosmocore-host
|
||||
make -C host/layer2
|
||||
|
||||
|
||||
.PHONY: firmware
|
||||
firmware: libosmocore-target
|
||||
make -C target/firmware
|
||||
|
||||
|
||||
clean:
|
||||
make -C shared/libosmocore/build-host $@
|
||||
make -C shared/libosmocore/build-target $@
|
||||
make -C host/layer2 $@
|
||||
make -C host/osmocon $@
|
||||
make -C target/firmware $@
|
||||
|
||||
distclean:
|
||||
rm -rf shared/libosmocore/build-host
|
||||
rm -rf shared/libosmocore/build-target
|
||||
make -C host/layer2 $@
|
||||
make -C host/osmocon $@
|
||||
make -C target/firmware $@
|
53
src/build.sh
53
src/build.sh
|
@ -1,53 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# this is not really used as we don't do 'make install'. You can still specify
|
||||
# it in case you _want_ to manually 'make install' the target libosmocore.
|
||||
CROSS_INST_PREFIX=/usr/local/gnuarm-4.0.2/arm-elf
|
||||
|
||||
# this is the prefix of your cross-toolchain programs
|
||||
CROSS_TOOL_PREFIX=arm-elf-
|
||||
|
||||
TOPDIR=`pwd`
|
||||
|
||||
# autoreconf libosmocore if needed
|
||||
if [ ! -f shared/libosmocore/configure ]; then
|
||||
(cd shared/libosmocore && autoreconf -i)
|
||||
fi
|
||||
|
||||
echo "building the target (ARM) version of libosmocore"
|
||||
cd "$TOPDIR/shared/libosmocore"
|
||||
if [ ! -d build-target ]; then
|
||||
mkdir build-target
|
||||
fi
|
||||
cd build-target
|
||||
export CC="${CROSS_TOOL_PREFIX}gcc"
|
||||
export LD="${CROSS_TOOL_PREFIX}ld"
|
||||
export RANLIB="${CROSS_TOOL_PREFIX}ranlib"
|
||||
if [ ! -f Makefile ]; then
|
||||
../configure --host=arm-elf-linux --disable-shared --prefix="$CROSS_INST_PREFIX"
|
||||
fi
|
||||
make
|
||||
unset CC
|
||||
unset LD
|
||||
unset RANLIB
|
||||
|
||||
echo "building the host (X86) version of libosmocore"
|
||||
cd "$TOPDIR/shared/libosmocore"
|
||||
if [ ! -d build-host ]; then
|
||||
mkdir build-host
|
||||
fi
|
||||
cd build-host
|
||||
if [ ! -f Makefile ]; then
|
||||
../configure
|
||||
fi
|
||||
make
|
||||
|
||||
echo "building the target firmware "
|
||||
cd "$TOPDIR/target/firmware"
|
||||
make
|
||||
|
||||
echo "building osmocon"
|
||||
cd "$TOPDIR/host/osmocon"
|
||||
make
|
||||
|
||||
echo "READY!"
|
Loading…
Reference in New Issue