2002-04-26 13:45:55 +02:00
|
|
|
# Makefile for a simple busybox/uClibc root filesystem
|
2001-12-22 01:56:11 +01:00
|
|
|
#
|
2004-01-30 00:21:00 +01:00
|
|
|
# Copyright (C) 2001-2004 Erik Andersen <andersen@codepoet.org>
|
2002-04-26 13:45:55 +02:00
|
|
|
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
|
2004-09-03 02:49:43 +02:00
|
|
|
# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
|
2001-12-22 01:56:11 +01:00
|
|
|
#
|
2002-04-26 13:45:55 +02:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Library General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 2 of the
|
|
|
|
# License, or (at your option) any later version.
|
2001-12-22 01:56:11 +01:00
|
|
|
#
|
2002-04-26 13:45:55 +02:00
|
|
|
# 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
|
|
|
|
# Library General Public License for more details.
|
2001-12-22 01:56:11 +01:00
|
|
|
#
|
2002-04-26 13:45:55 +02:00
|
|
|
# You should have received a copy of the GNU Library General Public
|
|
|
|
# License along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
# USA
|
2001-12-22 01:56:11 +01:00
|
|
|
|
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# EDIT this stuff to suit your system and preferences
|
|
|
|
#
|
2004-01-30 00:21:00 +01:00
|
|
|
# Use := when possible to get precomputation, thereby
|
2002-04-26 13:45:55 +02:00
|
|
|
# speeding up the build process.
|
|
|
|
#
|
|
|
|
#############################################################
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2004-09-03 02:49:43 +02:00
|
|
|
# What sort of target system shall we compile this for?
|
|
|
|
#
|
2002-04-26 13:45:55 +02:00
|
|
|
ARCH:=i386
|
|
|
|
#ARCH:=arm
|
2004-09-03 03:12:33 +02:00
|
|
|
#ARCH:=armeb
|
2003-11-01 06:34:41 +01:00
|
|
|
#ARCH:=mips
|
2003-11-20 21:14:25 +01:00
|
|
|
#ARCH:=mipsel
|
2003-01-17 05:31:36 +01:00
|
|
|
#ARCH:=powerpc
|
2003-11-11 02:46:50 +01:00
|
|
|
#ARCH:=sh4
|
|
|
|
#ARCH:=cris
|
2003-11-30 21:21:47 +01:00
|
|
|
#ARCH:=sh64
|
2003-11-11 02:46:50 +01:00
|
|
|
#ARCH:=m68k
|
|
|
|
#ARCH:=v850
|
|
|
|
#ARCH:=sparc
|
2002-04-26 13:45:55 +02:00
|
|
|
#ARCH:=whatever
|
2002-01-03 05:51:43 +01:00
|
|
|
|
2004-09-03 02:49:43 +02:00
|
|
|
# Choose the kernel headers to use for kernel-headers target. This is
|
|
|
|
# ignored if you are building your own kernel or using the system kernel.
|
|
|
|
#
|
2004-09-22 19:07:07 +02:00
|
|
|
#DEFAULT_KERNEL_HEADERS:=2.4.25
|
|
|
|
DEFAULT_KERNEL_HEADERS:=2.4.27
|
2004-09-03 02:49:43 +02:00
|
|
|
#DEFAULT_KERNEL_HEADERS:=2.6.7
|
2004-09-10 20:58:11 +02:00
|
|
|
#DEFAULT_KERNEL_HEADERS:=2.6.8
|
2004-09-03 02:49:43 +02:00
|
|
|
|
|
|
|
# Choose gcc version.
|
2004-01-14 11:03:44 +01:00
|
|
|
# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc.
|
|
|
|
# WARNING -- 2.95 does not currently build natively for the target.
|
2004-09-03 02:49:43 +02:00
|
|
|
#
|
|
|
|
#GCC_VERSION:=2.95
|
|
|
|
#GCC_VERSION:=3.3.3
|
|
|
|
#GCC_VERSION:=3.3.4
|
|
|
|
#GCC_VERSION:=3.4.0
|
2004-09-10 20:58:11 +02:00
|
|
|
#GCC_VERSION:=3.4.1
|
|
|
|
GCC_VERSION:=3.4.2
|
2004-09-03 02:49:43 +02:00
|
|
|
|
|
|
|
# Choose binutils version.
|
|
|
|
#
|
|
|
|
#BINUTILS_VERSION:=2.14.90.0.6
|
|
|
|
#BINUTILS_VERSION:=2.14.90.0.7
|
|
|
|
#BINUTILS_VERSION:=2.14.90.0.8
|
|
|
|
#BINUTILS_VERSION:=2.15
|
|
|
|
#BINUTILS_VERSION:=2.15.90.0.1
|
|
|
|
#BINUTILS_VERSION:=2.15.90.0.1.1
|
|
|
|
#BINUTILS_VERSION:=2.15.90.0.2
|
2004-09-10 20:58:11 +02:00
|
|
|
#BINUTILS_VERSION:=2.15.90.0.3
|
2004-09-03 02:49:43 +02:00
|
|
|
#BINUTILS_VERSION:=2.15.91.0.1
|
2004-09-10 20:58:11 +02:00
|
|
|
BINUTILS_VERSION:=2.15.91.0.2
|
2004-09-30 03:08:50 +02:00
|
|
|
#BINUTILS_VERSION:=2.15.92.0.2
|
2004-09-03 02:49:43 +02:00
|
|
|
|
|
|
|
# Choose gdb version.
|
|
|
|
#
|
|
|
|
#GDB_VERSION:=5.3
|
|
|
|
GDB_VERSION:=6.1.1
|
|
|
|
#GDB_VERSION:=6.2
|
2004-09-30 03:08:50 +02:00
|
|
|
#GDB_VERSION:=6.2.1
|
2004-09-03 02:49:43 +02:00
|
|
|
|
2003-02-04 13:37:32 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
# Enable this to use the uClibc daily snapshot instead of a released
|
|
|
|
# version. Daily snapshots may contain new features and bugfixes. Or
|
2004-09-03 02:49:43 +02:00
|
|
|
# they may not even compile at all, depending on what Erik is doing.
|
2002-01-03 05:51:43 +01:00
|
|
|
|
2004-09-03 02:49:43 +02:00
|
|
|
# Do you wish to use the latest release (), latest snapshot (snapshot),
|
|
|
|
# or the snapshot from a specific date (yyyymmdd)? Note that snapshots
|
|
|
|
# may contain new features and bugfixes. Or they may not even compile
|
|
|
|
# at all, depending on what Erik and Manuel are doing.
|
|
|
|
#
|
|
|
|
#USE_UCLIBC_SNAPSHOT:=
|
|
|
|
USE_UCLIBC_SNAPSHOT:=snapshot
|
|
|
|
#USE_UCLIBC_SNAPSHOT:=20040807
|
|
|
|
|
|
|
|
# Do you wish to use the latest release (), latest snapshot (snapshot),
|
|
|
|
# or the snapshot from a specific date (yyyymmdd)? Note that snapshots
|
|
|
|
# may contain new features and bugfixes. Or they may not even compile
|
|
|
|
# at all...
|
|
|
|
#
|
|
|
|
#USE_BUSYBOX_SNAPSHOT:=
|
|
|
|
USE_BUSYBOX_SNAPSHOT:=snapshot
|
|
|
|
#USE_BUSYBOX_SNAPSHOT:=20040807
|
2002-04-26 23:20:45 +02:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
# Enable large file (files > 2 GB) support
|
2003-01-03 07:44:03 +01:00
|
|
|
BUILD_WITH_LARGEFILE:=true
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-11-21 00:16:10 +01:00
|
|
|
# Command used to download source code
|
|
|
|
WGET:=wget --passive-ftp
|
|
|
|
|
2003-01-17 05:31:36 +01:00
|
|
|
# Optimize toolchain for which type of CPU?
|
2004-01-14 11:03:44 +01:00
|
|
|
OPTIMIZE_FOR_CPU=$(ARCH)
|
|
|
|
#OPTIMIZE_FOR_CPU=i686
|
2004-01-16 20:08:39 +01:00
|
|
|
# Note... gcc 2.95 does not seem to like anything higher than i586.
|
|
|
|
#OPTIMIZE_FOR_CPU=i586
|
2004-01-14 11:03:44 +01:00
|
|
|
#OPTIMIZE_FOR_CPU=whatever
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2004-09-03 02:49:43 +02:00
|
|
|
# Might be worth experimenting with for gcc 3.4.x.
|
|
|
|
GCC_WITH_CPU:=
|
|
|
|
GCC_WITH_ARCH:=
|
|
|
|
GCC_WITH_TUNE:=
|
|
|
|
|
|
|
|
#GCC_WITH_CPU:=--with-cpu=
|
|
|
|
#GCC_WITH_ARCH:=--with-arch=
|
|
|
|
#GCC_WITH_TUNE:=--with-tune=
|
|
|
|
|
2003-11-01 06:34:41 +01:00
|
|
|
# Soft floating point options.
|
|
|
|
# Notes:
|
2004-09-14 13:52:26 +02:00
|
|
|
# Builds for gcc 3.4.x.
|
|
|
|
# Can build for gcc 3.3.x for mips, mipsel, powerpc, and arm (special)
|
|
|
|
# by using custom specs files (currently for 3.3.4 only).
|
|
|
|
# NOTE!!! The libfloat stuff is currently removed from uClibc. The
|
|
|
|
# arm soft float for 3.3.x will require reenabling it.
|
2004-01-16 20:08:39 +01:00
|
|
|
# (i386 support will be added back in at some point.)
|
2003-11-01 06:34:41 +01:00
|
|
|
# Only tested with multilib enabled.
|
|
|
|
# For i386, long double is the same as double (64 bits). While this
|
|
|
|
# is unusual for x86, it seemed the best approach considering the
|
|
|
|
# limitations in the gcc floating point emulation library.
|
|
|
|
# For arm, soft float uses the usual libfloat routines.
|
2003-11-30 21:21:47 +01:00
|
|
|
# (Un)comment the appropriate line below.
|
|
|
|
#SOFT_FLOAT:=true
|
2003-11-20 21:14:25 +01:00
|
|
|
SOFT_FLOAT:=false
|
2003-11-01 06:34:41 +01:00
|
|
|
|
|
|
|
TARGET_OPTIMIZATION=-Os
|
|
|
|
TARGET_DEBUGGING= #-g
|
|
|
|
|
2004-02-11 04:32:34 +01:00
|
|
|
# Currently the unwind stuff seems to work for staticly linked apps but
|
|
|
|
# not dynamic. So use setjmp/longjmp exceptions by default.
|
|
|
|
GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
|
|
|
|
#GCC_USE_SJLJ_EXCEPTIONS:=
|
|
|
|
|
2003-01-17 05:31:36 +01:00
|
|
|
# Any additional gcc options you may want to include....
|
2003-11-30 21:21:47 +01:00
|
|
|
EXTRA_GCC_CONFIG_OPTIONS:=
|
2003-01-17 05:31:36 +01:00
|
|
|
|
2003-09-14 13:38:35 +02:00
|
|
|
# Enable the following if you want locale/gettext/i18n support.
|
2003-11-30 21:21:47 +01:00
|
|
|
# NOTE! Currently the pregnerated locale stuff only works for x86!
|
2003-09-14 13:38:35 +02:00
|
|
|
#ENABLE_LOCALE:=true
|
|
|
|
ENABLE_LOCALE:=false
|
|
|
|
|
|
|
|
# If you want multilib enabled, enable this...
|
|
|
|
MULTILIB:=--enable-multilib
|
|
|
|
|
2003-11-30 21:21:47 +01:00
|
|
|
# Build/install c++ compiler and libstdc++?
|
|
|
|
INSTALL_LIBSTDCPP:=true
|
2003-09-03 09:18:18 +02:00
|
|
|
|
2004-02-11 04:32:34 +01:00
|
|
|
# Build/install java compiler and libgcj? (requires c++)
|
|
|
|
# WARNING!!! DOES NOT BUILD FOR TARGET WITHOUT INTERVENTION!!! mjn3
|
|
|
|
#INSTALL_LIBGCJ:=true
|
|
|
|
INSTALL_LIBGCJ:=false
|
|
|
|
|
2003-10-18 13:09:54 +02:00
|
|
|
# For SMP machines some stuff can be run in parallel
|
|
|
|
#JLEVEL=-j3
|
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# The list of stuff to build for the target filesystem
|
|
|
|
#
|
|
|
|
#############################################################
|
2003-11-19 18:17:56 +01:00
|
|
|
TARGETS:=host-sed
|
2003-11-30 21:21:47 +01:00
|
|
|
|
2004-09-03 02:49:43 +02:00
|
|
|
TARGETS+=uclibc-configured binutils gcc ccache
|
2003-01-03 07:44:03 +01:00
|
|
|
|
2004-04-12 23:33:59 +02:00
|
|
|
# Are you building your own kernel? Perhaps you have a kernel
|
|
|
|
# you have already configured and you want to use that? The
|
|
|
|
# default is to just use a set of known working kernel headers.
|
|
|
|
# Unless you want to build a kernel, I recommend just using
|
|
|
|
# that...
|
2003-09-14 13:38:35 +02:00
|
|
|
TARGETS+=kernel-headers
|
2003-01-06 16:40:38 +01:00
|
|
|
#TARGETS+=linux
|
|
|
|
|
2002-11-14 13:16:04 +01:00
|
|
|
# The default minimal set
|
2004-04-21 21:53:08 +02:00
|
|
|
TARGETS+=busybox #tinylogin
|
2002-11-14 13:16:04 +01:00
|
|
|
|
|
|
|
# Openssh...
|
|
|
|
#TARGETS+=zlib openssl openssh
|
2003-09-10 15:04:12 +02:00
|
|
|
# Dropbear sshd is much smaller than openssl + openssh
|
|
|
|
#TARGETS+=dropbear_sshd
|
2002-11-14 13:16:04 +01:00
|
|
|
|
|
|
|
# Everything needed to build a full uClibc development system!
|
2003-02-12 11:45:37 +01:00
|
|
|
#TARGETS+=coreutils findutils bash make diffutils patch sed
|
2003-12-02 20:20:12 +01:00
|
|
|
#TARGETS+=ed flex bison file gawk tar grep bzip2
|
2003-09-26 23:18:46 +02:00
|
|
|
|
|
|
|
#If you want a development system, you probably want gcc built
|
|
|
|
# with uClibc so it can run within your dev system...
|
2004-09-03 02:49:43 +02:00
|
|
|
#TARGETS+=gcc_target ccache_target
|
2002-11-14 13:16:04 +01:00
|
|
|
|
2003-01-08 19:22:25 +01:00
|
|
|
# Of course, if you are installing a development system, you
|
|
|
|
# may want some header files so you can compile stuff....
|
|
|
|
#TARGETS+=ncurses-headers zlib-headers openssl-headers
|
|
|
|
|
2003-01-09 03:34:10 +01:00
|
|
|
# More development system stuff for those that want it
|
|
|
|
#TARGETS+=m4 autoconf automake libtool
|
|
|
|
|
2004-09-10 20:58:11 +02:00
|
|
|
# Some nice debugging tools for the host
|
|
|
|
#TARGETS+=gdbclient
|
|
|
|
# Some nice debugging tools for the target
|
|
|
|
#TARGETS+=gdbserver gdb_target
|
|
|
|
#TARGETS+=strace ltrace
|
2002-11-14 13:16:04 +01:00
|
|
|
|
2003-01-17 05:45:35 +01:00
|
|
|
# The Valgrind debugger (x86 only)
|
2002-11-14 13:16:04 +01:00
|
|
|
#TARGETS+=valgrind
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2003-01-19 08:49:24 +01:00
|
|
|
# Some stuff for access points and firewalls
|
2003-02-19 08:07:53 +01:00
|
|
|
#TARGETS+=iptables hostap wtools dhcp_relay bridge
|
2003-06-04 22:49:24 +02:00
|
|
|
#TARGETS+=iproute2 netsnmp
|
2003-01-19 08:49:24 +01:00
|
|
|
|
2003-01-18 22:52:46 +01:00
|
|
|
# Run customize.mk at the very end to add your own special config.
|
|
|
|
# This is useful for making your own distro within the buildroot
|
|
|
|
# process.
|
|
|
|
# TARGETS+=customize
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
2002-04-26 13:45:55 +02:00
|
|
|
# Pick your root filesystem type.
|
2003-01-18 22:52:46 +01:00
|
|
|
#
|
|
|
|
#############################################################
|
2004-09-03 02:49:43 +02:00
|
|
|
#TARGETS+=ext2root
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2003-01-17 05:31:36 +01:00
|
|
|
# Must mount cramfs with 'ramdisk_blocksize=4096'
|
|
|
|
#TARGETS+=cramfsroot
|
|
|
|
|
2004-01-30 00:21:00 +01:00
|
|
|
# You may need to edit make/jffs2root.mk to change target
|
2003-01-17 05:31:36 +01:00
|
|
|
# endian-ness or similar, but this is sufficient for most
|
|
|
|
# things as-is...
|
|
|
|
#TARGETS+=jffs2root
|
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
2004-01-30 00:21:00 +01:00
|
|
|
# You should probably leave this stuff alone unless you know
|
2002-04-26 13:45:55 +02:00
|
|
|
# what you are doing.
|
|
|
|
#
|
|
|
|
#############################################################
|
2003-11-01 06:34:41 +01:00
|
|
|
|
2003-11-20 21:14:25 +01:00
|
|
|
ifeq ($(SOFT_FLOAT),true)
|
2004-09-03 02:49:43 +02:00
|
|
|
# gcc 3.4.x soft float configuration is different than previous versions.
|
|
|
|
ifeq ($(findstring 3.4.,$(GCC_VERSION)),3.4.)
|
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
|
|
|
|
else
|
2003-11-21 03:30:18 +01:00
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=--without-float
|
2004-09-03 02:49:43 +02:00
|
|
|
endif
|
2003-11-21 03:30:18 +01:00
|
|
|
TARGET_SOFT_FLOAT:=-msoft-float
|
2003-11-21 03:28:21 +01:00
|
|
|
ARCH_FPU_SUFFIX:=_nofpu
|
|
|
|
else
|
2003-11-21 03:30:18 +01:00
|
|
|
SOFT_FLOAT_CONFIG_OPTION:=
|
|
|
|
TARGET_SOFT_FLOAT:=
|
2003-11-21 03:28:21 +01:00
|
|
|
ARCH_FPU_SUFFIX:=
|
2003-11-20 21:14:25 +01:00
|
|
|
endif
|
|
|
|
|
2004-02-11 04:32:34 +01:00
|
|
|
ifeq ($(INSTALL_LIBGCJ),true)
|
|
|
|
INSTALL_LIBSTDCPP:=true
|
|
|
|
endif
|
|
|
|
|
2003-11-30 21:21:47 +01:00
|
|
|
# WARNING -- uClibc currently disables large file support on cris.
|
|
|
|
ifeq ("$(strip $(ARCH))","cris")
|
|
|
|
BUILD_WITH_LARGEFILE:=false
|
|
|
|
endif
|
|
|
|
|
2003-11-17 02:29:27 +01:00
|
|
|
ifneq ($(BUILD_WITH_LARGEFILE),true)
|
2004-01-30 00:21:00 +01:00
|
|
|
DISABLE_LARGEFILE= --disable-largefile
|
2003-11-17 02:29:27 +01:00
|
|
|
endif
|
2004-01-16 20:08:39 +01:00
|
|
|
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
|
2003-11-17 02:29:27 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
HOSTCC:=gcc
|
2003-01-19 08:49:24 +01:00
|
|
|
BASE_DIR:=${shell pwd}
|
2002-04-26 13:45:55 +02:00
|
|
|
SOURCE_DIR:=$(BASE_DIR)/sources
|
|
|
|
DL_DIR:=$(SOURCE_DIR)/dl
|
|
|
|
PATCH_DIR=$(SOURCE_DIR)/patches
|
2003-11-01 06:34:41 +01:00
|
|
|
BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
|
2002-04-26 13:45:55 +02:00
|
|
|
TARGET_DIR:=$(BUILD_DIR)/root
|
2003-02-12 20:49:55 +01:00
|
|
|
STAGING_DIR=$(BUILD_DIR)/staging_dir
|
2003-11-01 06:34:41 +01:00
|
|
|
TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)
|
2003-02-12 20:49:55 +01:00
|
|
|
TARGET_PATH=$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin
|
2003-11-01 06:34:41 +01:00
|
|
|
IMAGE:=$(BASE_DIR)/root_fs_$(ARCH)$(ARCH_FPU_SUFFIX)
|
2004-01-14 11:03:44 +01:00
|
|
|
REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
|
|
|
|
GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
|
|
|
|
KERNEL_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-
|
|
|
|
TARGET_CROSS=$(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-
|
2004-01-16 20:08:39 +01:00
|
|
|
TARGET_CC=$(TARGET_CROSS)gcc
|
2004-01-14 11:03:44 +01:00
|
|
|
STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
|
|
|
|
|
|
|
|
|
2003-03-04 08:56:11 +01:00
|
|
|
HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
|
|
|
|
-e 's/sparc.*/sparc/' \
|
|
|
|
-e 's/arm.*/arm/g' \
|
|
|
|
-e 's/m68k.*/m68k/' \
|
|
|
|
-e 's/ppc/powerpc/g' \
|
|
|
|
-e 's/v850.*/v850/g' \
|
|
|
|
-e 's/sh[234]/sh/' \
|
|
|
|
-e 's/mips-.*/mips/' \
|
|
|
|
-e 's/mipsel-.*/mipsel/' \
|
|
|
|
-e 's/cris.*/cris/' \
|
2003-09-30 22:59:17 +02:00
|
|
|
-e 's/i[3-9]86/i386/' \
|
2003-03-04 08:56:11 +01:00
|
|
|
)
|
|
|
|
GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
|
2003-03-04 20:16:19 +01:00
|
|
|
TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
|
|
|
|
AR=$(TARGET_CROSS)ar \
|
|
|
|
AS=$(TARGET_CROSS)as \
|
|
|
|
LD=$(TARGET_CROSS)ld \
|
|
|
|
NM=$(TARGET_CROSS)nm \
|
2004-01-16 20:08:39 +01:00
|
|
|
CC=$(TARGET_CROSS)gcc \
|
|
|
|
GCC=$(TARGET_CROSS)gcc \
|
|
|
|
CXX=$(TARGET_CROSS)g++ \
|
2003-03-04 20:16:19 +01:00
|
|
|
RANLIB=$(TARGET_CROSS)ranlib
|
2004-01-16 20:08:39 +01:00
|
|
|
|
2003-09-14 13:38:35 +02:00
|
|
|
ifeq ($(ENABLE_LOCALE),true)
|
|
|
|
DISABLE_NLS:=
|
|
|
|
else
|
|
|
|
DISABLE_NLS:=--disable-nls
|
|
|
|
endif
|
|
|
|
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
all: world
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
|
2003-02-19 09:56:04 +01:00
|
|
|
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
|
2002-04-26 13:45:55 +02:00
|
|
|
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2003-02-19 09:56:04 +01:00
|
|
|
.PHONY: all world clean dirclean distclean source $(TARGETS) \
|
|
|
|
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE)
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
include make/*.mk
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
2004-01-30 00:21:00 +01:00
|
|
|
# staging and target directories do NOT list these as
|
2002-04-26 13:45:55 +02:00
|
|
|
# dependancies anywhere else
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
$(DL_DIR):
|
|
|
|
mkdir $(DL_DIR)
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
$(BUILD_DIR):
|
|
|
|
mkdir $(BUILD_DIR)
|
2002-01-05 21:26:15 +01:00
|
|
|
|
2004-09-03 02:49:43 +02:00
|
|
|
$(TOOL_BUILD_DIR):
|
|
|
|
mkdir $(TOOL_BUILD_DIR)
|
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
$(STAGING_DIR):
|
|
|
|
rm -rf $(STAGING_DIR)
|
2003-02-12 10:59:22 +01:00
|
|
|
mkdir -p $(STAGING_DIR)/lib
|
2004-09-03 02:49:43 +02:00
|
|
|
mkdir -p $(STAGING_DIR)/include
|
|
|
|
mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
|
|
|
|
ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
|
2001-12-22 01:56:11 +01:00
|
|
|
|
2002-04-26 13:45:55 +02:00
|
|
|
$(TARGET_DIR):
|
2001-12-22 01:56:11 +01:00
|
|
|
rm -rf $(TARGET_DIR)
|
2002-04-26 13:45:55 +02:00
|
|
|
zcat $(SOURCE_DIR)/skel.tar.gz | tar -C $(BUILD_DIR) -xf -
|
|
|
|
cp -a $(SOURCE_DIR)/target_skeleton/* $(TARGET_DIR)/
|
2001-12-22 02:17:09 +01:00
|
|
|
-find $(TARGET_DIR) -type d -name CVS -exec rm -rf {} \; > /dev/null 2>&1
|
2002-04-26 13:45:55 +02:00
|
|
|
|
2003-02-19 09:56:04 +01:00
|
|
|
source: $(TARGETS_SOURCE)
|
2002-04-26 13:45:55 +02:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Cleanup and misc junk
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
clean: $(TARGETS_CLEAN)
|
2004-09-03 02:49:43 +02:00
|
|
|
rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE)
|
2002-04-26 13:45:55 +02:00
|
|
|
|
|
|
|
dirclean: $(TARGETS_DIRCLEAN)
|
2004-09-03 02:49:43 +02:00
|
|
|
rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE)
|
2002-04-26 13:45:55 +02:00
|
|
|
|
|
|
|
distclean:
|
|
|
|
rm -rf $(DL_DIR) $(BUILD_DIR) $(LINUX_KERNEL) $(IMAGE)
|
|
|
|
|
2004-09-03 02:49:43 +02:00
|
|
|
sourceball:
|
2002-04-26 13:45:55 +02:00
|
|
|
rm -rf $(BUILD_DIR)
|
|
|
|
set -e; \
|
|
|
|
cd ..; \
|
|
|
|
rm -f buildroot.tar.bz2; \
|
|
|
|
tar -cvf buildroot.tar buildroot; \
|
|
|
|
bzip2 -9 buildroot.tar; \
|