1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 16:43:09 +02:00

Initial revision

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
mbm 2004-05-25 04:32:27 +00:00
parent 1eb1b59398
commit 3ac1acb9ea
228 changed files with 49080 additions and 0 deletions

View File

@ -0,0 +1,4 @@
UMlinux
root_fs*
build_*
toolchain_build_*

370
obsolete-buildroot/Makefile Normal file
View File

@ -0,0 +1,370 @@
# Makefile for a simple busybox/uClibc root filesystem
#
# Copyright (C) 2001-2004 Erik Andersen <andersen@codepoet.org>
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
#
# 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.
#
# 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.
#
# 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
#############################################################
#
# EDIT this stuff to suit your system and preferences
#
# Use := when possible to get precomputation, thereby
# speeding up the build process.
#
#############################################################
# What sortof target system shall we compile this for?
#ARCH:=i386
#ARCH:=arm
#ARCH:=mips
ARCH:=mipsel
#ARCH:=powerpc
#ARCH:=sh4
# Busybox link failing due to needing libgcc functions that are statics.
#ARCH:=cris
# The following currently fail to build since no shared lib support.
#ARCH:=sh64
#ARCH:=m68k
#ARCH:=v850
#ARCH:=sparc
#ARCH:=whatever
# If you are building a native gcc toolchain, do you want to
# build the old gcc-2.95 based toolchain, or would you prefer
# a nice and shiny new gcc-3.3.2 toolchain?
# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc.
# WARNING -- 2.95 does not currently build natively for the target.
GCC_2_95_TOOLCHAIN:=false
# Enable this to use the uClibc daily snapshot instead of a released
# version. Daily snapshots may contain new features and bugfixes. Or
# they may not even compile at all, depending on what Erik is doing...
#USE_UCLIBC_SNAPSHOT:=
#USE_UCLIBC_SNAPSHOT:=snapshot
USE_UCLIBC_SNAPSHOT:=20040509
# Temporary option... Fall back to (slightly modified) ldso 0.9.24 code?
# This is here temporarily since I'm having problems with the current
# cvs ldso code on mipsel.
USE_UCLIBC_LDSO_0_9_24:=true
#USE_UCLIBC_LDSO_0_9_24:=false
# Enable this to use the busybox daily snapshot instead of a released
# version. Daily 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:=20040509
# Enable large file (files > 2 GB) support
BUILD_WITH_LARGEFILE:=true
# Command used to download source code
WGET:=wget --passive-ftp
# Optimize toolchain for which type of CPU?
OPTIMIZE_FOR_CPU=$(ARCH)
#OPTIMIZE_FOR_CPU=i686
# Note... gcc 2.95 does not seem to like anything higher than i586.
#OPTIMIZE_FOR_CPU=i586
#OPTIMIZE_FOR_CPU=whatever
# Soft floating point options.
# Notes:
# Currently builds with gcc 3.3 for arm, mips, mipsel, powerpc.
# (i386 support will be added back in at some point.)
# 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.
# Custom specs files are used to set the default gcc mode to soft float
# as a convenience, since you shouldn't link hard and soft float
# together. In fact, arm won't even let you.
# (Un)comment the appropriate line below.
#SOFT_FLOAT:=true
SOFT_FLOAT:=false
TARGET_OPTIMIZATION=-Os -mips2
TARGET_DEBUGGING= #-g
# 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:=
# Any additional gcc options you may want to include....
EXTRA_GCC_CONFIG_OPTIONS:=
# Enable the following if you want locale/gettext/i18n support.
# NOTE! Currently the pregnerated locale stuff only works for x86!
#ENABLE_LOCALE:=true
ENABLE_LOCALE:=false
# If you want multilib enabled, enable this...
MULTILIB:=--enable-multilib
# Build/install c++ compiler and libstdc++?
#INSTALL_LIBSTDCPP:=true
INSTALL_LIBSTDCPP:=false
# Build/install java compiler and libgcj? (requires c++)
# WARNING!!! DOES NOT BUILD FOR TARGET WITHOUT INTERVENTION!!! mjn3
#INSTALL_LIBGCJ:=true
INSTALL_LIBGCJ:=false
# For SMP machines some stuff can be run in parallel
#JLEVEL=-j3
#############################################################
#
# The list of stuff to build for the target filesystem
#
#############################################################
TARGETS:=host-sed
ifeq ($(GCC_2_95_TOOLCHAIN),true)
TARGETS+=uclibc-configured binutils gcc2_95
else
TARGETS+=uclibc-configured binutils gcc3_3
endif
# Do you want user mode Linux (x86 only), or are you building a
# your own kernel that will run on its own? 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...
#TARGETS+=kernel-headers
#TARGETS+=linux
#TARGETS+=user-mode-linux
#TARGETS+=system-linux
TARGETS+= openwrt-base
# The default minimal set
#TARGETS+=busybox tinylogin
# Openssh...
#TARGETS+=zlib openssl openssh
# Dropbear sshd is much smaller than openssl + openssh
#TARGETS+=dropbear_sshd
# Everything needed to build a full uClibc development system!
#TARGETS+=coreutils findutils bash make diffutils patch sed
#TARGETS+=ed flex bison file gawk tar grep bzip2
#If you want a development system, you probably want gcc built
# with uClibc so it can run within your dev system...
#TARGETS+=gcc2_95_target ccache_target # NOT WORKING!!!
#TARGETS+=gcc3_3_target ccache_target
# 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
# More development system stuff for those that want it
#TARGETS+=m4 autoconf automake libtool
# Perl
#TARGETS+=perl
# Some nice debugging tools
#TARGETS+=gdb strace ltrace
# The Valgrind debugger (x86 only)
#TARGETS+=valgrind
# Some stuff for access points and firewalls
#TARGETS+=iptables hostap wtools dhcp_relay bridge
#TARGETS+=iproute2 netsnmp
# 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
#############################################################
#
# Pick your root filesystem type.
#
#############################################################
#TARGETS+=ext2root
# Must mount cramfs with 'ramdisk_blocksize=4096'
#TARGETS+=cramfsroot
# You may need to edit make/jffs2root.mk to change target
# endian-ness or similar, but this is sufficient for most
# things as-is...
#TARGETS+=jffs2root
#TARGETS+= openwrt-linux.trx
TARGETS+= openwrt-code.bin
#############################################################
#
# You should probably leave this stuff alone unless you know
# what you are doing.
#
#############################################################
ifeq ($(SOFT_FLOAT),true)
SOFT_FLOAT_CONFIG_OPTION:=--without-float
TARGET_SOFT_FLOAT:=-msoft-float
ARCH_FPU_SUFFIX:=_nofpu
else
SOFT_FLOAT_CONFIG_OPTION:=
TARGET_SOFT_FLOAT:=
ARCH_FPU_SUFFIX:=
endif
ifeq ($(INSTALL_LIBGCJ),true)
INSTALL_LIBSTDCPP:=true
endif
# WARNING -- uClibc currently disables large file support on cris.
ifeq ("$(strip $(ARCH))","cris")
BUILD_WITH_LARGEFILE:=false
endif
ifneq ($(BUILD_WITH_LARGEFILE),true)
DISABLE_LARGEFILE= --disable-largefile
endif
TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
HOSTCC:=gcc
BASE_DIR:=${shell pwd}
SOURCE_DIR:=$(BASE_DIR)/sources
DL_DIR:=$(SOURCE_DIR)/dl
PATCH_DIR=$(SOURCE_DIR)/patches
BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
TARGET_DIR:=$(BUILD_DIR)/root
STAGING_DIR=$(BUILD_DIR)/staging_dir
TOOL_BUILD_DIR=$(BASE_DIR)/toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)
TARGET_PATH=$(STAGING_DIR)/bin:/bin:/sbin:/usr/bin:/usr/sbin
IMAGE:=$(BASE_DIR)/root_fs_$(ARCH)$(ARCH_FPU_SUFFIX)
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-
TARGET_CC=$(TARGET_CROSS)gcc
STRIP=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
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/' \
-e 's/i[3-9]86/i386/' \
)
GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
AR=$(TARGET_CROSS)ar \
AS=$(TARGET_CROSS)as \
LD=$(TARGET_CROSS)ld \
NM=$(TARGET_CROSS)nm \
CC=$(TARGET_CROSS)gcc \
GCC=$(TARGET_CROSS)gcc \
CXX=$(TARGET_CROSS)g++ \
RANLIB=$(TARGET_CROSS)ranlib
ifeq ($(ENABLE_LOCALE),true)
DISABLE_NLS:=
else
DISABLE_NLS:=--disable-nls
endif
all: world
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
@echo "ALL DONE."
.PHONY: all world clean dirclean distclean source $(TARGETS) \
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE)
include make/*.mk
#############################################################
#
# staging and target directories do NOT list these as
# dependancies anywhere else
#
#############################################################
$(DL_DIR):
mkdir $(DL_DIR)
$(BUILD_DIR):
mkdir $(BUILD_DIR)
$(STAGING_DIR):
rm -rf $(STAGING_DIR)
mkdir -p $(STAGING_DIR)/lib
mkdir -p $(STAGING_DIR)/usr
ln -fs $(REAL_GNU_TARGET_NAME)/include $(STAGING_DIR)/include
ln -fs ../lib $(STAGING_DIR)/usr/lib
ln -fs ../$(REAL_GNU_TARGET_NAME)/include $(STAGING_DIR)/usr/include
$(TARGET_DIR): $(DL_DIR)/$(OPENWRT_ROOT_SKEL)
rm -rf $(TARGET_DIR)
#zcat $(SOURCE_DIR)/skel.tar.gz | tar -C $(BUILD_DIR) -xf -
zcat $(DL_DIR)/$(OPENWRT_ROOT_SKEL) | tar -C $(BUILD_DIR) -xf -
#cp -a $(SOURCE_DIR)/target_skeleton/* $(TARGET_DIR)/
-find $(TARGET_DIR) -type d -name CVS -exec rm -rf {} \; > /dev/null 2>&1
source: $(TARGETS_SOURCE)
#############################################################
#
# Cleanup and misc junk
#
#############################################################
clean:
rm -rf $(TOOL_BUILD_DIR) $(BUILD_DIR) $(IMAGE) \
openwrt-linux.trx openwrt-g-code.bin openwrt-gs-code.bin \
openwrt-kmodules.tar.bz2
dirclean: $(TARGETS_DIRCLEAN)
rm -rf $(TARGET_DIR) $(STAGING_DIR) $(IMAGE) \
openwrt-linux.trx openwrt-g-code.bin openwrt-gs-code.bin \
openwrt-kmodules.tar.bz2
distclean:
rm -rf $(DL_DIR) $(BUILD_DIR) $(LINUX_KERNEL) $(IMAGE) \
openwrt-linux.trx openwrt-g-code.bin openwrt-gs-code.bin \
openwrt-kmodules.tar.bz2
sourceball:
rm -rf $(BUILD_DIR)
set -e; \
cd ..; \
rm -f buildroot.tar.bz2; \
tar -cvf buildroot.tar buildroot; \
bzip2 -9 buildroot.tar; \

42
obsolete-buildroot/README Normal file
View File

@ -0,0 +1,42 @@
This is a modified uClibc buildroot, customized to build OpenWRT.
NOTE! This tarball is meant to be unpacked on top of a stock uClibc
buildroot directory as it only include the necessary customizations!
If you already have the linksys tarball (check make/openwrt.mk for the
version used), then move/copy/symlink it into sources/dl. At the
moment (2004/03/05) I'm using wrt54gv2.2.02.2.tgz.
Simply running 'make' will build openwrt-code.bin and a tarball of
the kernel modules. Customizations of the kernel, uClibc, and busybox
are possible by modifying the appropriate config files in source.
Copies of the stock openwrt Makefile, uClibc.config, busybox.config,
are included with a '-openwrt' suffix.
Remember that different configurations of uClibc may not be binary
compatible. Also, uClibc is not necessarily binary compatible between
versions. In particular, dynamicly linked applications and libraries
built with the linksys/broadcom toolchain are NOT binary compatible
with current uClibc.
Manuel Novoa III
mjn3@codepoet.org
2004/03/16 Added patch to support boardtype of bcm94710ap.
Updated resetmon patch as per mbm.
Set busybox and uClibc snapshots to known good versions.
2004/03/30 Switch to wrt54gs.2.07.1.tgz as the base tarball.
Start grabbing the (updated) root skeleton from openwrt cvs.
Add busybox applets: passwd and nameif.
Update snapshots of buildroot, uClibc, and busybox.
Fix broken /var symlink.
2004/03/31 Replace diag_led.c with mbm's rewrite.
Create code.bin files for both 'G' and 'GS' units.
Update busybox for sed fix.
2004/05/08 Add busybox applets: chown, chgrp, lsmod, sysctl
Remove: ipaddr, iplink, iproute
Update snapshots of buildroot, uClibc, busybox, netfilter.

View File

@ -0,0 +1,72 @@
#############################################################
#
# autoconf
#
#############################################################
AUTOCONF_SOURCE:=autoconf-2.57.tar.bz2
AUTOCONF_SITE:=ftp://ftp.gnu.org/gnu/autoconf
AUTOCONF_CAT:=bzcat
AUTOCONF_DIR:=$(BUILD_DIR)/autoconf-2.57
AUTOCONF_BINARY:=autoconf
AUTOCONF_TARGET_BINARY:=usr/bin/autoconf
$(DL_DIR)/$(AUTOCONF_SOURCE):
$(WGET) -P $(DL_DIR) $(AUTOCONF_SITE)/$(AUTOCONF_SOURCE)
autoconf-source: $(DL_DIR)/$(AUTOCONF_SOURCE)
$(AUTOCONF_DIR)/.unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE)
$(AUTOCONF_CAT) $(DL_DIR)/$(AUTOCONF_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(AUTOCONF_DIR)/.unpacked
$(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked
(cd $(AUTOCONF_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) EMACS="no" \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
);
touch $(AUTOCONF_DIR)/.configured
$(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY): $(AUTOCONF_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(AUTOCONF_DIR)
$(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY): $(AUTOCONF_DIR)/bin/$(AUTOCONF_BINARY)
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
sbindir=$(TARGET_DIR)/usr/sbin \
libexecdir=$(TARGET_DIR)/usr/lib \
datadir=$(TARGET_DIR)/usr/share \
sysconfdir=$(TARGET_DIR)/etc \
localstatedir=$(TARGET_DIR)/var \
libdir=$(TARGET_DIR)/usr/lib \
infodir=$(TARGET_DIR)/usr/info \
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(AUTOCONF_DIR) install;
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
autoconf: uclibc $(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY)
autoconf-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(AUTOCONF_DIR) uninstall
-$(MAKE) -C $(AUTOCONF_DIR) clean
autoconf-dirclean:
rm -rf $(AUTOCONF_DIR)

View File

@ -0,0 +1,74 @@
#############################################################
#
# automake
#
#############################################################
AUTOMAKE_SOURCE:=automake-1.6.3.tar.bz2
AUTOMAKE_SITE:=ftp://ftp.gnu.org/gnu/automake
AUTOMAKE_CAT:=bzcat
AUTOMAKE_DIR:=$(BUILD_DIR)/automake-1.6.3
AUTOMAKE_BINARY:=automake
AUTOMAKE_TARGET_BINARY:=usr/bin/automake
$(DL_DIR)/$(AUTOMAKE_SOURCE):
$(WGET) -P $(DL_DIR) $(AUTOMAKE_SITE)/$(AUTOMAKE_SOURCE)
automake-source: $(DL_DIR)/$(AUTOMAKE_SOURCE)
$(AUTOMAKE_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE)
$(AUTOMAKE_CAT) $(DL_DIR)/$(AUTOMAKE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(AUTOMAKE_DIR)/.unpacked
$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
(cd $(AUTOMAKE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
);
touch $(AUTOMAKE_DIR)/.configured
$(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY): $(AUTOMAKE_DIR)/.configured
$(MAKE) -C $(AUTOMAKE_DIR)
touch -c $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
$(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY): $(AUTOMAKE_DIR)/$(AUTOMAKE_BINARY)
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
sbindir=$(TARGET_DIR)/usr/sbin \
libexecdir=$(TARGET_DIR)/usr/lib \
datadir=$(TARGET_DIR)/usr/share \
sysconfdir=$(TARGET_DIR)/etc \
localstatedir=$(TARGET_DIR)/var \
libdir=$(TARGET_DIR)/usr/lib \
infodir=$(TARGET_DIR)/usr/info \
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(AUTOMAKE_DIR) install;
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
touch -c $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY)
automake: uclibc $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY)
automake-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(AUTOMAKE_DIR) uninstall
-$(MAKE) -C $(AUTOMAKE_DIR) clean
automake-dirclean:
rm -rf $(AUTOMAKE_DIR)

View File

@ -0,0 +1,71 @@
#############################################################
#
# bash
#
#############################################################
BASH_SOURCE:=bash-2.05b.tar.gz
BASH_SITE:=ftp://ftp.gnu.org/gnu/bash
BASH_CAT:=zcat
BASH_DIR:=$(BUILD_DIR)/bash-2.05b
BASH_BINARY:=bash
BASH_TARGET_BINARY:=bin/bash
$(DL_DIR)/$(BASH_SOURCE):
$(WGET) -P $(DL_DIR) $(BASH_SITE)/$(BASH_SOURCE)
bash-source: $(DL_DIR)/$(BASH_SOURCE)
$(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE)
$(BASH_CAT) $(DL_DIR)/$(BASH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# This is broken when -lintl is added to LIBS
$(SED) 's,LIBS_FOR_BUILD =.*,LIBS_FOR_BUILD =,g' \
$(BASH_DIR)/builtins/Makefile.in
touch $(BASH_DIR)/.unpacked
$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
(cd $(BASH_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_setvbuf_reversed=no \
bash_cv_have_mbstate_t=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--with-curses \
--enable-alias \
);
touch $(BASH_DIR)/.configured
$(BASH_DIR)/$(BASH_BINARY): $(BASH_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) CC_FOR_BUILD=$(HOSTCC) -C $(BASH_DIR)
$(TARGET_DIR)/$(BASH_TARGET_BINARY): $(BASH_DIR)/$(BASH_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BASH_DIR) install
rm -f $(TARGET_DIR)/bin/bash*
mv $(TARGET_DIR)/usr/bin/bash* $(TARGET_DIR)/bin/
(cd $(TARGET_DIR)/bin; ln -fs bash sh)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
bash: ncurses uclibc $(TARGET_DIR)/$(BASH_TARGET_BINARY)
bash-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BASH_DIR) uninstall
-$(MAKE) -C $(BASH_DIR) clean
bash-dirclean:
rm -rf $(BASH_DIR)

View File

@ -0,0 +1,94 @@
#############################################################
#
# berkeley db
#
#############################################################
DB_SITE:=http://www.sleepycat.com/update/snapshot
DB_SOURCE:=db-4.1.25.NC.tar.gz
DB_DIR:=$(BUILD_DIR)/db-4.1.25.NC
$(DL_DIR)/$(DB_SOURCE):
$(WGET) -P $(DL_DIR) $(DB_SITE)/$(DB_SOURCE)
berkeleydb-source: $(DL_DIR)/$(DB_SOURCE)
$(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE)
zcat $(DL_DIR)/$(DB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(DB_DIR)/.dist
$(DB_DIR)/.configured: $(DB_DIR)/.dist
(cd $(DB_DIR)/build_unix; rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
../dist/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--with-gnu-ld \
--enable-shared \
--disable-cxx \
--disable-java \
--disable-rpc \
--disable-tcl \
--disable-compat185 \
--with-pic \
);
$(SED) 's/\.lo/.o/g' $(DB_DIR)/build_unix/Makefile
touch $(DB_DIR)/.configured
$(DB_DIR)/build_unix/.libs/libdb-4.1.so: $(DB_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(DB_DIR)/build_unix
$(STAGING_DIR)/lib/libdb-4.1.so: $(DB_DIR)/build_unix/.libs/libdb-4.1.so
$(MAKE) \
prefix=$(STAGING_DIR) \
exec_prefix=$(STAGING_DIR) \
bindir=$(STAGING_DIR)/bin \
sbindir=$(STAGING_DIR)/sbin \
libexecdir=$(STAGING_DIR)/lib \
datadir=$(STAGING_DIR)/share \
sysconfdir=$(STAGING_DIR)/etc \
localstatedir=$(STAGING_DIR)/var \
libdir=$(STAGING_DIR)/lib \
infodir=$(STAGING_DIR)/info \
mandir=$(STAGING_DIR)/man \
includedir=$(STAGING_DIR)/include \
-C $(DB_DIR)/build_unix install;
chmod a-x $(STAGING_DIR)/lib/libdb*so*
rm -f $(STAGING_DIR)/bin/db_*
rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/info \
$(STAGING_DIR)/man $(STAGING_DIR)/share/doc
$(TARGET_DIR)/lib/libdb-4.1.so: $(STAGING_DIR)/lib/libdb-4.1.so
rm -rf $(TARGET_DIR)/lib/libdb*
cp -a $(STAGING_DIR)/lib/libdb*so* $(TARGET_DIR)/lib/
rm -f $(TARGET_DIR)/lib/libdb.so $(TARGET_DIR)/lib/libdb.la $(TARGET_DIR)/lib/libdb.a
(cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libdb-4.1.so libdb.so)
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libdb*so*
$(TARGET_DIR)/usr/lib/libdb.a: $(STAGING_DIR)/lib/libdb-4.1.a
cp -dpf $(STAGING_DIR)/include/db.h $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/lib/libdb*.a $(TARGET_DIR)/usr/lib/
cp -dpf $(STAGING_DIR)/lib/libdb*.la $(TARGET_DIR)/usr/lib/
touch -c $(TARGET_DIR)/usr/lib/libdb.a
berkeleydb-headers: $(TARGET_DIR)/usr/lib/libdb.a
berkeleydb-clean:
$(MAKE) -C $(DB_DIR)/build_unix clean
berkeleydb-dirclean:
rm -rf $(DB_DIR)
berkeleydb: uclibc $(TARGET_DIR)/lib/libdb-4.1.so

View File

@ -0,0 +1,120 @@
#############################################################
#
# build binutils for use on the host system
#
#############################################################
BINUTILS_SITE:=http://ftp.kernel.org/pub/linux/devel/binutils
BINUTILS_SOURCE:=binutils-2.14.90.0.7.tar.bz2
BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-2.14.90.0.7
BINUTILS_CAT:=bzcat
BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-build
$(DL_DIR)/$(BINUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE)
$(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE)
mkdir -p $(TOOL_BUILD_DIR)
mkdir -p $(DL_DIR)
$(BINUTILS_CAT) $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(BINUTILS_DIR)/.unpacked
$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
# Apply any files named binutils-*.patch from the source directory to binutils
$(SOURCE_DIR)/patch-kernel.sh $(BINUTILS_DIR) $(SOURCE_DIR) binutils-uclibc*.patch
touch $(BINUTILS_DIR)/.patched
$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(BINUTILS_DIR1)
(cd $(BINUTILS_DIR1); \
$(BINUTILS_DIR)/configure \
--prefix=$(STAGING_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) );
touch $(BINUTILS_DIR1)/.configured
$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
$(MAKE) $(JLEVEL) -C $(BINUTILS_DIR1) all
# Make install will put gettext data in staging_dir/share/locale.
# Unfortunatey, it isn't configureable.
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump
$(MAKE) $(JLEVEL) -C $(BINUTILS_DIR1) install
binutils-dependancies:
@if [ ! -x /usr/bin/bison ] ; then \
echo -e "\n\nYou must install 'bison' on your build machine\n"; \
exit 1; \
fi;
@if [ ! -x /usr/bin/flex ] ; then \
echo -e "\n\nYou must install 'flex' on your build machine\n"; \
exit 1; \
fi;
@if [ ! -x /usr/bin/msgfmt ] ; then \
echo -e "\n\nYou must install 'gettext' on your build machine\n"; \
exit 1; \
fi;
binutils: binutils-dependancies $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld
binutils-source: $(DL_DIR)/$(BINUTILS_SOURCE)
binutils-clean:
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-$(MAKE) -C $(BINUTILS_DIR1) clean
binutils-dirclean:
rm -rf $(BINUTILS_DIR1)
#############################################################
#
# build binutils for use on the target system
#
#############################################################
BINUTILS_DIR2:=$(BUILD_DIR)/binutils-target
$(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched
mkdir -p $(BINUTILS_DIR2)
(cd $(BINUTILS_DIR2); \
PATH=$(TARGET_PATH) \
CFLAGS="$(TARGET_CFLAGS)" \
CFLAGS_FOR_BUILD="-O2 -g" \
$(BINUTILS_DIR)/configure \
--prefix=/usr \
--exec-prefix=/usr \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) );
touch $(BINUTILS_DIR2)/.configured
$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
PATH=$(TARGET_PATH) \
$(MAKE) $(JLEVEL) -C $(BINUTILS_DIR2) all
$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
PATH=$(TARGET_PATH) \
$(MAKE) $(JLEVEL) DESTDIR=$(TARGET_DIR) \
tooldir=/usr build_tooldir=/usr \
-C $(BINUTILS_DIR2) install
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
-$(STRIP) $(TARGET_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/* > /dev/null 2>&1
-$(STRIP) $(TARGET_DIR)/usr/bin/* > /dev/null 2>&1
binutils_target: $(GCC_DEPENDANCY) $(TARGET_DIR)/usr/bin/ld
binutils_target-clean:
rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
-$(MAKE) -C $(BINUTILS_DIR2) clean
binutils_target-dirclean:
rm -rf $(BINUTILS_DIR2)

View File

@ -0,0 +1,62 @@
#############################################################
#
# bison
#
#############################################################
BISON_SOURCE:=bison-1.35.tar.bz2
BISON_SITE:=ftp://ftp.gnu.org/gnu/bison
BISON_DIR:=$(BUILD_DIR)/bison-1.35
BISON_CAT:=bzcat
BISON_BINARY:=src/bison
BISON_TARGET_BINARY:=usr/bin/bison
$(DL_DIR)/$(BISON_SOURCE):
$(WGET) -P $(DL_DIR) $(BISON_SITE)/$(BISON_SOURCE)
bison-source: $(DL_DIR)/$(BISON_SOURCE)
$(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE)
$(BISON_CAT) $(DL_DIR)/$(BISON_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(BISON_DIR)/.unpacked
$(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
(cd $(BISON_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
gt_cv_func_gnugettext2_libintl=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(BISON_DIR)/.configured
$(BISON_DIR)/$(BISON_BINARY): $(BISON_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(BISON_DIR)
$(TARGET_DIR)/$(BISON_TARGET_BINARY): $(BISON_DIR)/$(BISON_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
cp -a $(SOURCE_DIR)/yacc $(TARGET_DIR)/usr/bin/yacc
bison: uclibc $(TARGET_DIR)/$(BISON_TARGET_BINARY)
bison-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) uninstall
-$(MAKE) -C $(BISON_DIR) clean
bison-dirclean:
rm -rf $(BISON_DIR)

View File

@ -0,0 +1,57 @@
#############################################################
#
# boa
#
#############################################################
BOA_VERSION=0.94.14rc4
# Don't alter below this line unless you (think) you know
# what you are doing! Danger, Danger!
BOA_SOURCE=boa-$(BOA_VERSION).tar.gz
BOA_SITE=http://www.boa.org/
BOA_DIR=$(BUILD_DIR)/${shell basename $(BOA_SOURCE) .tar.gz}
BOA_WORKDIR=$(BUILD_DIR)/boa_workdir
$(DL_DIR)/$(BOA_SOURCE):
$(WGET) -P $(DL_DIR) $(BOA_SITE)/$(BOA_SOURCE)
$(BOA_DIR)/.unpacked: $(DL_DIR)/$(BOA_SOURCE)
gzip -d -c $(DL_DIR)/$(BOA_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(BOA_DIR)/.unpacked
$(BOA_WORKDIR)/Makefile: $(BOA_DIR)/.unpacked
rm -f $(BOA_WORKDIR)/Makefile
mkdir -p $(BOA_WORKDIR)
(cd $(BOA_WORKDIR) && CONFIG_SITE=$(SOURCE_DIR)/boa-config.site-$(ARCH) \
CC=$(TARGET_CC) $(BOA_DIR)/configure)
touch $(BOA_WORKDIR)/.depend
$(BOA_WORKDIR)/boa $(BOA_WORKDIR)/boa_indexer: $(BOA_WORKDIR)/Makefile
rm -f $@
$(MAKE) VPATH=$(BOA_DIR)/src/ -C $(BOA_WORKDIR)
$(BOA_WORKDIR)/.installed: $(BOA_WORKDIR)/boa $(BOA_WORKDIR)/boa_indexer
mkdir -p $(TARGET_DIR)/usr/sbin
cp -f $(BOA_WORKDIR)/src/boa $(TARGET_DIR)/usr/sbin/boa
mkdir -p $(TARGET_DIR)/usr/lib/boa
cp -f $(BOA_WORKDIR)/src/boa_indexer $(TARGET_DIR)/usr/lib/boa/boa_indexer
mkdir -p $(TARGET_DIR)/etc/boa
cp -f $(SOURCE_DIR)/boa.conf $(TARGET_DIR)/etc/boa
cp -f $(SOURCE_DIR)/mime.types $(TARGET_DIR)/etc/mime.types
strip --strip-all $(TARGET_DIR)/usr/sbin/boa $(TARGET_DIR)/usr/lib/boa/boa_indexer
touch $(BOA_WORKDIR)/.installed
boa: uclibc $(BOA_WORKDIR)/.installed
boa-source: $(DL_DIR)/$(BOA_SOURCE)
boa-clean:
@if [ -d $(BOA_WORKDIR)/Makefile ] ; then \
$(MAKE) -C $(BOA_WORKDIR) clean ; \
fi;
boa-dirclean:
rm -rf $(BOA_DIR) $(BOA_WORKDIR)

View File

@ -0,0 +1,62 @@
#############################################################
#
# bridgeutils - User Space Program For Controling Bridging
#
#############################################################
#
BRIDGE_SOURCE_URL=http://bridge.sourceforge.net/bridge-utils
BRIDGE_SOURCE=bridge-utils-0.9.6.tar.gz
BRIDGE_BUILD_DIR=$(BUILD_DIR)/bridge-utils-0.9.6
BRIDGE_TARGET_BINARY:=usr/sbin/brctl
$(DL_DIR)/$(BRIDGE_SOURCE):
$(WGET) -P $(DL_DIR) $(BRIDGE_SOURCE_URL)/$(BRIDGE_SOURCE)
$(BRIDGE_BUILD_DIR)/.unpacked: $(DL_DIR)/$(BRIDGE_SOURCE)
zcat $(DL_DIR)/$(BRIDGE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv -f $(BUILD_DIR)/bridge-utils $(BRIDGE_BUILD_DIR)
patch -p1 -d $(BRIDGE_BUILD_DIR) < $(SOURCE_DIR)/bridge.patch
touch $(BRIDGE_BUILD_DIR)/.unpacked
$(BRIDGE_BUILD_DIR)/.configured: $(BRIDGE_BUILD_DIR)/.unpacked
(cd $(BRIDGE_BUILD_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--with-linux=$(LINUX_DIR) \
);
touch $(BRIDGE_BUILD_DIR)/.configured
$(BRIDGE_BUILD_DIR)/brctl/brctl: $(BRIDGE_BUILD_DIR)/.configured
$(MAKE) -C $(BRIDGE_BUILD_DIR)
$(TARGET_DIR)/$(BRIDGE_TARGET_BINARY): $(BRIDGE_BUILD_DIR)/brctl/brctl
cp -af $(BRIDGE_BUILD_DIR)/brctl/brctl $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
$(STRIP) $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
#cp -af $(BRIDGE_BUILD_DIR)/brctl/brctld $(TARGET_DIR)/usr/sbin/
#$(STRIP) $(TARGET_DIR)/usr/sbin/brctld
bridge: $(TARGET_DIR)/$(BRIDGE_TARGET_BINARY)
bridge-source: $(DL_DIR)/$(BRIDGE_SOURCE)
bridge-clean:
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BRIDGE_BUILD_DIR) uninstall
-$(MAKE) -C $(BRIDGE_BUILD_DIR) clean
bridge-dirclean:
rm -rf $(BRIDGE_BUILD_DIR)

View File

@ -0,0 +1,59 @@
#############################################################
#
# busybox
#
#############################################################
ifneq ($(strip $(USE_BUSYBOX_SNAPSHOT)),)
# Be aware that this changes daily....
BUSYBOX_DIR:=$(BUILD_DIR)/busybox
BUSYBOX_SOURCE:=busybox-$(strip $(USE_BUSYBOX_SNAPSHOT)).tar.bz2
BUSYBOX_SITE:=http://www.busybox.net/downloads/snapshots
else
BUSYBOX_DIR:=$(BUILD_DIR)/busybox-1.00-pre8
BUSYBOX_SOURCE:=busybox-1.00-pre8.tar.bz2
BUSYBOX_SITE:=http://www.busybox.net/downloads
endif
BUSYBOX_UNZIP=bzcat
BUSYBOX_CONFIG:=$(SOURCE_DIR)/busybox.config
$(DL_DIR)/$(BUSYBOX_SOURCE):
$(WGET) -P $(DL_DIR) $(BUSYBOX_SITE)/$(BUSYBOX_SOURCE)
busybox-source: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG)
$(BUSYBOX_DIR)/.configured: $(DL_DIR)/$(BUSYBOX_SOURCE) $(BUSYBOX_CONFIG)
$(BUSYBOX_UNZIP) $(DL_DIR)/$(BUSYBOX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# Allow busybox patches.
$(SOURCE_DIR)/patch-kernel.sh $(BUSYBOX_DIR) $(SOURCE_DIR) busybox-*.patch
cp $(BUSYBOX_CONFIG) $(BUSYBOX_DIR)/.config
$(SED) "s,^CROSS.*,CROSS=$(TARGET_CROSS)\n\
PREFIX=$(TARGET_DIR),;" $(BUSYBOX_DIR)/Rules.mak
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
$(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=y/;" $(BUSYBOX_DIR)/.config
else
$(SED) "s/^.*CONFIG_LFS.*/CONFIG_LFS=n/;" $(BUSYBOX_DIR)/.config
endif
$(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" -C $(BUSYBOX_DIR) oldconfig
touch $(BUSYBOX_DIR)/.configured
busybox-unpack: $(BUSYBOX_DIR)/.configured
$(BUSYBOX_DIR)/busybox: $(BUSYBOX_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -fomit-frame-pointer" -C $(BUSYBOX_DIR)
$(TARGET_DIR)/bin/busybox: $(BUSYBOX_DIR)/busybox
$(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" PREFIX="$(TARGET_DIR)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS)" -C $(BUSYBOX_DIR) install
# Just in case
-chmod a+x $(TARGET_DIR)/usr/share/udhcpc/default.script
busybox: uclibc $(TARGET_DIR)/bin/busybox
busybox-clean:
rm -f $(TARGET_DIR)/bin/busybox
-$(MAKE) -C $(BUSYBOX_DIR) clean
busybox-dirclean:
rm -rf $(BUSYBOX_DIR)

View File

@ -0,0 +1,86 @@
#############################################################
#
# bzip2
#
#############################################################
BZIP2_SOURCE:=bzip2-1.0.2.tar.gz
BZIP2_SITE:=ftp://sources.redhat.com/pub/bzip2/v102
BZIP2_DIR:=$(BUILD_DIR)/bzip2-1.0.2
BZIP2_CAT:=zcat
BZIP2_BINARY:=$(BZIP2_DIR)/bzip2
BZIP2_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/bzmore
$(DL_DIR)/$(BZIP2_SOURCE):
$(WGET) -P $(DL_DIR) $(BZIP2_SITE)/$(BZIP2_SOURCE)
bzip2-source: $(DL_DIR)/$(BZIP2_SOURCE)
$(BZIP2_DIR)/.unpacked: $(DL_DIR)/$(BZIP2_SOURCE)
$(BZIP2_CAT) $(DL_DIR)/$(BZIP2_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SED) "s,ln \$$(,ln -sf \$$(,g" $(BZIP2_DIR)/Makefile
$(SED) "s,ln -s (lib.*),ln -sf \$$1 ; ln -sf libbz2.so.1.0.2 libbz2.so,g" \
$(BZIP2_DIR)/Makefile-libbz2_so
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),false)
$(SED) "s,^BIGFILES,#BIGFILES,g" $(BZIP2_DIR)/Makefile
$(SED) "s,^BIGFILES,#BIGFILES,g" $(BZIP2_DIR)/Makefile-libbz2_so
endif
touch $(BZIP2_DIR)/.unpacked
$(STAGING_DIR)/lib/libbz2.so.1.0.2: $(BZIP2_DIR)/.unpacked
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) CC=$(TARGET_CC) -C $(BZIP2_DIR) -f Makefile-libbz2_so
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) CC=$(TARGET_CC) -C $(BZIP2_DIR) libbz2.a
cp $(BZIP2_DIR)/bzlib.h $(STAGING_DIR)/include/
cp $(BZIP2_DIR)/libbz2.so.1.0.2 $(STAGING_DIR)/lib/
cp $(BZIP2_DIR)/libbz2.a $(STAGING_DIR)/lib/
(cd $(STAGING_DIR)/lib/; ln -sf libbz2.so.1.0.2 libbz2.so)
(cd $(STAGING_DIR)/lib/; ln -sf libbz2.so.1.0.2 libbz2.so.1.0)
$(BZIP2_BINARY): $(STAGING_DIR)/lib/libbz2.so.1.0.2
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) CC=$(TARGET_CC) -C $(BZIP2_DIR) bzip2 bzip2recover
$(BZIP2_TARGET_BINARY): $(BZIP2_BINARY)
(cd $(TARGET_DIR)/usr/bin; \
rm -f bzip2 bunzip2 bzcat bzip2recover bzgrep bzegrep bzfgrep bzmore bzless bzdiff bzcmp);
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(BZIP2_DIR) install
rm -f $(TARGET_DIR)/usr/lib/libbz2.a
rm -f $(TARGET_DIR)/usr/include/bzlib.h
cp $(BZIP2_DIR)/libbz2.so.1.0.2 $(TARGET_DIR)/usr/lib/
(cd $(TARGET_DIR)/usr/lib; \
ln -sf libbz2.so.1.0.2 libbz2.so.1.0; \
ln -sf libbz2.so.1.0.2 libbz2.so)
(cd $(TARGET_DIR)/usr/bin; \
ln -sf bzip2 bunzip2; \
ln -sf bzip2 bzcat; \
ln -sf bzdiff bzcmp; \
ln -sf bzmore bzless; \
ln -sf bzgrep bzegrep; \
ln -sf bzgrep bzfgrep;)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
$(TARGET_DIR)/usr/lib/libbz2.a: $(STAGING_DIR)/lib/libbz2.a
mkdir -p $(TARGET_DIR)/usr/include
cp $(STAGING_DIR)/include/bzlib.h $(TARGET_DIR)/usr/include/
cp $(STAGING_DIR)/lib/libbz2.a $(TARGET_DIR)/usr/lib/
rm -f $(TARGET_DIR)/lib/libbz2.so
(cd $(TARGET_DIR)/usr/lib; \
ln -fs /usr/lib/libbz2.so.1.0 libbz2.so; \
)
-$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libbz2.so.1.0
touch -c $(TARGET_DIR)/usr/lib/libbz2.a
bzip2-headers: $(TARGET_DIR)/usr/lib/libbz2.a
bzip2: uclibc $(BZIP2_TARGET_BINARY)
bzip2-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BZIP2_DIR) uninstall
-$(MAKE) -C $(BZIP2_DIR) clean
bzip2-dirclean:
rm -rf $(BZIP2_DIR)

View File

@ -0,0 +1,147 @@
#############################################################
#
# build ccache to make recompiles faster on the build system
#
#############################################################
CCACHE_SITE:=http://ccache.samba.org/ftp/ccache
CCACHE_SOURCE:=ccache-2.3.tar.gz
CCACHE_DIR1:=$(TOOL_BUILD_DIR)/ccache-2.3
CCACHE_DIR2:=$(BUILD_DIR)/ccache-2.3
CCACHE_CAT:=zcat
CCACHE_BINARY:=ccache
CCACHE_TARGET_BINARY:=usr/bin/ccache
$(DL_DIR)/$(CCACHE_SOURCE):
$(WGET) -P $(DL_DIR) $(CCACHE_SITE)/$(CCACHE_SOURCE)
$(CCACHE_DIR1)/.unpacked: $(DL_DIR)/$(CCACHE_SOURCE)
$(CCACHE_CAT) $(DL_DIR)/$(CCACHE_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(CCACHE_DIR1)/.unpacked
$(CCACHE_DIR1)/.patched: $(CCACHE_DIR1)/.unpacked
$(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/usr/bin\",g" \
$(CCACHE_DIR1)/execute.c
$(SED) "s,getenv(\"CCACHE_DIR\"),\"$(CCACHE_DIR1)/cache\",g" \
$(CCACHE_DIR1)/ccache.c
mkdir -p $(CCACHE_DIR1)/cache
touch $(CCACHE_DIR1)/.patched
$(CCACHE_DIR1)/.configured: $(CCACHE_DIR1)/.patched
mkdir -p $(CCACHE_DIR1)
(cd $(CCACHE_DIR1); rm -rf config.cache; \
CC=$(HOSTCC) \
$(CCACHE_DIR1)/configure \
--target=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
);
touch $(CCACHE_DIR1)/.configured
$(CCACHE_DIR1)/$(CCACHE_BINARY): $(CCACHE_DIR1)/.configured
$(MAKE) CC=$(HOSTCC) -C $(CCACHE_DIR1)
$(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY)
mkdir -p $(STAGING_DIR)/usr/bin;
mkdir -p $(TOOL_BUILD_DIR)/.ccache;
cp $(CCACHE_DIR1)/ccache $(STAGING_DIR)/usr/bin
(cd $(STAGING_DIR)/usr/bin; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-gcc; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-cc; \
ln -fs $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(OPTIMIZE_FOR_CPU)-linux-uclibc-cc);
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc ] && \
mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc $(STAGING_DIR)/usr/bin/
(cd $(STAGING_DIR)/bin; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-cc; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-gcc; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-cc; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-gcc);
ifeq ($(INSTALL_LIBSTDCPP),true)
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ ] && \
mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-c++ $(STAGING_DIR)/usr/bin/
[ -f $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ ] && \
mv $(STAGING_DIR)/bin/$(OPTIMIZE_FOR_CPU)-linux-uclibc-g++ $(STAGING_DIR)/usr/bin/
(cd $(STAGING_DIR)/bin; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-c++; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-g++;\
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-c++; \
ln -fs ../usr/bin/ccache $(OPTIMIZE_FOR_CPU)-linux-uclibc-g++);
endif
ifeq ($(GCC_2_95_TOOLCHAIN),true)
ccache: gcc2_95 $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
else
ccache: gcc3_3 $(STAGING_DIR)/$(CCACHE_TARGET_BINARY)
endif
ccache-clean:
$(MAKE) -C $(CCACHE_DIR1) uninstall
-$(MAKE) -C $(CCACHE_DIR1) clean
ccache-dirclean:
rm -rf $(CCACHE_DIR1)
#############################################################
#
# build ccache for use on the target system
#
#############################################################
$(CCACHE_DIR2)/.unpacked: $(DL_DIR)/$(CCACHE_SOURCE)
$(CCACHE_CAT) $(DL_DIR)/$(CCACHE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(CCACHE_DIR2)/.unpacked
$(CCACHE_DIR2)/.patched: $(CCACHE_DIR2)/.unpacked
touch $(CCACHE_DIR2)/.patched
$(CCACHE_DIR2)/.configured: $(CCACHE_DIR2)/.patched
mkdir -p $(CCACHE_DIR2)
(cd $(CCACHE_DIR2); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(CCACHE_DIR2)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(CCACHE_DIR2)/.configured
$(CCACHE_DIR2)/$(CCACHE_BINARY): $(CCACHE_DIR2)/.configured
$(MAKE) -C $(CCACHE_DIR2)
$(TARGET_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR2)/$(CCACHE_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(CCACHE_DIR2) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
# put a bunch of symlinks into /bin, since that is earlier
# in the default PATH than /usr/bin where gcc lives
(cd $(TARGET_DIR)/bin; \
ln -fs /usr/bin/ccache cc; \
ln -fs /usr/bin/ccache gcc; \
ln -fs /usr/bin/ccache c++; \
ln -fs /usr/bin/ccache g++;)
ccache_target: uclibc $(TARGET_DIR)/$(CCACHE_TARGET_BINARY)
ccache_target-sources: $(DL_DIR)/$(CCACHE_SOURCE)
ccache_target-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(CCACHE_DIR2) uninstall
-$(MAKE) -C $(CCACHE_DIR2) clean
ccache_target-dirclean:
rm -rf $(CCACHE_DIR2)

View File

@ -0,0 +1,82 @@
#############################################################
#
# coreutils
#
#############################################################
COREUTILS_SOURCE:=coreutils-5.0.tar.bz2
COREUTILS_SITE:=ftp://ftp.gnu.org/gnu/coreutils/
COREUTILS_CAT:=bzcat
COREUTILS_DIR:=$(BUILD_DIR)/coreutils-5.0
COREUTILS_BINARY:=src/vdir
COREUTILS_TARGET_BINARY:=bin/vdir
BIN_PROGS:=cat chgrp chmod chown cp date dd df dir echo false hostname \
ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true uname
$(DL_DIR)/$(COREUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(COREUTILS_SITE)/$(COREUTILS_SOURCE)
coreutils-source: $(DL_DIR)/$(COREUTILS_SOURCE)
$(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE)
$(COREUTILS_CAT) $(DL_DIR)/$(COREUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(COREUTILS_DIR)/.unpacked
$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
(cd $(COREUTILS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--disable-rpath \
--disable-dependency-tracking \
);
#Fix up the max number of open files per process, which apparently
# is not set when cross compiling
$(SED) 's,.*UTILS_OPEN_MAX.*,#define UTILS_OPEN_MAX 1019,g' \
$(COREUTILS_DIR)/config.h
# This is undefined when crosscompiling...
$(SED) 's,.*HAVE_PROC_UPTIME.*,#define HAVE_PROC_UPTIME 1,g' \
$(COREUTILS_DIR)/config.h
touch $(COREUTILS_DIR)/.configured
$(COREUTILS_DIR)/$(COREUTILS_BINARY): $(COREUTILS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(COREUTILS_DIR)
rm -f $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY)
$(TARGET_DIR)/$(COREUTILS_TARGET_BINARY): $(COREUTILS_DIR)/$(COREUTILS_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(COREUTILS_DIR) install
# some things go in root rather than usr
for f in $(BIN_PROGS); do \
mv $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f; \
done
# link for archaic shells
ln -fs test $(TARGET_DIR)/usr/bin/[
# gnu thinks chroot is in bin, debian thinks it's in sbin
mv $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot
$(STRIP) $(TARGET_DIR)/usr/sbin/chroot > /dev/null 2>&1
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
coreutils: uclibc $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY)
coreutils-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(COREUTILS_DIR) uninstall
-$(MAKE) -C $(COREUTILS_DIR) clean
coreutils-dirclean:
rm -rf $(COREUTILS_DIR)

View File

@ -0,0 +1,52 @@
#############################################################
#
# mkcramfs to build to target cramfs filesystems
#
#############################################################
CRAMFS_DIR=$(BUILD_DIR)/cramfs-1.1
CRAMFS_SOURCE=cramfs-1.1.tar.gz
CRAMFS_SITE=http://aleron.dl.sourceforge.net/sourceforge/cramfs
CRAMFS_PATCH=$(SOURCE_DIR)/cramfs.patch
$(DL_DIR)/$(CRAMFS_SOURCE):
$(WGET) -P $(DL_DIR) $(CRAMFS_SITE)/$(CRAMFS_SOURCE)
$(CRAMFS_DIR): $(DL_DIR)/$(CRAMFS_SOURCE) $(CRAMFS_PATCH)
zcat $(DL_DIR)/$(CRAMFS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(CRAMFS_PATCH) | patch -p1 -d $(CRAMFS_DIR)
$(CRAMFS_DIR)/mkcramfs: $(CRAMFS_DIR)
$(MAKE) CFLAGS="-Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -C $(CRAMFS_DIR);
touch -c $(CRAMFS_DIR)/mkcramfs
cramfs: $(CRAMFS_DIR)/mkcramfs
cramfs-source: $(DL_DIR)/$(CRAMFS_SOURCE)
cramfs-clean:
-$(MAKE) -C $(CRAMFS_DIR) clean
cramfs-dirclean:
rm -rf $(CRAMFS_DIR)
#############################################################
#
# Build the cramfs root filesystem image
#
#############################################################
cramfsroot: cramfs
#-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true;
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
@rm -rf $(TARGET_DIR)/usr/man
@rm -rf $(TARGET_DIR)/usr/info
$(CRAMFS_DIR)/mkcramfs -q -D $(SOURCE_DIR)/device_table.txt $(TARGET_DIR) $(IMAGE)
cramfsroot-source: cramfs-source
cramfsroot-clean:
-$(MAKE) -C $(CRAMFS_DIR) clean
cramfsroot-dirclean:
rm -rf $(CRAMFS_DIR)

View File

@ -0,0 +1,10 @@
#############################################################
#
# Any custom stuff you feel like doing....
#
#############################################################
CUST_DIR:=$(SOURCE_DIR)/customize
ROOT_DIR:=$(BUILD_DIR)/root
customize:
cp -af $(CUST_DIR)/* $(ROOT_DIR)/

View File

@ -0,0 +1,47 @@
#############################################################
#
# dhcp_relay
#
#############################################################
DHCP_RELAY_SOURCE:=dhcp-3.0pl2.tar.gz
DHCP_RELAY_SITE:=ftp://ftp.isc.org/isc/dhcp
DHCP_RELAY_CAT:=zcat
DHCP_RELAY_DIR:=$(BUILD_DIR)/dhcp-3.0pl2
DHCP_RELAY_BINARY:=work.linux-2.2/relay/dhcrelay
DHCP_RELAY_TARGET_BINARY:=usr/sbin/dhcrelay
BVARS=PREDEFINES='-D_PATH_DHCPD_DB=\"/var/lib/dhcp/dhcpd.leases\" \
-D_PATH_DHCLIENT_DB=\"/var/lib/dhcp/dhclient.leases\"' \
VARDB=/var/lib/dhcp
$(DL_DIR)/$(DHCP_RELAY_SOURCE):
$(WGET) -P $(DL_DIR) $(DHCP_RELAY_SITE)/$(DHCP_RELAY_SOURCE)
dhcp_relay-source: $(DL_DIR)/$(DHCP_RELAY_SOURCE)
$(DHCP_RELAY_DIR)/.unpacked: $(DL_DIR)/$(DHCP_RELAY_SOURCE)
$(DHCP_RELAY_CAT) $(DL_DIR)/$(DHCP_RELAY_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(DHCP_RELAY_DIR)/.unpacked
$(DHCP_RELAY_DIR)/.configured: $(DHCP_RELAY_DIR)/.unpacked
(cd $(DHCP_RELAY_DIR); $(TARGET_CONFIGURE_OPTS) ./configure );
touch $(DHCP_RELAY_DIR)/.configured
$(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_RELAY_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) $(BVARS) -C $(DHCP_RELAY_DIR)
$(STRIP) $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY)
$(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY): $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY)
(cd $(TARGET_DIR)/var/lib; ln -sf /tmp dhcp)
cp -a $(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY) $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
dhcp_relay: uclibc $(TARGET_DIR)/$(DHCP_RELAY_TARGET_BINARY)
dhcp_relay-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DHCP_RELAY_DIR) uninstall
-$(MAKE) -C $(DHCP_RELAY_DIR) clean
dhcp_relay-dirclean:
rm -rf $(DHCP_RELAY_DIR)

View File

@ -0,0 +1,61 @@
#############################################################
#
# diffutils
#
#############################################################
DIFFUTILS_SOURCE:=diffutils-2.8.4.tar.gz
DIFFUTILS_SITE:=ftp://alpha.gnu.org/gnu/diffutils/
DIFFUTILS_CAT:=zcat
DIFFUTILS_DIR:=$(BUILD_DIR)/diffutils-2.8.4
DIFFUTILS_BINARY:=src/diff
DIFFUTILS_TARGET_BINARY:=usr/bin/diff
$(DL_DIR)/$(DIFFUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(DIFFUTILS_SITE)/$(DIFFUTILS_SOURCE)
diffutils-source: $(DL_DIR)/$(DIFFUTILS_SOURCE)
$(DIFFUTILS_DIR)/.unpacked: $(DL_DIR)/$(DIFFUTILS_SOURCE)
$(DIFFUTILS_CAT) $(DL_DIR)/$(DIFFUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(DIFFUTILS_DIR)/.unpacked
$(DIFFUTILS_DIR)/.configured: $(DIFFUTILS_DIR)/.unpacked
(cd $(DIFFUTILS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(DIFFUTILS_DIR)/.configured
$(DIFFUTILS_DIR)/$(DIFFUTILS_BINARY): $(DIFFUTILS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR)
$(TARGET_DIR)/$(DIFFUTILS_TARGET_BINARY): $(DIFFUTILS_DIR)/$(DIFFUTILS_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
diffutils: uclibc $(TARGET_DIR)/$(DIFFUTILS_TARGET_BINARY)
diffutils-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR) uninstall
-$(MAKE) -C $(DIFFUTILS_DIR) clean
diffutils-dirclean:
rm -rf $(DIFFUTILS_DIR)

View File

@ -0,0 +1,50 @@
#############################################################
#
# dnsmasq
#
#############################################################
DNSMASQ_SITE=http://thekelleys.org.uk/dnsmasq
ifeq ($(filter $(TARGETS),dnsmasq1),)
DNSMASQ_SOURCE=dnsmasq-2.6.tar.gz
DNSMASQ_DIR=$(BUILD_DIR)/dnsmasq-2.6
DNSMASQ_VER=dnsmasq2
else
DNSMASQ_SOURCE=dnsmasq-1.18.tar.gz
DNSMASQ_DIR=$(BUILD_DIR)/dnsmasq-1.18
DNSMASQ_VER=dnsmasq1
endif
DNSMASQ_BINARY=dnsmasq
DNSMASQ_TARGET_BINARY=usr/sbin/dnsmasq
$(DL_DIR)/$(DNSMASQ_SOURCE):
$(WGET) -P $(DL_DIR) $(DNSMASQ_SITE)/$(DNSMASQ_SOURCE)
$(DNSMASQ_DIR)/.source: $(DL_DIR)/$(DNSMASQ_SOURCE)
zcat $(DL_DIR)/$(DNSMASQ_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SOURCE_DIR)/patch-kernel.sh $(DNSMASQ_DIR) $(SOURCE_DIR) \
$(DNSMASQ_VER)-*.patch
touch $(DNSMASQ_DIR)/.source
$(DNSMASQ_DIR)/$(DNSMASQ_BINARY): $(DNSMASQ_DIR)/.source
$(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \
BINDIR=/usr/sbin MANDIR=/usr/man -C $(DNSMASQ_DIR)
$(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY): $(DNSMASQ_DIR)/$(DNSMASQ_BINARY)
$(MAKE) BINDIR=/usr/sbin MANDIR=/usr/man \
DESTDIR=$(TARGET_DIR) -C $(DNSMASQ_DIR) install
$(STRIP) $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
rm -rf $(TARGET_DIR)/usr/man
dnsmasq: uclibc $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
dnsmasq1: uclibc $(TARGET_DIR)/$(DNSMASQ_TARGET_BINARY)
dnsmasq-source: $(DL_DIR)/$(DNSMASQ_SOURCE)
dnsmasq-clean:
#$(MAKE) prefix=$(TARGET_DIR)/usr -C $(DNSMASQ_DIR) uninstall
-$(MAKE) -C $(DNSMASQ_DIR) clean
dnsmasq-dirclean:
rm -rf $(DNSMASQ_DIR)

View File

@ -0,0 +1,74 @@
#############################################################
#
# dropbear_sshd
#
#############################################################
DROPBEAR_SSHD_SOURCE:=dropbear-0.41.tar.bz2
DROPBEAR_SSHD_SITE:=http://matt.ucc.asn.au/dropbear/releases/
DROPBEAR_SSHD_DIR:=$(BUILD_DIR)/dropbear-0.41
DROPBEAR_SSHD_CAT:=bzcat
DROPBEAR_SSHD_BINARY:=dropbearmulti
DROPBEAR_SSHD_TARGET_BINARY:=usr/sbin/dropbear
$(DL_DIR)/$(DROPBEAR_SSHD_SOURCE):
$(WGET) -P $(DL_DIR) $(DROPBEAR_SSHD_SITE)/$(DROPBEAR_SSHD_SOURCE)
dropbear_sshd-source: $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE)
$(DROPBEAR_SSHD_DIR)/.unpacked: $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE)
$(DROPBEAR_SSHD_CAT) $(DL_DIR)/$(DROPBEAR_SSHD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SOURCE_DIR)/patch-kernel.sh $(DROPBEAR_SSHD_DIR) $(SOURCE_DIR) dropbear-*.patch
$(SED) 's,^/\* #define DROPBEAR_MULTI.*,#define DROPBEAR_MULTI,g' $(DROPBEAR_SSHD_DIR)/options.h
touch $(DROPBEAR_SSHD_DIR)/.unpacked
$(DROPBEAR_SSHD_DIR)/.configured: $(DROPBEAR_SSHD_DIR)/.unpacked
(cd $(DROPBEAR_SSHD_DIR); rm -rf config.cache; \
autoconf; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--with-shared \
);
touch $(DROPBEAR_SSHD_DIR)/.configured
$(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY): $(DROPBEAR_SSHD_DIR)/.configured
$(MAKE) $(TARGET_CONFIGURE_OPTS) LD=$(TARGET_CC) \
-C $(DROPBEAR_SSHD_DIR) dropbearmulti
$(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY): $(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY)
#$(MAKE) DESTDIR=$(TARGET_DIR) $(TARGET_CONFIGURE_OPTS) \
# LD=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR) install
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
install -d -m 755 $(TARGET_DIR)/usr/sbin
install -d -m 755 $(TARGET_DIR)/usr/bin
install -m 755 $(DROPBEAR_SSHD_DIR)/$(DROPBEAR_SSHD_BINARY) \
$(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY)
ln -sf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearkey
ln -sf ../sbin/dropbear $(TARGET_DIR)/usr/bin/dropbearconvert
dropbear_sshd: uclibc zlib $(TARGET_DIR)/$(DROPBEAR_SSHD_TARGET_BINARY)
dropbear_sshd-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) $(TARGET_CONFIGURE_OPTS) \
LD=$(TARGET_CC) -C $(DROPBEAR_SSHD_DIR) uninstall
-$(MAKE) -C $(DROPBEAR_SSHD_DIR) clean
dropbear_sshd-dirclean:
rm -rf $(DROPBEAR_SSHD_DIR)

View File

@ -0,0 +1,55 @@
#############################################################
#
# ed
#
#############################################################
ED_SOURCE:=ed_0.2.orig.tar.gz
ED_PATCH:=ed_0.2-19.diff.gz
ED_SITE:=http://ftp.debian.org/debian/pool/main/e/ed
ED_CAT:=zcat
ED_DIR:=$(BUILD_DIR)/ed-0.2
ED_BINARY:=ed
ED_TARGET_BINARY:=bin/ed
$(DL_DIR)/$(ED_SOURCE):
$(WGET) -P $(DL_DIR) $(ED_SITE)/$(ED_SOURCE)
$(DL_DIR)/$(ED_PATCH):
$(WGET) -P $(DL_DIR) $(ED_SITE)/$(ED_PATCH)
ed-source: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH)
$(ED_DIR)/.unpacked: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH)
$(ED_CAT) $(DL_DIR)/$(ED_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SOURCE_DIR)/patch-kernel.sh $(ED_DIR) $(DL_DIR) $(ED_PATCH)
touch $(ED_DIR)/.unpacked
$(ED_DIR)/.configured: $(ED_DIR)/.unpacked
(cd $(ED_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
$(DISABLE_NLS) \
);
touch $(ED_DIR)/.configured
$(ED_DIR)/$(ED_BINARY): $(ED_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(ED_DIR)
$(TARGET_DIR)/$(ED_TARGET_BINARY): $(ED_DIR)/$(ED_BINARY)
cp -a $(ED_DIR)/$(ED_BINARY) $(TARGET_DIR)/$(ED_TARGET_BINARY)
ed: uclibc $(TARGET_DIR)/$(ED_TARGET_BINARY)
ed-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(ED_DIR) uninstall
-$(MAKE) -C $(ED_DIR) clean
ed-dirclean:
rm -rf $(ED_DIR)

View File

@ -0,0 +1,56 @@
#############################################################
#
# genext2fs to build to target ext2 filesystems
#
#############################################################
GENEXT2_DIR=$(BUILD_DIR)/genext2fs-1.3
GENEXT2_SOURCE=genext2fs_1.3.orig.tar.gz
GENEXT2_SITE=http://ftp.debian.org/debian/pool/main/g/genext2fs
GENEXT2_PATCH=$(SOURCE_DIR)/genext2fs.patch
$(DL_DIR)/$(GENEXT2_SOURCE):
$(WGET) -P $(DL_DIR) $(GENEXT2_SITE)/$(GENEXT2_SOURCE)
$(GENEXT2_DIR): $(DL_DIR)/$(GENEXT2_SOURCE) $(GENEXT2_PATCH)
zcat $(DL_DIR)/$(GENEXT2_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv $(GENEXT2_DIR).orig $(GENEXT2_DIR)
cat $(GENEXT2_PATCH) | patch -p1 -d $(GENEXT2_DIR)
$(GENEXT2_DIR)/genext2fs: $(GENEXT2_DIR)
$(MAKE) CFLAGS="-Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \
-D_FILE_OFFSET_BITS=64" -C $(GENEXT2_DIR);
touch -c $(GENEXT2_DIR)/genext2fs
genext2fs: $(GENEXT2_DIR)/genext2fs
#############################################################
#
# Build the ext2 root filesystem image
#
#############################################################
# How much KB we want to add to the calculated size for slack space
#GENEXT2_ADDTOROOTSIZE=4096
GENEXT2_ADDTOROOTSIZE=16384
GENEXT2_REALSIZE=$(subst total,, $(shell LANG=C du $(TARGET_DIR) -s -c -k | grep total ))
GENEXT2_SIZE=$(shell expr $(GENEXT2_REALSIZE) + $(GENEXT2_ADDTOROOTSIZE))
# We currently add about 400 device nodes, so add that into the total
GENEXT2_INODES=$(shell expr $(shell find $(TARGET_DIR) | wc -l) + 400)
#GENEXT2_SIZE=100000
ext2root: genext2fs
#-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true;
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
$(GENEXT2_DIR)/genext2fs -i $(GENEXT2_INODES) -b $(GENEXT2_SIZE) \
-d $(TARGET_DIR) -q -D $(SOURCE_DIR)/device_table.txt $(IMAGE)
ext2root-source: $(DL_DIR)/$(GENEXT2_SOURCE)
ext2root-clean:
-$(MAKE) -C $(GENEXT2_DIR) clean
ext2root-dirclean:
rm -rf $(GENEXT2_DIR)

View File

@ -0,0 +1,63 @@
#############################################################
#
# fakeroot
#
#############################################################
FAKEROOT_SOURCE:=fakeroot_0.7.5.tar.gz
FAKEROOT_SITE:=http://ftp.debian.org/debian/pool/main/f/fakeroot
FAKEROOT_CAT:=zcat
FAKEROOT_DIR:=$(BUILD_DIR)/fakeroot-0.7.5
$(DL_DIR)/$(FAKEROOT_SOURCE):
$(WGET) -P $(DL_DIR) $(FAKEROOT_SITE)/$(FAKEROOT_SOURCE)
fakeroot-source: $(DL_DIR)/$(FAKEROOT_SOURCE)
$(FAKEROOT_DIR)/.unpacked: $(DL_DIR)/$(FAKEROOT_SOURCE)
$(FAKEROOT_CAT) $(DL_DIR)/$(FAKEROOT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# If using busybox getopt, make it be quiet.
$(SED) "s,getopt --version,getopt --version 2>/dev/null," \
$(FAKEROOT_DIR)/scripts/fakeroot
touch $(FAKEROOT_DIR)/.unpacked
$(FAKEROOT_DIR)/.configured: $(FAKEROOT_DIR)/.unpacked
(cd $(FAKEROOT_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libdir=/usr/lib/libfakeroot \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(FAKEROOT_DIR)/.configured
$(FAKEROOT_DIR)/faked: $(FAKEROOT_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(FAKEROOT_DIR)
$(TARGET_DIR)/usr/bin/fakeroot: $(FAKEROOT_DIR)/faked
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(FAKEROOT_DIR) install
-mv $(TARGET_DIR)/usr/bin/$(ARCH)-linux-faked $(TARGET_DIR)/usr/bin/faked
-mv $(TARGET_DIR)/usr/bin/$(ARCH)-linux-fakeroot $(TARGET_DIR)/usr/bin/fakeroot
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
fakeroot: uclibc $(TARGET_DIR)/usr/bin/fakeroot
fakeroot-clean:
$(MAKE) -C $(FAKEROOT_DIR) clean
fakeroot-dirclean:
rm -rf $(FAKEROOT_DIR)

View File

@ -0,0 +1,64 @@
#############################################################
#
# file
#
#############################################################
FILE_SOURCE:=file-4.08.tar.gz
FILE_SITE:=ftp://ftp.astron.com/pub/file
FILE_DIR:=$(BUILD_DIR)/file-4.08
FILE_CAT:=zcat
FILE_BINARY:=src/file
FILE_TARGET_BINARY:=usr/bin/file
$(DL_DIR)/$(FILE_SOURCE):
$(WGET) -P $(DL_DIR) $(FILE_SITE)/$(FILE_SOURCE)
file-source: $(DL_DIR)/$(FILE_SOURCE)
$(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE)
$(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(SOURCE_DIR)/file.patch | patch -p1 -d $(FILE_DIR)
touch $(FILE_DIR)/.unpacked
$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked
(cd $(FILE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share/misc \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--disable-fsect-man5 \
);
touch $(FILE_DIR)/.configured
$(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(FILE_DIR)
$(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY)
$(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) -C $(FILE_DIR) install
-($(STRIP) $(TARGET_DIR)/usr/lib/libmagic.so.*.* > /dev/null 2>&1)
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
file: zlib uclibc $(TARGET_DIR)/$(FILE_TARGET_BINARY)
file-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) uninstall
-$(MAKE) -C $(FILE_DIR) clean
file-dirclean:
rm -rf $(FILE_DIR)

View File

@ -0,0 +1,70 @@
#############################################################
#
# findutils
#
#############################################################
FINDUTILS_SOURCE:=findutils_4.1.7.orig.tar.gz
FINDUTILS_SITE:=http://ftp.debian.org/debian/pool/main/f/findutils
FINDUTILS_CAT:=zcat
FINDUTILS_DIR:=$(BUILD_DIR)/findutils-4.1.7
FINDUTILS_BINARY:=find/find
FINDUTILS_TARGET_BINARY:=usr/bin/find
$(DL_DIR)/$(FINDUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(FINDUTILS_SITE)/$(FINDUTILS_SOURCE)
findutils-source: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_CAT) $(DL_DIR)/$(FINDUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv $(FINDUTILS_DIR).orig $(FINDUTILS_DIR)
touch $(FINDUTILS_DIR)/.unpacked
$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
(cd $(FINDUTILS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_setvbuf_reversed=no \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib/locate \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var/lib \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(FINDUTILS_DIR)/.configured
$(FINDUTILS_DIR)/$(FINDUTILS_BINARY): $(FINDUTILS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(FINDUTILS_DIR)
# This stuff is needed to work around GNU make deficiencies
findutils-target_binary: $(FINDUTILS_DIR)/$(FINDUTILS_BINARY)
@if [ -L $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) ] ; then \
rm -f $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY); fi;
@if [ ! -f $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) -o $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) \
-ot $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) ] ; then \
set -x; \
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) install; \
$(STRIP) $(TARGET_DIR)/usr/lib/locate/* > /dev/null 2>&1; \
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc; fi;
findutils: uclibc findutils-target_binary
findutils-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FINDUTILS_DIR) uninstall
-$(MAKE) -C $(FINDUTILS_DIR) clean
findutils-dirclean:
rm -rf $(FINDUTILS_DIR)

View File

@ -0,0 +1,81 @@
#############################################################
#
# flex
#
#############################################################
FLEX_SOURCE:=flex_2.5.4a.orig.tar.gz
FLEX_PATCH:=flex_2.5.4a-24.diff.gz
FLEX_SITE:=http://ftp.debian.org/debian/pool/main/f/flex
FLEX_DIR:=$(BUILD_DIR)/flex-2.5.4
FLEX_CAT:=zcat
FLEX_BINARY:=flex
FLEX_TARGET_BINARY:=usr/bin/flex
$(DL_DIR)/$(FLEX_SOURCE):
$(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_SOURCE)
$(DL_DIR)/$(FLEX_PATCH):
$(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_PATCH)
flex-source: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
$(FLEX_DIR)/.unpacked: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
$(FLEX_CAT) $(DL_DIR)/$(FLEX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
#$(SOURCE_DIR)/patch-kernel.sh $(FLEX_DIR) $(DL_DIR) $(FLEX_PATCH)
touch $(FLEX_DIR)/.unpacked
$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked
(cd $(FLEX_DIR); autoconf; rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(FLEX_DIR)/.configured
$(FLEX_DIR)/$(FLEX_BINARY): $(FLEX_DIR)/.configured
$(MAKE) -C $(FLEX_DIR)
$(TARGET_DIR)/$(FLEX_TARGET_BINARY): $(FLEX_DIR)/$(FLEX_BINARY)
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
sbindir=$(TARGET_DIR)/usr/sbin \
libexecdir=$(TARGET_DIR)/usr/lib \
datadir=$(TARGET_DIR)/usr/share \
sysconfdir=$(TARGET_DIR)/etc \
sharedstatedir=$(TARGET_DIR)/usr/com \
localstatedir=$(TARGET_DIR)/var \
libdir=$(TARGET_DIR)/usr/lib \
infodir=$(TARGET_DIR)/usr/info \
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(FLEX_DIR) install;
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
(cd $(TARGET_DIR)/usr/bin; ln -s flex lex)
flex: uclibc $(TARGET_DIR)/$(FLEX_TARGET_BINARY)
flex-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(FLEX_DIR) uninstall
-$(MAKE) -C $(FLEX_DIR) clean
flex-dirclean:
rm -rf $(FLEX_DIR)

View File

@ -0,0 +1,66 @@
#############################################################
#
# gawk
#
#############################################################
GAWK_SOURCE:=gawk-3.1.2.tar.gz
GAWK_SITE:=ftp://ftp.gnu.org/gnu/gawk
GAWK_CAT:=zcat
GAWK_DIR:=$(BUILD_DIR)/gawk-3.1.2
GAWK_BINARY:=gawk
GAWK_TARGET_BINARY:=usr/bin/gawk
$(DL_DIR)/$(GAWK_SOURCE):
$(WGET) -P $(DL_DIR) $(GAWK_SITE)/$(GAWK_SOURCE)
gawk-source: $(DL_DIR)/$(GAWK_SOURCE)
$(GAWK_DIR)/.unpacked: $(DL_DIR)/$(GAWK_SOURCE)
$(GAWK_CAT) $(DL_DIR)/$(GAWK_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(GAWK_DIR)/.unpacked
$(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked
(cd $(GAWK_DIR); rm -rf config.cache; autoconf; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_func_getpgrp_void=yes \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(GAWK_DIR)/.configured
$(GAWK_DIR)/$(GAWK_BINARY): $(GAWK_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GAWK_DIR)
$(TARGET_DIR)/$(GAWK_TARGET_BINARY): $(GAWK_DIR)/$(GAWK_BINARY)
rm -f $(TARGET_DIR)/usr/bin/awk
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GAWK_DIR) install
rm -f $(TARGET_DIR)/usr/bin/gawk-*
(cd $(TARGET_DIR)/usr/bin; ln -sf gawk awk)
$(STRIP) $(TARGET_DIR)/usr/lib/awk/* > /dev/null 2>&1
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
gawk: uclibc $(TARGET_DIR)/$(GAWK_TARGET_BINARY)
gawk-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GAWK_DIR) uninstall
-$(MAKE) -C $(GAWK_DIR) clean
gawk-dirclean:
rm -rf $(GAWK_DIR)

View File

@ -0,0 +1,276 @@
# Makefile for to build a gcc/uClibc toolchain
#
# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# 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
# General Public License for more details.
#
# You should have received a copy of the GNU 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
ifeq ($(GCC_2_95_TOOLCHAIN),true)
GCC_SITE:=http://www.uclibc.org/downloads/toolchain
GCC_SOURCE:=gcc-20011006.tar.bz2
GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-20011006
GCC_CAT:=bzcat
STLPORT_SITE=http://www.stlport.org/archive
STLPORT_SOURCE=STLport-4.5.3.tar.gz
STLPORT_DIR=$(TOOL_BUILD_DIR)/STLport-4.5.3
GCC_STRIP_HOST_BINARIES:=true
#############################################################
#
# Setup some initial stuff
#
#############################################################
ifeq ($(INSTALL_LIBSTDCPP),true)
TARGET_LANGUAGES:=c,c++
STLPORT_TARGET=stlport
else
TARGET_LANGUAGES:=c
STLPORT_TARGET=
endif
#############################################################
#
# build the first pass gcc compiler
#
#############################################################
GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc2_95-initial
$(DL_DIR)/$(GCC_SOURCE):
$(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
$(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(GCC_DIR)/.unpacked
$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
# Apply any files named gcc-*.patch from the source directory to gcc
$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) gcc2.95-mega.patch.bz2
$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) gcc2.95-uclibc-conf.patch
#$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) gcc-uclibc2_95*.patch
#
# We do not wish to build the libstdc++ library provided with gcc,
# since it doesn't seem to work at all with uClibc plus gcc 2.95...
#
mv $(GCC_DIR)/libstdc++ $(GCC_DIR)/libstdc++.orig
mv $(GCC_DIR)/libio $(GCC_DIR)/libio.orig
#
touch $(GCC_DIR)/.patched
# The --without-headers option stopped working with gcc 3.0 and has never been
# # fixed, so we need to actually have working C library header files prior to
# # the step or libgcc will not build...
$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
mkdir -p $(GCC_BUILD_DIR1)
-mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include
# Important! Required for limits.h to be fixed.
ln -sf include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
(cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=$(STAGING_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=c \
--disable-shared \
--includedir=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include \
--with-headers=$(TOOL_BUILD_DIR)/uClibc_dev/usr/include \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(EXTRA_GCC_CONFIG_OPTIONS));
touch $(GCC_BUILD_DIR1)/.configured
$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) all-gcc
touch $(GCC_BUILD_DIR1)/.compiled
$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) install-gcc
#rm -f $(STAGING_DIR)/bin/gccbug $(STAGING_DIR)/bin/gcov
#rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc $(STAGING_DIR)/share/locale
gcc2_95_initial: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
gcc2_95_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
gcc2_95_initial-dirclean:
rm -rf $(GCC_BUILD_DIR1)
#############################################################
#
# STLport -- an alternative C++ library
#
#############################################################
STLPORT_PATCH=$(SOURCE_DIR)/STLport-4.5.3.patch
$(DL_DIR)/$(STLPORT_SOURCE):
$(WGET) -P $(DL_DIR) $(STLPORT_SITE)/$(STLPORT_SOURCE)
$(STLPORT_DIR)/Makefile: $(DL_DIR)/$(STLPORT_SOURCE) $(STLPORT_PATCH)
zcat $(DL_DIR)/$(STLPORT_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
cat $(STLPORT_PATCH) | patch -d $(STLPORT_DIR) -p1
$(STLPORT_DIR)/lib/libstdc++.a: $(STLPORT_DIR)/Makefile
$(MAKE) ARCH=$(OPTIMIZE_FOR_CPU) PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) -C $(STLPORT_DIR)
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++.a: $(STLPORT_DIR)/lib/libstdc++.a
$(MAKE) ARCH=$(OPTIMIZE_FOR_CPU) PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME) -C $(STLPORT_DIR) install
stlport: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++.a
stlport-source: $(DL_DIR)/$(STLPORT_SOURCE)
stlport-clean:
rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++*
rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++*
-$(MAKE) -C $(STLPORT_DIR) clean
stlport-dirclean:
rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libstdc++*
rm -f $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/g++-v3*
rm -rf $(STLPORT_DIR)
#############################################################
#
# second pass compiler build. Build the compiler targeting
# the newly built shared uClibc library.
#
#############################################################
GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc2_95-final
$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
mkdir -p $(GCC_BUILD_DIR2)
(cd $(GCC_BUILD_DIR2); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=$(STAGING_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--with-gxx-include-dir=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++ \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(EXTRA_GCC_CONFIG_OPTIONS));
touch $(GCC_BUILD_DIR2)/.configured
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) all
touch $(GCC_BUILD_DIR2)/.compiled
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) install
# Strip the host binaries
ifeq ($(GCC_STRIP_HOST_BINARIES),true)
-strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/*
endif
# Set up the symlinks to enable lying about target name.
set -e; \
(cd $(STAGING_DIR); \
ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
cd bin; \
for app in $(REAL_GNU_TARGET_NAME)-* ; do \
ln -sf $${app} \
$(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \
done; \
);
touch $(GCC_BUILD_DIR2)/.installed
gcc2_95: uclibc-configured binutils gcc2_95_initial $(LIBFLOAT_TARGET) uclibc \
$(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS) $(STLPORT_TARGET)
gcc2_95-source: $(DL_DIR)/$(GCC_SOURCE)
gcc2_95-clean:
rm -rf $(GCC_BUILD_DIR2)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
gcc2_95-dirclean:
rm -rf $(GCC_BUILD_DIR2)
#############################################################
#
# Next build target gcc compiler
#
#############################################################
GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc2_95-target
$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR2)/.installed
mkdir -p $(GCC_BUILD_DIR3)
(cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=/usr \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--with-gxx-include-dir=/usr/include/c++ \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(EXTRA_GCC_CONFIG_OPTIONS));
touch $(GCC_BUILD_DIR3)/.configured
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
PATH=$(TARGET_PATH) \
$(MAKE) $(JLEVEL) $(TARGET_GCC_ARGS) -C $(GCC_BUILD_DIR3) all
touch $(GCC_BUILD_DIR3)/.compiled
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
PATH=$(TARGET_PATH) \
$(MAKE) $(JLEVEL) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install
# Remove broken specs file (cross compile flag is set).
rm -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
-(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1)
-(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1)
-(cd $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1)
-(cd $(TARGET_DIR)/usr/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1)
-(cd $(TARGET_DIR)/lib; $(STRIP) libgcc_s.so.*.*.* > /dev/null 2>&1)
#
rm -f $(TARGET_DIR)/usr/lib/*.la*
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
# Work around problem of missing syslimits.h
cp -f $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/include/syslimits.h $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/include/
# These are in /lib, so...
#rm -rf $(TARGET_DIR)/usr/lib/libgcc_s.so*
#touch -c $(TARGET_DIR)/usr/bin/gcc
gcc2_95_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc
gcc2_95_target-clean:
rm -rf $(GCC_BUILD_DIR3)
rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
gcc2_95_target-dirclean:
rm -rf $(GCC_BUILD_DIR3)
endif

View File

@ -0,0 +1,267 @@
# Makefile for to build a gcc/uClibc toolchain
#
# Copyright (C) 2002-2003 Erik Andersen <andersen@uclibc.org>
# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# 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
# General Public License for more details.
#
# You should have received a copy of the GNU 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
ifneq ($(GCC_2_95_TOOLCHAIN),true)
# Shiny new stuff...
GCC_VERSION:=3.3.3
GCC_SITE:=ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(GCC_VERSION)
#GCC_SITE:=http://www.binarycode.org/gcc/releases/gcc-$(GCC_VERSION)
#GCC_SITE:=http://gcc.get-software.com/releases/gcc-$(GCC_VERSION)
#
# snapshots....
#GCC_VERSION:=3.3-20031013
#GCC_SITE:=http://gcc.get-software.com/snapshots/$(GCC_VERSION)
#
GCC_SOURCE:=gcc-$(GCC_VERSION).tar.bz2
GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_VERSION)
GCC_CAT:=bzcat
GCC_STRIP_HOST_BINARIES:=true
#############################################################
#
# Setup some initial stuff
#
#############################################################
ifeq ($(INSTALL_LIBGCJ),true)
TARGET_LANGUAGES:=c,c++,java
else
ifeq ($(INSTALL_LIBSTDCPP),true)
TARGET_LANGUAGES:=c,c++
else
TARGET_LANGUAGES:=c
endif
endif
#############################################################
#
# build the first pass gcc compiler
#
#############################################################
GCC_BUILD_DIR1:=$(TOOL_BUILD_DIR)/gcc-3.3-initial
$(DL_DIR)/$(GCC_SOURCE):
$(WGET) -P $(DL_DIR) $(GCC_SITE)/$(GCC_SOURCE)
$(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
$(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(GCC_DIR)/.unpacked
$(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
# Apply any files named gcc-*.patch from the source directory to gcc
$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) gcc3.3-mega.patch.bz2
$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) gcc-uclibc-3.3*.patch
ifeq ($(SOFT_FLOAT),true)
ifeq ("$(strip $(ARCH))","i386")
$(SOURCE_DIR)/patch-kernel.sh $(GCC_DIR) $(SOURCE_DIR) i386-gcc-soft-float.patch
endif
endif
touch $(GCC_DIR)/.patched
# The --without-headers option stopped working with gcc 3.0 and has never been
# # fixed, so we need to actually have working C library header files prior to
# # the step or libgcc will not build...
$(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
mkdir -p $(GCC_BUILD_DIR1)
-mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include
(cd $(GCC_BUILD_DIR1); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=$(STAGING_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=c \
--disable-shared \
--includedir=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include \
--with-sysroot=$(TOOL_BUILD_DIR)/uClibc_dev/ \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(EXTRA_GCC_CONFIG_OPTIONS));
touch $(GCC_BUILD_DIR1)/.configured
$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) all-gcc
touch $(GCC_BUILD_DIR1)/.compiled
$(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR1) install-gcc
#rm -f $(STAGING_DIR)/bin/gccbug $(STAGING_DIR)/bin/gcov
#rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc $(STAGING_DIR)/share/locale
gcc3_3_initial: uclibc-configured binutils $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
gcc3_3_initial-clean:
rm -rf $(GCC_BUILD_DIR1)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
gcc3_3_initial-dirclean:
rm -rf $(GCC_BUILD_DIR1)
#############################################################
#
# second pass compiler build. Build the compiler targeting
# the newly built shared uClibc library.
#
#############################################################
GCC_BUILD_DIR2:=$(TOOL_BUILD_DIR)/gcc-3.3-final
$(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
mkdir -p $(GCC_BUILD_DIR2)
# Important! Required for limits.h to be fixed.
ln -sf include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
(cd $(GCC_BUILD_DIR2); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=$(STAGING_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--with-gxx-include-dir=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/include/c++ \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(GCC_USE_SJLJ_EXCEPTIONS) \
$(EXTRA_GCC_CONFIG_OPTIONS));
touch $(GCC_BUILD_DIR2)/.configured
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) all
touch $(GCC_BUILD_DIR2)/.compiled
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled
PATH=$(TARGET_PATH) $(MAKE) $(JLEVEL) -C $(GCC_BUILD_DIR2) install
# Strip the host binaries
ifeq ($(GCC_STRIP_HOST_BINARIES),true)
-strip --strip-all -R .note -R .comment $(STAGING_DIR)/bin/*
endif
# Set up the symlinks to enable lying about target name.
set -e; \
(cd $(STAGING_DIR); \
ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
cd bin; \
for app in $(REAL_GNU_TARGET_NAME)-* ; do \
ln -sf $${app} \
$(GNU_TARGET_NAME)$${app##$(REAL_GNU_TARGET_NAME)}; \
done; \
);
ifeq ($(SOFT_FLOAT),true)
# Replace specs file with one that defaults to soft float mode.
if [ ! -f $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \
echo staging dir specs file is missing ; \
/bin/false ; \
fi;
cp $(SOURCE_DIR)/specs-$(ARCH)-soft-float $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
endif
touch $(GCC_BUILD_DIR2)/.installed
gcc3_3: uclibc-configured binutils gcc3_3_initial $(LIBFLOAT_TARGET) uclibc \
$(GCC_BUILD_DIR2)/.installed $(GCC_TARGETS)
gcc3_3-source: $(DL_DIR)/$(GCC_SOURCE)
gcc3_3-clean:
rm -rf $(GCC_BUILD_DIR2)
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
gcc3_3-dirclean:
rm -rf $(GCC_BUILD_DIR2)
#############################################################
#
# Next build target gcc compiler
#
#############################################################
GCC_BUILD_DIR3:=$(BUILD_DIR)/gcc-3.3-target
$(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR2)/.installed
mkdir -p $(GCC_BUILD_DIR3)
(cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \
$(GCC_DIR)/configure \
--prefix=/usr \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=$(TARGET_LANGUAGES) \
--enable-shared \
--with-gxx-include-dir=/usr/include/c++ \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
$(DISABLE_NLS) \
$(MULTILIB) \
$(SOFT_FLOAT_CONFIG_OPTION) \
$(GCC_USE_SJLJ_EXCEPTIONS) \
$(EXTRA_GCC_CONFIG_OPTIONS));
touch $(GCC_BUILD_DIR3)/.configured
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
PATH=$(TARGET_PATH) \
$(MAKE) $(JLEVEL) $(TARGET_GCC_ARGS) -C $(GCC_BUILD_DIR3) all
touch $(GCC_BUILD_DIR3)/.compiled
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
PATH=$(TARGET_PATH) \
$(MAKE) $(JLEVEL) DESTDIR=$(TARGET_DIR) -C $(GCC_BUILD_DIR3) install
ifeq ($(SOFT_FLOAT),true)
# Replace specs file with one that defaults to soft float mode.
if [ ! -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs ] ; then \
echo target dir specs file is missing ; \
/bin/false ; \
fi;
cp $(SOURCE_DIR)/specs-$(ARCH)-soft-float $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
# Make sure gcc does not think we are cross compiling
$(SED) "s/^1/0/;" $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
else
# Remove broken specs file (cross compile flag is set).
rm -f $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/specs
endif
-(cd $(TARGET_DIR)/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1)
-(cd $(TARGET_DIR)/usr/bin; find -type f | xargs $(STRIP) > /dev/null 2>&1)
-(cd $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION); $(STRIP) cc1 cc1plus collect2 > /dev/null 2>&1)
-(cd $(TARGET_DIR)/usr/lib; $(STRIP) libstdc++.so.*.*.* > /dev/null 2>&1)
-(cd $(TARGET_DIR)/lib; $(STRIP) libgcc_s.so.*.*.* > /dev/null 2>&1)
#
rm -f $(TARGET_DIR)/usr/lib/*.la*
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
# Work around problem of missing syslimits.h
cp -f $(STAGING_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/include/syslimits.h $(TARGET_DIR)/usr/lib/gcc-lib/$(REAL_GNU_TARGET_NAME)/$(GCC_VERSION)/include/
# These are in /lib, so...
#rm -rf $(TARGET_DIR)/usr/lib/libgcc_s.so*
#touch -c $(TARGET_DIR)/usr/bin/gcc
gcc3_3_target: uclibc_target binutils_target $(TARGET_DIR)/usr/bin/gcc
gcc3_3_target-clean:
rm -rf $(GCC_BUILD_DIR3)
rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
gcc3_3_target-dirclean:
rm -rf $(GCC_BUILD_DIR3)
endif

View File

@ -0,0 +1,80 @@
#############################################################
#
# gdb
#
#############################################################
GDB_SITE:=ftp://ftp.gnu.org/gnu/gdb/
GDB_DIR:=$(BUILD_DIR)/gdb-5.3
GDB_SOURCE:=gdb-5.3.tar.gz
GDB_PATCH:=$(SOURCE_DIR)/gdb.patch
GDB_UCLIBC_PATCH:=$(SOURCE_DIR)/gdb-5.3-uclibc.patch
$(DL_DIR)/$(GDB_SOURCE):
$(WGET) -P $(DL_DIR) $(GDB_SITE)/$(GDB_SOURCE)
$(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) $(GDB_PATCH)
gunzip -c $(DL_DIR)/$(GDB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(GDB_PATCH) | patch -p1 -d $(GDB_DIR)
cat $(GDB_UCLIBC_PATCH) | patch -p1 -d $(GDB_DIR)
touch $(GDB_DIR)/.unpacked
$(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
# Copy a config.sub from gcc. This is only necessary until
# gdb's config.sub supports <arch>-linux-uclibc tuples.
cp $(GCC_DIR)/config.sub $(GDB_DIR)
cp $(GCC_DIR)/config.sub $(GDB_DIR)/readline/support/
(cd $(GDB_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
ac_cv_type_uintptr_t=yes \
gt_cv_func_gettext_libintl=yes \
ac_cv_func_dcgettext=yes \
gdb_cv_func_sigsetjmp=yes \
bash_cv_func_strcoll_broken=no \
bash_cv_must_reinstall_sighandlers=no \
bash_cv_func_sigsetjmp=present \
./configure \
--target=$(REAL_GNU_TARGET_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--includedir=$(STAGING_DIR)/include \
$(DISABLE_NLS) \
--without-uiout --disable-gdbmi \
--disable-tui --disable-gdbtk --without-x \
--disable-sim --enable-gdbserver \
--without-included-gettext \
);
ifeq ($(ENABLE_LOCALE),true)
-$(SED) "s,^INTL *=.*,INTL = -lintl,g;" $(GDB_DIR)/gdb/Makefile
endif
touch $(GDB_DIR)/.configured
$(GDB_DIR)/gdb/gdb: $(GDB_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GDB_DIR)
$(STRIP) $(GDB_DIR)/gdb/gdb
$(TARGET_DIR)/usr/bin/gdb: $(GDB_DIR)/gdb/gdb
install -c $(GDB_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
gdb: $(TARGET_DIR)/usr/bin/gdb
gdb-source: $(DL_DIR)/$(GDB_SOURCE)
gdb-clean:
$(MAKE) -C $(GDB_DIR) clean
gdb-dirclean:
rm -rf $(GDB_DIR)

View File

@ -0,0 +1,53 @@
#############################################################
#
# gdbserver
#
#############################################################
#Use GDB_DIR/etc values from gdb.mk
#Build gdbserver in a dir outside of the main gdb tree
GDB_WDIR:=$(BUILD_DIR)/gdbserver
$(GDB_WDIR)/.configured: $(GDB_DIR)/.unpacked
mkdir -p $(GDB_WDIR)
(cd $(GDB_WDIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(GDB_DIR)/gdb/gdbserver/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--includedir=$(STAGING_DIR)/include \
$(DISABLE_NLS) \
--without-uiout --disable-gdbmi \
--disable-tui --disable-gdbtk --without-x \
--without-included-gettext \
);
touch $(GDB_WDIR)/.configured
$(GDB_WDIR)/gdbserver: $(GDB_WDIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GDB_WDIR)
$(STRIP) $(GDB_WDIR)/gdbserver
$(TARGET_DIR)/usr/bin/gdbserver: $(GDB_WDIR)/gdbserver
install -c $(GDB_WDIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
gdbserver: $(TARGET_DIR)/usr/bin/gdbserver
gdbserver-clean:
$(MAKE) -C $(GDB_WDIR) clean
gdbserver-dirclean:
rm -rf $(GDB_WDIR)

View File

@ -0,0 +1,60 @@
#############################################################
#
# gettext
#
#############################################################
GETTEXT_SOURCE:=gettext-0.11.5.tar.gz
GETTEXT_SITE:=ftp://ftp.gnu.org/gnu/gettext
GETTEXT_DIR:=$(BUILD_DIR)/gettext-0.11.5
GETTEXT_CAT:=zcat
GETTEXT_BINARY:=gettext
GETTEXT_TARGET_BINARY:=usr/bin/gettext
$(DL_DIR)/$(GETTEXT_SOURCE):
$(WGET) -P $(DL_DIR) $(GETTEXT_SITE)/$(GETTEXT_SOURCE)
gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE)
$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE)
$(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(GETTEXT_DIR)/.unpacked
$(GETTEXT_DIR)/.configured: $(GETTEXT_DIR)/.unpacked
(cd $(GETTEXT_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
);
touch $(GETTEXT_DIR)/.configured
$(GETTEXT_DIR)/$(GETTEXT_BINARY): $(GETTEXT_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GETTEXT_DIR)
$(TARGET_DIR)/$(GETTEXT_TARGET_BINARY): $(GETTEXT_DIR)/$(GETTEXT_BINARY)
$(MAKE) DESTDIR=$(STAGING_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) install
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc \
$(TARGET_DIR)/usr/doc
gettext: uclibc $(TARGET_DIR)/$(GETTEXT_TARGET_BINARY)
gettext-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GETTEXT_DIR) uninstall
-$(MAKE) -C $(GETTEXT_DIR) clean
gettext-dirclean:
rm -rf $(GETTEXT_DIR)

View File

@ -0,0 +1,73 @@
#############################################################
#
# grep
#
#############################################################
GNUGREP_SOURCE:=grep_2.5.1.ds1.orig.tar.gz
GNUGREP_SITE:=http://ftp.debian.org/debian/pool/main/g/grep/
GNUGREP_DIR:=$(BUILD_DIR)/grep-2.5.1
GNUGREP_CAT:=zcat
GNUGREP_BINARY:=src/grep
GNUGREP_TARGET_BINARY:=bin/grep
$(DL_DIR)/$(GNUGREP_SOURCE):
$(WGET) -P $(DL_DIR) $(GNUGREP_SITE)/$(GNUGREP_SOURCE)
grep-source: $(DL_DIR)/$(GNUGREP_SOURCE)
$(GNUGREP_DIR)/.unpacked: $(DL_DIR)/$(GNUGREP_SOURCE)
rm -rf $(GNUGREP_DIR).xxx
$(GNUGREP_CAT) $(DL_DIR)/$(GNUGREP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv $(GNUGREP_DIR) $(GNUGREP_DIR).xxx
$(GNUGREP_CAT) $(GNUGREP_DIR).xxx/grep_2.5.1.tar.gz | tar -C $(BUILD_DIR) -xvf -
rm -rf $(GNUGREP_DIR).xxx
touch $(GNUGREP_DIR)/.unpacked
$(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked
(cd $(GNUGREP_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
--disable-perl-regexp \
--without-included-regex \
);
touch $(GNUGREP_DIR)/.configured
$(GNUGREP_DIR)/$(GNUGREP_BINARY): $(GNUGREP_DIR)/.configured
$(MAKE) -C $(GNUGREP_DIR)
# This stuff is needed to work around GNU make deficiencies
grep-target_binary: $(GNUGREP_DIR)/$(GNUGREP_BINARY)
@if [ -L $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) ] ; then \
rm -f $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY); fi;
@if [ ! -f $(GNUGREP_DIR)/$(GNUGREP_BINARY) -o $(TARGET_DIR)/$(GNUGREP_TARGET_BINARY) -ot \
$(GNUGREP_DIR)/$(GNUGREP_BINARY) ] ; then \
set -x; \
rm -f $(TARGET_DIR)/bin/grep $(TARGET_DIR)/bin/egrep $(TARGET_DIR)/bin/fgrep; \
cp -a $(GNUGREP_DIR)/src/grep $(GNUGREP_DIR)/src/egrep \
$(GNUGREP_DIR)/src/fgrep $(TARGET_DIR)/bin/; fi
grep: uclibc grep-target_binary
grep-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUGREP_DIR) uninstall
-$(MAKE) -C $(GNUGREP_DIR) clean
grep-dirclean:
rm -rf $(GNUGREP_DIR)

View File

@ -0,0 +1,70 @@
#############################################################
#
# gzip
#
#############################################################
GZIP_SOURCE:=gzip-1.3.5.tar.gz
GZIP_SITE:=ftp://alpha.gnu.org/gnu/gzip
GZIP_DIR:=$(BUILD_DIR)/gzip-1.3.5
GZIP_CAT:=zcat
GZIP_BINARY:=$(GZIP_DIR)/gzip
GZIP_TARGET_BINARY:=$(TARGET_DIR)/bin/zmore
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),false)
GZIP_LARGEFILE="--disable-largefile"
endif
$(DL_DIR)/$(GZIP_SOURCE):
$(WGET) -P $(DL_DIR) $(GZIP_SITE)/$(GZIP_SOURCE)
gzip-source: $(DL_DIR)/$(GZIP_SOURCE)
$(GZIP_DIR)/.unpacked: $(DL_DIR)/$(GZIP_SOURCE)
$(GZIP_CAT) $(DL_DIR)/$(GZIP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(GZIP_DIR)/.unpacked
$(GZIP_DIR)/.configured: $(GZIP_DIR)/.unpacked
(cd $(GZIP_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/ \
--bindir=/bin \
--sbindir=/bin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share/misc \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(GZIP_LARGEFILE) \
);
touch $(GZIP_DIR)/.configured
$(GZIP_BINARY): $(GZIP_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GZIP_DIR)
$(GZIP_TARGET_BINARY): $(GZIP_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GZIP_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
(cd $(TARGET_DIR)/bin; \
ln -sf gzip gunzip; \
ln -sf gzip zcat; \
ln -sf zdiff zcmp; \
ln -sf zgrep zegrep; \
ln -sf zgrep zfgrep;)
gzip: uclibc $(GZIP_TARGET_BINARY)
gzip-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GZIP_DIR) uninstall
-$(MAKE) -C $(GZIP_DIR) clean
gzip-dirclean:
rm -rf $(GZIP_DIR)

View File

@ -0,0 +1,53 @@
#############################################################
#
# hostap
#
#############################################################
HOSTAP_SOURCE_URL=http://hostap.epitest.fi/cgi-bin/viewcvs.cgi/hostap/hostap.tar.gz?tarball=1
HOSTAP_SOURCE=hostap.tar.gz
HOSTAP_DIR=$(BUILD_DIR)/hostap-snapshot
$(DL_DIR)/$(HOSTAP_SOURCE):
$(WGET) -P $(DL_DIR) $(HOSTAP_SOURCE_URL) -O $(DL_DIR)/$(HOSTAP_SOURCE)
hostap-source: $(DL_DIR)/$(HOSTAP_SOURCE)
$(HOSTAP_DIR)/.unpacked: $(DL_DIR)/$(HOSTAP_SOURCE)
zcat $(DL_DIR)/$(HOSTAP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv -f $(BUILD_DIR)/hostap $(HOSTAP_DIR)
touch $(HOSTAP_DIR)/.unpacked
$(HOSTAP_DIR)/.configured: $(HOSTAP_DIR)/.unpacked
#$(SED) "s,/.*#define PRISM2_DOWNLOAD_SUPPORT.*/,#define PRISM2_DOWNLOAD_SUPPORT,g" \
# $(HOSTAP_DIR)/driver/modules/hostap_config.h
touch $(HOSTAP_DIR)/.configured
$(HOSTAP_DIR)/utils/hostap_crypt_conf: $(HOSTAP_DIR)/.configured
$(MAKE) -C $(HOSTAP_DIR)/utils CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules"
$(MAKE) -C $(HOSTAP_DIR)/hostapd CC=$(TARGET_CC) CFLAGS="-Os -Wall $(TARGET_CFLAGS) -I../driver/modules -I../utils"
touch -c $(HOSTAP_DIR)/driver/modules/hostap.o
$(TARGET_DIR)//usr/bin/hostap_crypt_conf: $(HOSTAP_DIR)/utils/hostap_crypt_conf
# Make the dir
-rm -rf $(HOSTAP_TARGET_MODULE_DIR)
-mkdir -p $(HOSTAP_TARGET_MODULE_DIR)
# Copy the pcmcia-cs conf file
-mkdir -p $(TARGET_DIR)/etc/pcmcia
cp -af $(HOSTAP_DIR)/driver/etc/hostap_cs.conf $(TARGET_DIR)/etc/pcmcia/
# Copy The Utils
cp -af $(HOSTAP_DIR)/utils/hostap_crypt_conf $(TARGET_DIR)/usr/bin/
cp -af $(HOSTAP_DIR)/utils/hostap_diag $(TARGET_DIR)/usr/bin/
cp -af $(HOSTAP_DIR)/utils/prism2_param $(TARGET_DIR)/usr/bin/
cp -af $(HOSTAP_DIR)/utils/prism2_srec $(TARGET_DIR)/usr/bin/
# Copy hostapd
cp -af $(HOSTAP_DIR)/hostapd/hostapd $(TARGET_DIR)/usr/sbin/
hostap: pcmcia $(TARGET_DIR)//usr/bin/hostap_crypt_conf
hostap-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(HOSTAP_DIR) uninstall
-$(MAKE) -C $(HOSTAP_DIR) clean
hostap-dirclean:
rm -rf $(HOSTAP_DIR)

View File

@ -0,0 +1,39 @@
#############################################################
#
# hotplug support
#
#############################################################
HOTPLUG_SOURCE=diethotplug-0.4.tar.gz
HOTPLUG_SITE=http://aleron.dl.sourceforge.net/sourceforge/linux-hotplug
HOTPLUG_DIR=$(BUILD_DIR)/diethotplug-0.4
HOTPLUG_PATCH=$(SOURCE_DIR)/hotplug.patch
$(DL_DIR)/$(HOTPLUG_SOURCE):
$(WGET) -P $(DL_DIR) $(HOTPLUG_SITE)/$(HOTPLUG_SOURCE)
$(HOTPLUG_DIR): $(DL_DIR)/$(HOTPLUG_SOURCE) $(HOTPLUG_PATCH)
zcat $(DL_DIR)/$(HOTPLUG_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(HOTPLUG_PATCH) | patch -p1 -d $(HOTPLUG_DIR)
$(HOTPLUG_DIR)/hotplug: $(HOTPLUG_DIR)
$(MAKE) CROSS=$(TARGET_CROSS) DEBUG=false KLIBC=false \
KERNEL_INCLUDE_DIR=$(STAGING_DIR)/include \
TARGET_DIR=$(TARGET_DIR) -C $(HOTPLUG_DIR);
$(STRIP) $(HOTPLUG_DIR)/hotplug;
touch -c $(HOTPLUG_DIR)/hotplug
$(TARGET_DIR)/sbin/hotplug: $(HOTPLUG_DIR)/hotplug
cp $(HOTPLUG_DIR)/hotplug $(TARGET_DIR)/sbin/hotplug;
touch -c $(TARGET_DIR)/sbin/hotplug
hotplug: uclibc $(TARGET_DIR)/sbin/hotplug
hotplug-source: $(DL_DIR)/$(HOTPLUG_SOURCE)
hotplug-clean:
rm -f $(TARGET_DIR)/sbin/hotplug
-$(MAKE) -C $(HOTPLUG_DIR) clean
hotplug-dirclean:
rm -rf $(HOTPLUG_DIR)

View File

@ -0,0 +1,57 @@
#############################################################
#
# iproute2
#
#############################################################
IPROUTE2_DIR=$(BUILD_DIR)/iproute2
#IPROUTE2_SOURCE_URL=ftp://ftp.inr.ac.ru/ip-routing/
#IPROUTE2_SOURCE=iproute2-2.4.7-now-ss020116-try.tar.gz
#Use the debian source for now, as the .ru site has availability problems
IPROUTE2_SOURCE_URL=http://ftp.debian.org/debian/pool/main/i/iproute/
IPROUTE2_SOURCE=iproute_20010824.orig.tar.gz
IPROUTE2_PATCH:=iproute_20010824-8.diff.gz
$(DL_DIR)/$(IPROUTE2_SOURCE):
$(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)$(IPROUTE2_SOURCE)
$(DL_DIR)/$(IPROUTE2_PATCH):
$(WGET) -P $(DL_DIR) $(IPROUTE2_SOURCE_URL)/$(IPROUTE2_PATCH)
iproute2-source: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
$(IPROUTE2_DIR)/.unpacked: $(DL_DIR)/$(IPROUTE2_SOURCE) #$(DL_DIR)/$(IPROUTE2_PATCH)
rm -rf $(IPROUTE2_DIR).orig $(IPROUTE2_DIR)
zcat $(DL_DIR)/$(IPROUTE2_SOURCE) | tar -C $(BUILD_DIR) -xvf -
#zcat $(DL_DIR)/$(IPROUTE2_PATCH) | patch -p1 -d $(IPROUTE2_DIR)
touch $(IPROUTE2_DIR)/.unpacked
$(IPROUTE2_DIR)/.configured: $(IPROUTE2_DIR)/.unpacked
$(SED) "s,-I/usr/include/db3,," $(IPROUTE2_DIR)/Makefile
$(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
$(IPROUTE2_DIR)/Makefile
$(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
$(IPROUTE2_DIR)/Makefile
# For now disable compiling of the misc directory because it seems to fail
rm -rf $(IPROUTE2_DIR)/misc
$(SED) "s, misc,," $(IPROUTE2_DIR)/Makefile
touch $(IPROUTE2_DIR)/.configured
$(IPROUTE2_DIR)/tc/tc: $(IPROUTE2_DIR)/.configured
$(MAKE) -C $(IPROUTE2_DIR) KERNEL_INCLUDE=$(LINUX_SOURCE_DIR)/include CC=$(TARGET_CC) AR=$(TARGET_AR)
$(TARGET_DIR)/usr/sbin/tc: $(IPROUTE2_DIR)/tc/tc
# Copy The tc binary
cp -af $(IPROUTE2_DIR)/tc/tc $(TARGET_DIR)/usr/sbin/
iproute2: $(TARGET_DIR)/usr/sbin/tc
iproute2-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(IPROUTE2_DIR) uninstall
-$(MAKE) -C $(IPROUTE2_DIR) clean
iproute2-dirclean:
rm -rf $(IPROUTE2_DIR)

View File

@ -0,0 +1,51 @@
#############################################################
#
# iptables
#
#############################################################
IPTABLES_SOURCE_URL=http://www.netfilter.org/files
IPTABLES_SOURCE=iptables-1.2.9.tar.bz2
IPTABLES_BUILD_DIR=$(BUILD_DIR)/iptables-1.2.9
$(DL_DIR)/$(IPTABLES_SOURCE):
$(WGET) -P $(DL_DIR) $(IPTABLES_SOURCE_URL)/$(IPTABLES_SOURCE)
$(IPTABLES_BUILD_DIR)/.unpacked: $(DL_DIR)/$(IPTABLES_SOURCE)
bzcat $(DL_DIR)/$(IPTABLES_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(IPTABLES_BUILD_DIR)/.unpacked
$(IPTABLES_BUILD_DIR)/.configured: $(IPTABLES_BUILD_DIR)/.unpacked
# Allow patches. Needed for openwrt for instance.
$(SOURCE_DIR)/patch-kernel.sh $(IPTABLES_BUILD_DIR) $(SOURCE_DIR) iptables-*.patch
#
$(SED) "s;\[ -f /usr/include/netinet/ip6.h \];grep -q '__UCLIBC_HAS_IPV6__ 1' \
$(BUILD_DIR)/uClibc/include/bits/uClibc_config.h;" $(IPTABLES_BUILD_DIR)/Makefile
touch $(IPTABLES_BUILD_DIR)/.configured
$(IPTABLES_BUILD_DIR)/iptables: $(IPTABLES_BUILD_DIR)/.configured
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) -C $(IPTABLES_BUILD_DIR) \
KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)"
$(TARGET_DIR)/sbin/iptables: $(IPTABLES_BUILD_DIR)/iptables
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) -C $(IPTABLES_BUILD_DIR) \
KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \
DESTDIR=$(TARGET_DIR) install
$(STRIP) $(TARGET_DIR)/usr/sbin/iptables*
$(STRIP) $(TARGET_DIR)/usr/lib/iptables/*.so
rm -rf $(TARGET_DIR)/usr/man
iptables: $(TARGET_DIR)/sbin/iptables
iptables-source: $(DL_DIR)/$(IPTABLES_SOURCE)
iptables-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(IPTABLES_BUILD_DIR) uninstall
-$(MAKE) -C $(IPTABLES_BUILD_DIR) clean
iptables-dirclean:
rm -rf $(IPTABLES_BUILD_DIR)

View File

@ -0,0 +1,49 @@
#############################################################
#
# mtd provides us with mkfs.jffs2, to target JFFS2 filesystems
#
#############################################################
MTD_DIR:=$(BUILD_DIR)/mtd-20011217
MTD_SOURCE=mtd_20011217.orig.tar.gz
MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd
MKFS_JFFS2=$(shell which mkfs.jffs2 || echo $(MTD_DIR)/util/mkfs.jffs2)
$(DL_DIR)/$(MTD_SOURCE):
$(WGET) -P $(DL_DIR) $(MTD_SITE)/$(MTD_SOURCE)
$(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE)
zcat $(DL_DIR)/$(MTD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(MTD_DIR)/.unpacked
$(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked
CFLAGS=-I$(LINUX_DIR)/include $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util
mtd: $(MKFS_JFFS2)
#############################################################
#
# Build the jffs2 root filesystem image
#
#############################################################
jffs2root: mtd
#-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true;
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
@rm -rf $(TARGET_DIR)/usr/man
@rm -rf $(TARGET_DIR)/usr/info
$(MKFS_JFFS2) --pad --little-endian --squash -e 0x20000 \
-D $(SOURCE_DIR)/device_table.txt -d $(TARGET_DIR) \
-o $(IMAGE)
jffs2root-source: $(DL_DIR)/$(MTD_SOURCE)
jffs2root-clean:
-$(MAKE) -C $(MTD_DIR) clean
jffs2root-dirclean:
rm -rf $(MTD_DIR)

View File

@ -0,0 +1,73 @@
#############################################################
#
# jpeg (libraries needed by some apps)
#
#############################################################
# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
#
# 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.
#
# 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.
#
# 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
JPEG_DIR=$(BUILD_DIR)/jpeg-6b
JPEG_SITE:=ftp://ftp.uu.net/graphics/jpeg/
JPEG_SOURCE=jpegsrc.v6b.tar.gz
JPEG_CAT:=zcat
$(DL_DIR)/$(JPEG_SOURCE):
$(WGET) -P $(DL_DIR) $(JPEG_SITE)/$(JPEG_SOURCE)
jpeg-source: $(DL_DIR)/$(JPEG_SOURCE)
$(JPEG_DIR)/.unpacked: $(DL_DIR)/$(JPEG_SOURCE)
$(JPEG_CAT) $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# The config.guess distributed with the package is not able
# to handle cross compilation. Use the one from binutils.
cp $(BINUTILS_DIR)/config.guess $(JPEG_DIR)/
touch $(JPEG_DIR)/.unpacked
$(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
(cd $(JPEG_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--enable-shared \
);
touch $(JPEG_DIR)/.configured
$(STAGING_DIR)/lib/libjpeg.so.62.0.0: $(JPEG_DIR)/.configured
$(MAKE) -C $(JPEG_DIR) all
# Note: This does not install the utilities.
$(MAKE) -C $(JPEG_DIR) prefix=$(STAGING_DIR) exec_prefix=$(STAGING_DIR) install-headers install-lib
$(TARGET_DIR)/lib/libjpeg.so.62.0.0: $(STAGING_DIR)/lib/libjpeg.so.62.0.0
cp -dpf $(STAGING_DIR)/lib/libjpeg.so* $(TARGET_DIR)/usr/lib/
-$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libjpeg.so.62.0.0
jpeg: uclibc $(TARGET_DIR)/lib/libjpeg.so.62.0.0
jpeg-clean:
-$(MAKE) -C $(JPEG_DIR) clean

View File

@ -0,0 +1,85 @@
#############################################################
#
# Setup the kernel headers. I include a generic package of
# kernel headers here, so you shouldn't need to include your
# own. Be aware these kernel headers _will_ get blown away
# by a 'make clean' so don't put anything sacred in here...
#
#############################################################
ifneq ($(filter $(TARGETS),kernel-headers),)
VERSION=2
PATCHLEVEL=4
SUBLEVEL=25
LINUX_SITE:=http://www.uclibc.org/downloads/toolchain
LINUX_SOURCE:=kernel-headers-2.4.25.tar.bz2
LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux
# Uncomment this for 2.6.x kernel header files
#VERSION=2
#PATCHLEVEL=6
#SUBLEVEL=5
#LINUX_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
#LINUX_SOURCE:=linux-libc-headers-2.6.5.0.tar.bz2
#LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.5.0
LINUX_DIR:=$(TOOL_BUILD_DIR)/linux
$(DL_DIR)/$(LINUX_SOURCE):
$(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
mkdir -p $(TOOL_BUILD_DIR)
bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
ifneq ($(LINUX_UNPACK_DIR),$(LINUX_DIR))
mv $(LINUX_UNPACK_DIR) $(LINUX_DIR)
endif
touch $(LINUX_DIR)/.unpacked
$(LINUX_DIR)/.configured: $(LINUX_DIR)/.unpacked
rm -f $(LINUX_DIR)/include/asm
@if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
echo -e "VERSION = $(VERSION)\nPATCHLEVEL = $(PATCHLEVEL)\n" > \
$(LINUX_DIR)/Makefile; \
echo -e "SUBLEVEL = $(SUBLEVEL)\nEXTRAVERSION =\n" > \
$(LINUX_DIR)/Makefile; \
echo -e "KERNELRELEASE=\$$(VERSION).\$$(PATCHLEVEL).\$$(SUBLEVEL)\$$(EXTRAVERSION)" >> \
$(LINUX_DIR)/Makefile; \
fi;
@if [ "$(ARCH)" = "powerpc" ];then \
(cd $(LINUX_DIR)/include; ln -fs asm-ppc$(NOMMU) asm;) \
elif [ "$(ARCH)" = "mips" ];then \
(cd $(LINUX_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
elif [ "$(ARCH)" = "mipsel" ];then \
(cd $(LINUX_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
elif [ "$(ARCH)" = "arm" ];then \
(cd $(LINUX_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \
cd asm; \
if [ ! -L proc ] ; then \
ln -fs proc-armv proc; \
ln -fs arch-ebsa285 arch; fi); \
elif [ "$(ARCH)" = "cris" ];then \
(cd $(LINUX_DIR)/include; ln -fs asm-cris asm;) \
else \
(cd $(LINUX_DIR)/include; ln -fs asm-$(ARCH)$(NOMMU) asm;) \
fi
touch $(LINUX_DIR)/include/linux/autoconf.h;
touch $(LINUX_DIR)/.configured
$(LINUX_KERNEL): $(LINUX_DIR)/.configured
kernel-headers: $(LINUX_DIR)/.configured
kernel-headers-source: $(DL_DIR)/$(LINUX_SOURCE)
kernel-headers-clean: clean
rm -f $(LINUX_KERNEL)
rm -rf $(LINUX_DIR)
kernel-headers-dirclean:
rm -rf $(LINUX_DIR)
endif

View File

@ -0,0 +1,48 @@
#############################################################
#
# less
#
#############################################################
LESS_SOURCE=less-381.tar.gz
LESS_SITE=http://www.greenwoodsoftware.com/less
LESS_DIR=$(BUILD_DIR)/less-381
LESS_BINARY=less
LESS_TARGET_BINARY=usr/bin/less
$(DL_DIR)/$(LESS_SOURCE):
$(WGET) -P $(DL_DIR) $(LESS_SITE)/$(LESS_SOURCE)
$(LESS_DIR)/.source: $(DL_DIR)/$(LESS_SOURCE)
zcat $(DL_DIR)/$(LESS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(LESS_DIR)/.source
$(LESS_DIR)/.configured: $(LESS_DIR)/.source
(cd $(LESS_DIR); \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
);
touch $(LESS_DIR)/.configured;
$(LESS_DIR)/$(LESS_BINARY): $(LESS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(LESS_DIR)
$(TARGET_DIR)/$(LESS_TARGET_BINARY): $(LESS_DIR)/$(LESS_BINARY)
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LESS_DIR) install
rm -Rf $(TARGET_DIR)/usr/man
less: uclibc $(TARGET_DIR)/$(LESS_TARGET_BINARY)
less-source: $(DL_DIR)/$(LESS_SOURCE)
less-clean:
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LESS_DIR) uninstall
-$(MAKE) -C $(LESS_DIR) clean
less-dirclean:
rm -rf $(LESS_DIR)

View File

@ -0,0 +1,55 @@
#############################################################
#
# libfloat
#
#############################################################
LIBFLOAT_SOURCE:=libfloat_990616.orig.tar.gz
LIBFLOAT_PATCH:=libfloat_990616-3.diff.gz
LIBFLOAT_SITE:=http://ftp.debian.org/debian/pool/main/libf/libfloat
LIBFLOAT_CAT:=zcat
LIBFLOAT_DIR:=$(BUILD_DIR)/libfloat
LIBFLOAT_TARGET=
ifeq ($(strip $(SOFT_FLOAT)),true)
ifeq ("$(strip $(ARCH))","arm")
LIBFLOAT_TARGET+=$(STAGING_DIR)/lib/libfloat.so
endif
endif
$(DL_DIR)/$(LIBFLOAT_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_SOURCE)
$(DL_DIR)/$(LIBFLOAT_PATCH):
$(WGET) -P $(DL_DIR) $(LIBFLOAT_SITE)/$(LIBFLOAT_PATCH)
libfloat-source: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
$(LIBFLOAT_DIR)/.unpacked: $(DL_DIR)/$(LIBFLOAT_SOURCE) $(DL_DIR)/$(LIBFLOAT_PATCH)
$(LIBFLOAT_CAT) $(DL_DIR)/$(LIBFLOAT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# Remove the binary files distributed with the the package.
make -C $(LIBFLOAT_DIR) clean
$(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(DL_DIR) $(LIBFLOAT_PATCH)
$(SOURCE_DIR)/patch-kernel.sh $(LIBFLOAT_DIR) $(SOURCE_DIR) libfloat.patch
touch $(LIBFLOAT_DIR)/.unpacked
$(LIBFLOAT_DIR)/libfloat.so.1: $(LIBFLOAT_DIR)/.unpacked $(TARGET_CC)
$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld -C $(LIBFLOAT_DIR)
$(STAGING_DIR)/lib/libfloat.so: $(LIBFLOAT_DIR)/libfloat.so.1
cp -a $(LIBFLOAT_DIR)/libfloat.a $(STAGING_DIR)/lib/libfloat.a
cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(STAGING_DIR)/lib/libfloat.so.1
(cd $(STAGING_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
cp -a $(LIBFLOAT_DIR)/libfloat.a $(TARGET_DIR)/usr/lib/libfloat.a
cp -a $(LIBFLOAT_DIR)/libfloat.so.1 $(TARGET_DIR)/lib/libfloat.so.1
$(STRIP) $(TARGET_DIR)/lib/libfloat.so.1 > /dev/null 2>&1
(cd $(TARGET_DIR)/lib ; ln -sf libfloat.so.1 libfloat.so)
(cd $(TARGET_DIR)/usr/lib ; ln -sf /lib/libfloat.so libfloat.so)
libfloat: $(STAGING_DIR)/lib/libfloat.so
libfloat-clean:
-$(MAKE) -C $(LIBFLOAT_DIR) clean
libfloat-dirclean:
rm -rf $(LIBFLOAT_DIR)

View File

@ -0,0 +1,79 @@
#############################################################
#
# libglib1.2
#
#############################################################
LIBGLIB12_SOURCE:=glib-1.2.10.tar.gz
LIBGLIB12_SITE:=ftp://ftp.gtk.org/pub/gtk/v1.2
LIBGLIB12_CAT:=zcat
LIBGLIB12_DIR:=$(BUILD_DIR)/glib-1.2.10
LIBGLIB12_BINARY:=libglib.a
LIBGLIB12_PATCH:=$(SOURCE_DIR)/libglib_configure_1.2.10.bz2
$(DL_DIR)/$(LIBGLIB12_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBGLIB12_SITE)/$(LIBGLIB12_SOURCE)
libglib12-source: $(DL_DIR)/$(LIBGLIB12_SOURCE)
$(LIBGLIB12_DIR)/.unpacked: $(DL_DIR)/$(LIBGLIB12_SOURCE)
$(LIBGLIB12_CAT) $(DL_DIR)/$(LIBGLIB12_SOURCE) | tar -C $(BUILD_DIR) -xvf -
bzcat $(LIBGLIB12_PATCH) | patch -p1 -d $(LIBGLIB12_DIR)
touch $(LIBGLIB12_DIR)/.unpacked
$(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked
(cd $(LIBGLIB12_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--enable-shared \
);
touch $(LIBGLIB12_DIR)/.configured
$(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(LIBGLIB12_DIR)
$(STAGING_DIR)/lib/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY)
$(MAKE) prefix=$(STAGING_DIR) \
exec_prefix=$(STAGING_DIR) \
bindir=$(STAGING_DIR)/bin \
sbindir=$(STAGING_DIR)/sbin \
libexecdir=$(STAGING_DIR)/libexec \
datadir=$(STAGING_DIR)/share \
sysconfdir=$(STAGING_DIR)/etc \
sharedstatedir=$(STAGING_DIR)/com \
localstatedir=$(STAGING_DIR)/var \
libdir=$(STAGING_DIR)/lib \
includedir=$(STAGING_DIR)/include \
oldincludedir=$(STAGING_DIR)/include \
infodir=$(STAGING_DIR)/info \
mandir=$(STAGING_DIR)/man \
-C $(LIBGLIB12_DIR) install;
$(TARGET_DIR)/lib/$(LIBGLIB12_BINARY): $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY)
cp -a $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) $(TARGET_DIR)/lib/
cp -a $(STAGING_DIR)/lib/libglib.so $(TARGET_DIR)/lib/
cp -a $(STAGING_DIR)/lib/libglib-1.2.so.0 $(TARGET_DIR)/lib/
$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY)
libglib12: uclibc $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY)
libglib12-clean:
rm -f $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY)
-$(MAKE) -C $(LIBGLIB12_DIR) clean
libglib12-dirclean:
rm -rf $(LIBGLIB12_DIR)

View File

@ -0,0 +1,56 @@
#############################################################
#
# libmad
#
#############################################################
LIBMAD_VERSION=0.15.0b
# Don't alter below this line unless you (think) you know
# what you are doing! Danger, Danger!
LIBMAD_SOURCE=libmad-$(LIBMAD_VERSION).tar.gz
LIBMAD_SITE=http://easynews.dl.sourceforge.net/sourceforge/mad/
LIBMAD_DIR=$(BUILD_DIR)/${shell basename $(LIBMAD_SOURCE) .tar.gz}
LIBMAD_WORKDIR=$(BUILD_DIR)/libmad-$(LIBMAD_VERSION)
$(DL_DIR)/$(LIBMAD_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBMAD_SITE)/$(LIBMAD_SOURCE)
$(LIBMAD_DIR)/.unpacked: $(DL_DIR)/$(LIBMAD_SOURCE)
gzip -d -c $(DL_DIR)/$(LIBMAD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(LIBMAD_DIR)/.unpacked
$(LIBMAD_DIR)/.configured: $(LIBMAD_DIR)/.unpacked
(cd $(LIBMAD_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
$(DISABLE_NLS) \
);
touch $(LIBMAD_DIR)/.configured
$(LIBMAD_WORKDIR)/libmad: $(LIBMAD_DIR)/.configured
rm -f $@
$(MAKE) CC=$(TARGET_CC) -C $(LIBMAD_WORKDIR)
$(LIBMAD_WORKDIR)/.installed: $(LIBMAD_WORKDIR)/libmad
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBMAD_WORKDIR) install
touch $(LIBMAD_WORKDIR)/.installed
libmad: uclibc $(LIBMAD_WORKDIR)/.installed
libmad-source: $(DL_DIR)/$(LIBMAD_SOURCE)
libmad-clean:
@if [ -d $(LIBMAD_WORKDIR)/Makefile ] ; then \
$(MAKE) -C $(LIBMAD_WORKDIR) clean ; \
fi;
libmad-dirclean:
rm -rf $(LIBMAD_DIR) $(LIBMAD_WORKDIR)

View File

@ -0,0 +1,77 @@
#############################################################
#
# libtool
#
#############################################################
LIBTOOL_SOURCE:=libtool_1.4.3.orig.tar.gz
LIBTOOL_SITE:=http://ftp.debian.org/debian/pool/main/libt/libtool
LIBTOOL_CAT:=zcat
LIBTOOL_DIR:=$(BUILD_DIR)/libtool-1.4.3
LIBTOOL_BINARY:=libtool
LIBTOOL_TARGET_BINARY:=usr/bin/libtool
$(DL_DIR)/$(LIBTOOL_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBTOOL_SITE)/$(LIBTOOL_SOURCE)
libtool-source: $(DL_DIR)/$(LIBTOOL_SOURCE)
$(LIBTOOL_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE)
$(LIBTOOL_CAT) $(DL_DIR)/$(LIBTOOL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(LIBTOOL_DIR)/.unpacked
$(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked
(cd $(LIBTOOL_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(LIBTOOL_DIR)/.configured
$(LIBTOOL_DIR)/$(LIBTOOL_BINARY): $(LIBTOOL_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(LIBTOOL_DIR)
touch -c $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
$(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY): $(LIBTOOL_DIR)/$(LIBTOOL_BINARY)
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
sbindir=$(TARGET_DIR)/usr/sbin \
libexecdir=$(TARGET_DIR)/usr/lib \
datadir=$(TARGET_DIR)/usr/share \
sysconfdir=$(TARGET_DIR)/etc \
localstatedir=$(TARGET_DIR)/var \
libdir=$(TARGET_DIR)/usr/lib \
infodir=$(TARGET_DIR)/usr/info \
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(LIBTOOL_DIR) install;
$(STRIP) $(TARGET_DIR)//usr/lib/libltdl.so.*.*.* > /dev/null 2>&1
$(SED) "s,^CC.*,CC=\"/usr/bin/gcc\"," $(TARGET_DIR)/usr/bin/libtool
$(SED) "s,^LD.*,LD=\"/usr/bin/ld\"," $(TARGET_DIR)/usr/bin/libtool
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
libtool: uclibc $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY)
libtool-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LIBTOOL_DIR) uninstall
-$(MAKE) -C $(LIBTOOL_DIR) clean
libtool-dirclean:
rm -rf $(LIBTOOL_DIR)

View File

@ -0,0 +1,54 @@
#############################################################
#
# links (text based web browser)
#
#############################################################
LINKS_SITE:=http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/links/download/no-ssl
LINKS_SOURCE:=links-0.99pre9-no-ssl.tar.gz
LINKS_DIR:=$(BUILD_DIR)/links-0.99pre9-no-ssl
$(DL_DIR)/$(LINKS_SOURCE):
$(WGET) -P $(DL_DIR) $(LINKS_SITE)/$(LINKS_SOURCE)
links-source: $(DL_DIR)/$(LINKS_SOURCE)
$(LINKS_DIR)/.unpacked: $(DL_DIR)/$(LINKS_SOURCE)
zcat $(DL_DIR)/$(LINKS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(LINKS_DIR)/.unpacked
$(LINKS_DIR)/.configured: $(LINKS_DIR)/.unpacked
(cd $(LINKS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/tmp \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(LINKS_DIR)/.configured
$(LINKS_DIR)/links: $(LINKS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(LINKS_DIR)
$(STRIP) $(LINKS_DIR)/links
$(TARGET_DIR)/usr/bin/links: $(LINKS_DIR)/links
install -c $(LINKS_DIR)/links $(TARGET_DIR)/usr/bin/links
links-clean:
$(MAKE) -C $(LINKS_DIR) clean
links-dirclean:
rm -rf $(LINKS_DIR)
links: uclibc $(TARGET_DIR)/usr/bin/links

View File

@ -0,0 +1,113 @@
#############################################################
#
# Linux kernel targets
#
# Note: If you have any patches to apply, create the directory
# sources/kernel-patches and put your patches in there and number
# them in the order you wish to apply them... i.e.
#
# sources/kernel-patches/001-my-special-stuff.bz2
# sources/kernel-patches/003-gcc-Os.bz2
# sources/kernel-patches/004_no-warnings.bz2
# sources/kernel-patches/030-lowlatency-mini.bz2
# sources/kernel-patches/031-lowlatency-fixes-5.bz2
# sources/kernel-patches/099-shutup.bz2
# etc...
#
# these patches will all be applied by the patch-kernel.sh
# script (which will also abort the build if it finds rejects)
# -Erik
#
#############################################################
ifneq ($(filter $(TARGETS),linux),)
# Version of Linux to download and then apply patches to
DOWNLOAD_LINUX_VERSION=2.4.25
# Version of Linux AFTER patches
LINUX_VERSION=2.4.26-pre5-erik
LINUX_FORMAT=bzImage
#LINUX_FORMAT=images/zImage.prep
LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
-e 's/mipsel/mips/' \
-e 's/powerpc/ppc/' \
-e 's/sh[234]/sh/' \
)
LINUX_BINLOC=arch/$(LINUX_KARCH)/boot/$(LINUX_FORMAT)
LINUX_DIR=$(BUILD_DIR)/linux-$(LINUX_VERSION)
LINUX_SOURCE=linux-$(DOWNLOAD_LINUX_VERSION).tar.bz2
LINUX_SITE=ftp://ftp.kernel.org/pub/linux/kernel/v2.4
LINUX_KCONFIG=$(SOURCE_DIR)/linux.config
LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel
# Used by pcmcia-cs and others
LINUX_SOURCE_DIR=$(LINUX_DIR)
$(DL_DIR)/$(LINUX_SOURCE):
$(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
$(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
mkdir -p $(LINUX_DIR) $(TOOL_BUILD_DIR)
rm -rf $(LINUX_DIR)
bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
ifneq ($(DOWNLOAD_LINUX_VERSION),$(LINUX_VERSION))
# Rename the dir from the downloaded version to the AFTER patch version
mv -f $(BUILD_DIR)/linux-$(DOWNLOAD_LINUX_VERSION) $(BUILD_DIR)/linux-$(LINUX_VERSION)
endif
mkdir -p $(SOURCE_DIR)/kernel-patches
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR) $(SOURCE_DIR)/kernel-patches
-(cd $(TOOL_BUILD_DIR); ln -sf $(LINUX_DIR) linux)
touch $(LINUX_DIR)/.unpacked
$(LINUX_KCONFIG):
@if [ ! -f "$(LINUX_KCONFIG)" ] ; then \
echo ""; \
echo "You should create a .config for your kernel"; \
echo "and install it as $(LINUX_KCONFIG)"; \
echo ""; \
sleep 5; \
fi;
$(LINUX_DIR)/.configured $(BUILD_DIR)/linux/.configured: $(LINUX_DIR)/.unpacked $(LINUX_KCONFIG)
$(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile
-cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
$(MAKE) -C $(LINUX_DIR) oldconfig include/linux/version.h
touch $(LINUX_DIR)/.configured
$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
$(MAKE) -C $(LINUX_DIR) dep
touch $(LINUX_DIR)/.depend_done
$(LINUX_DIR)/$(LINUX_BINLOC): $(LINUX_DIR)/.depend_done
$(MAKE) -C $(LINUX_DIR) $(LINUX_FORMAT)
$(MAKE) -C $(LINUX_DIR) modules
$(LINUX_KERNEL): $(LINUX_DIR)/$(LINUX_BINLOC)
cp -fa $(LINUX_DIR)/$(LINUX_BINLOC) $(LINUX_KERNEL)
touch -c $(LINUX_KERNEL)
$(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep: $(LINUX_KERNEL)
rm -rf $(TARGET_DIR)/lib/modules
rm -f $(TARGET_DIR)/sbin/cardmgr
$(MAKE) -C $(LINUX_DIR) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
(cd $(TARGET_DIR)/lib/modules; ln -s $(LINUX_VERSION)/kernel/drivers .)
$(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
mkdir -p $(STAGING_DIR)/include
tar -ch -C $(LINUX_DIR)/include -f - linux | tar -xf - -C $(STAGING_DIR)/include/
tar -ch -C $(LINUX_DIR)/include -f - asm | tar -xf - -C $(STAGING_DIR)/include/
linux: $(STAGING_DIR)/include/linux/version.h $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep
linux-source: $(DL_DIR)/$(LINUX_SOURCE)
# This has been renamed so we do _NOT_ by default run this on 'make clean'
linuxclean: clean
rm -f $(LINUX_KERNEL)
-$(MAKE) -C $(LINUX_DIR) clean
linux-dirclean:
rm -rf $(LINUX_DIR)
endif

View File

@ -0,0 +1,76 @@
#############################################################
#
# lrzsz (provides zmodem)
#
#############################################################
# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
#
# 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.
#
# 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.
#
# 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
LRZSZ_SITE:=http://www.ohse.de/uwe/releases
LRZSZ_SOURCE:=lrzsz-0.12.20.tar.gz
LRZSZ_DIR:=$(BUILD_DIR)/lrzsz-0.12.20
$(DL_DIR)/$(LRZSZ_SOURCE):
$(WGET) -P $(DL_DIR) $(LRZSZ_SITE)/$(LRZSZ_SOURCE)
lrzsz-source: $(DL_DIR)/$(LRZSZ_SOURCE)
$(LRZSZ_DIR)/.unpacked: $(DL_DIR)/$(LRZSZ_SOURCE)
zcat $(DL_DIR)/$(LRZSZ_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(LRZSZ_DIR)/.unpacked
$(LRZSZ_DIR)/.configured: $(LRZSZ_DIR)/.unpacked
(cd $(LRZSZ_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/tmp \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--disable-timesync \
);
$(SED) "s/-lnsl//;" $(LRZSZ_DIR)/src/Makefile
$(SED) "s~\(#define ENABLE_SYSLOG.*\)~/* \1 */~;" $(LRZSZ_DIR)/config.h
touch $(LRZSZ_DIR)/.configured
$(LRZSZ_DIR)/src/lrz: $(LRZSZ_DIR)/.configured
$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(LRZSZ_DIR)
$(STRIP) $(LRZSZ_DIR)/src/lrz $(LRZSZ_DIR)/src/lsz
$(TARGET_DIR)/usr/bin/rz: $(LRZSZ_DIR)/src/lrz
cp $(LRZSZ_DIR)/src/lrz $(TARGET_DIR)/usr/bin/rz
cp $(LRZSZ_DIR)/src/lsz $(TARGET_DIR)/usr/bin/sz
lrzsz: uclibc $(TARGET_DIR)/usr/bin/rz
lrzsz-clean:
rm -f $(TARGET_DIR)/usr/bin/rz
-$(MAKE) -C $(LRZSZ_DIR) clean
lrzsz-dirclean:
rm -rf $(LRZSZ_DIR)

View File

@ -0,0 +1,39 @@
#############################################################
#
# ltp-testsuite
#
#############################################################
LTP_TESTSUITE_SOURCE:=ltp-full-20040206.tgz
LTP_TESTSUITE_SITE:=http://aleron.dl.sourceforge.net/sourceforge/ltp
LTP_TESTSUITE_CAT:=zcat
LTP_TESTSUITE_DIR:=$(BUILD_DIR)/ltp-full-20040206
LTP_TESTSUITE_PATCH:=$(SOURCE_DIR)/ltp-testsuite.patch
$(DL_DIR)/$(LTP_TESTSUITE_SOURCE):
$(WGET) -P $(DL_DIR) $(LTP_TESTSUITE_SITE)/$(LTP_TESTSUITE_SOURCE)
ltp-testsuite-source: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE)
$(LTP_TESTSUITE_DIR)/.unpacked: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE)
$(LTP_TESTSUITE_CAT) $(DL_DIR)/$(LTP_TESTSUITE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(LTP_TESTSUITE_PATCH) | patch -p1 -d $(LTP_TESTSUITE_DIR)
touch $(LTP_TESTSUITE_DIR)/.unpacked
$(LTP_TESTSUITE_DIR)/ltp-testsuite: $(LTP_TESTSUITE_DIR)/.unpacked
$(MAKE) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILER=$(TARGET_CROSS) \
-C $(LTP_TESTSUITE_DIR)
$(TARGET_DIR)/usr/bin/ltp-testsuite: $(LTP_TESTSUITE_DIR)/ltp-testsuite
$(MAKE) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILER=$(TARGET_CROSS) \
-C $(LTP_TESTSUITE_DIR) install
ltp-testsuite: uclibc $(TARGET_DIR)/usr/bin/ltp-testsuite
ltp-testsuite-clean:
$(MAKE) -C $(LTP_TESTSUITE_DIR) clean
ltp-testsuite-dirclean:
rm -rf $(LTP_TESTSUITE_DIR)

View File

@ -0,0 +1,48 @@
#############################################################
#
# ltrace
#
#############################################################
LTRACE_SOURCE=ltrace_0.3.31.tar.gz
LTRACE_SITE=http://ftp.debian.org/debian/pool/main/l/ltrace
LTRACE_DIR=$(BUILD_DIR)/ltrace-0.3.31
LTRACE_BINARY=ltrace
LTRACE_TARGET_BINARY=usr/bin/ltrace
$(DL_DIR)/$(LTRACE_SOURCE):
$(WGET) -P $(DL_DIR) $(LTRACE_SITE)/$(LTRACE_SOURCE)
$(LTRACE_DIR)/.source: $(DL_DIR)/$(LTRACE_SOURCE)
zcat $(DL_DIR)/$(LTRACE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(LTRACE_DIR)/.source
$(LTRACE_DIR)/.configured: $(LTRACE_DIR)/.source
(cd $(LTRACE_DIR); \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
);
touch $(LTRACE_DIR)/.configured;
$(LTRACE_DIR)/$(LTRACE_BINARY): $(LTRACE_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(LTRACE_DIR)
$(TARGET_DIR)/$(LTRACE_TARGET_BINARY): $(LTRACE_DIR)/$(LTRACE_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(LTRACE_DIR) install
rm -Rf $(TARGET_DIR)/usr/man
ltrace: uclibc $(TARGET_DIR)/$(LTRACE_TARGET_BINARY)
ltrace-source: $(DL_DIR)/$(LTRACE_SOURCE)
ltrace-clean:
$(MAKE) prefix=$(TARGET_DIR)/usr -C $(LTRACE_DIR) uninstall
-$(MAKE) -C $(LTRACE_DIR) clean
ltrace-dirclean:
rm -rf $(LTRACE_DIR)

View File

@ -0,0 +1,65 @@
#############################################################
#
# lzo
#
# Note: this builds only a static library, it does not provide
# anything to be installed into the target system.
#
#############################################################
LZO_SOURCE:=lzo_1.08.orig.tar.gz
LZO_SITE:=http://ftp.debian.org/debian/pool/main/l/lzo
#LZO_SOURCE:=lzo-1.08.tar.bz2
#LZO_SITE:=http://www.oberhumer.com/opensource/lzo/download
LZO_DIR:=$(BUILD_DIR)/lzo-1.08
LZO_CAT:=zcat
LZO_PATCH:=$(SOURCE_DIR)/lzo-cross-compile.patch
$(DL_DIR)/$(LZO_SOURCE):
$(WGET) -P $(DL_DIR) $(LZO_SITE)/$(LZO_SOURCE)
lzo-source: $(DL_DIR)/$(LZO_SOURCE)
$(LZO_DIR)/.unpacked: $(DL_DIR)/$(LZO_SOURCE)
$(LZO_CAT) $(DL_DIR)/$(LZO_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(LZO_PATCH) | patch -p1 -d $(LZO_DIR)
touch $(LZO_DIR)/.unpacked
LZO_CONFIG_SHARED:=--disable-shared
#LZO_CONFIG_SHARED:=--enable-shared
$(LZO_DIR)/.configured: $(LZO_DIR)/.unpacked
(cd $(LZO_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(LZO_CONFIG_SHARED) \
);
touch $(LZO_DIR)/.configured
$(LZO_DIR)/src/liblzo.la: $(LZO_DIR)/.configured
$(MAKE) -C $(LZO_DIR)
$(STAGING_DIR)/lib/liblzo.a: $(LZO_DIR)/src/liblzo.la
$(MAKE) CC=$(TARGET_CC) DESTDIR=$(STAGING_DIR) -C $(LZO_DIR) install
lzo: uclibc $(STAGING_DIR)/lib/liblzo.a
lzo-clean:
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LZO_DIR) uninstall
-$(MAKE) -C $(LZO_DIR) clean
lzo-dirclean:
rm -rf $(LZO_DIR)

View File

@ -0,0 +1,65 @@
#############################################################
#
# m4
#
#############################################################
M4_SOURCE:=m4-1.4.tar.gz
M4_SITE:=ftp://ftp.gnu.org/gnu/m4
M4_CAT:=zcat
M4_DIR:=$(BUILD_DIR)/m4-1.4
M4_BINARY:=m4
M4_TARGET_BINARY:=usr/bin/m4
$(DL_DIR)/$(M4_SOURCE):
$(WGET) -P $(DL_DIR) $(M4_SITE)/$(M4_SOURCE)
m4-source: $(DL_DIR)/$(M4_SOURCE)
$(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE)
$(M4_CAT) $(DL_DIR)/$(M4_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(M4_DIR)/.unpacked
$(M4_DIR)/.configured: $(M4_DIR)/.unpacked
(cd $(M4_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
);
touch $(M4_DIR)/.configured
$(M4_DIR)/src/$(M4_BINARY): $(M4_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(M4_DIR)
$(TARGET_DIR)/$(M4_TARGET_BINARY): $(M4_DIR)/src/$(M4_BINARY)
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
sbindir=$(TARGET_DIR)/usr/sbin \
libexecdir=$(TARGET_DIR)/usr/lib \
datadir=$(TARGET_DIR)/usr/share \
sysconfdir=$(TARGET_DIR)/etc \
localstatedir=$(TARGET_DIR)/var \
libdir=$(TARGET_DIR)/usr/lib \
infodir=$(TARGET_DIR)/usr/info \
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(M4_DIR) install;
$(STRIP) $(TARGET_DIR)/$(M4_TARGET_BINARY) > /dev/null 2>&1
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
m4: uclibc $(TARGET_DIR)/$(M4_TARGET_BINARY)
m4-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(M4_DIR) uninstall
-$(MAKE) -C $(M4_DIR) clean
m4-dirclean:
rm -rf $(M4_DIR)

View File

@ -0,0 +1,61 @@
#############################################################
#
# make
#
#############################################################
GNUMAKE_SOURCE:=make-3.80.tar.bz2
GNUMAKE_SITE:=ftp://ftp.gnu.org/gnu/make
GNUMAKE_DIR:=$(BUILD_DIR)/make-3.80
GNUMAKE_CAT:=bzcat
GNUMAKE_BINARY:=make
GNUMAKE_TARGET_BINARY:=usr/bin/make
$(DL_DIR)/$(GNUMAKE_SOURCE):
$(WGET) -P $(DL_DIR) $(GNUMAKE_SITE)/$(GNUMAKE_SOURCE)
make-source: $(DL_DIR)/$(GNUMAKE_SOURCE)
$(GNUMAKE_DIR)/.unpacked: $(DL_DIR)/$(GNUMAKE_SOURCE)
$(GNUMAKE_CAT) $(DL_DIR)/$(GNUMAKE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(GNUMAKE_DIR)/.unpacked
$(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked
(cd $(GNUMAKE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(GNUMAKE_DIR)/.configured
$(GNUMAKE_DIR)/$(GNUMAKE_BINARY): $(GNUMAKE_DIR)/.configured
$(MAKE) -C $(GNUMAKE_DIR)
$(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY): $(GNUMAKE_DIR)/$(GNUMAKE_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
make: uclibc $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY)
make-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUMAKE_DIR) uninstall
-$(MAKE) -C $(GNUMAKE_DIR) clean
make-dirclean:
rm -rf $(GNUMAKE_DIR)

View File

@ -0,0 +1,59 @@
#############################################################
#
# microcom terminal emulator
#
# Maintainer: Tim Riker <Tim@Rikers.org>
#
#############################################################
# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
#
# 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.
#
# 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.
#
# 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
# TARGETS
# http://microcom.port5.com/m102.tar.gz
MICROCOM_SITE:=http://microcom.port5.com/
MICROCOM_SOURCE:=m102.tar.gz
MICROCOM_DIR:=$(BUILD_DIR)/microcom-1.02
$(DL_DIR)/$(MICROCOM_SOURCE):
$(WGET) -P $(DL_DIR) $(MICROCOM_SITE)/$(MICROCOM_SOURCE)
microcom-source: $(DL_DIR)/$(MICROCOM_SOURCE)
$(MICROCOM_DIR)/.unpacked: $(DL_DIR)/$(MICROCOM_SOURCE)
mkdir -p $(MICROCOM_DIR)
zcat $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(MICROCOM_DIR) -xvf -
touch $(MICROCOM_DIR)/.unpacked
$(MICROCOM_DIR)/.configured: $(MICROCOM_DIR)/.unpacked
$(SED) 's~gcc~${TARGET_CC}~' $(MICROCOM_DIR)/Makefile
touch $(MICROCOM_DIR)/.configured
$(MICROCOM_DIR)/microcom: $(MICROCOM_DIR)/.configured
$(MAKE) -C $(MICROCOM_DIR)
$(TARGET_DIR)/usr/bin/microcom: $(MICROCOM_DIR)/microcom
install -c $(MICROCOM_DIR)/microcom $(TARGET_DIR)/usr/bin/microcom
microcom-clean:
rm $(MICROCOM_DIR)/*.o
microcom-dirclean:
rm -rf $(MICROCOM_DIR)
microcom: uclibc $(TARGET_DIR)/usr/bin/microcom

View File

@ -0,0 +1,46 @@
#############################################################
#
# Microwindows - 2003/11/17 Greg Haerr
# (requires CVS 2003/11/17 or later)
#
#############################################################
MICROWIN_SITE:=ftp://ftp.microwindows.org/pub/microwindows
MICROWIN_SOURCE:=microwindows-src-snapshot.tar.gz
MICROWIN_DIR:=$(BUILD_DIR)/microwin
#MICROWIN_SOURCE:=microwindows-0.91.tar.gz
#MICROWIN_DIR:=$(BUILD_DIR)/microwindows-0.91
MICROWIN_CAT:=zcat
MICROWIN_BINARY:=$(MICROWIN_DIR)/src/bin/nano-X
MICROWIN_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/nano-X
MICROWIN_CONFIG:=$(MICROWIN_DIR)/src/Configs/config.uclibc
$(DL_DIR)/$(MICROWIN_SOURCE):
$(WGET) -P $(DL_DIR) $(MICROWIN_SITE)/$(MICROWIN_SOURCE)
microwin-source: $(DL_DIR)/$(MICROWIN_SOURCE)
$(MICROWIN_DIR)/.unpacked: $(DL_DIR)/$(MICROWIN_SOURCE)
$(MICROWIN_CAT) $(DL_DIR)/$(MICROWIN_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(MICROWIN_DIR)/.unpacked
$(MICROWIN_DIR)/.configured: $(MICROWIN_DIR)/.unpacked
(cd $(MICROWIN_DIR); \
);
touch $(MICROWIN_DIR)/.configured
$(MICROWIN_BINARY): $(MICROWIN_DIR)/.configured
$(MAKE) ARCH=LINUX-$(shell echo $(ARCH) | tr a-z A-Z) $(shell echo $(ARCH) | tr a-z A-Z)TOOLSPREFIX=$(TARGET_CROSS) CC=$(TARGET_CC) -C $(MICROWIN_DIR)/src CONFIG=$(MICROWIN_CONFIG)
$(MICROWIN_TARGET_BINARY): $(MICROWIN_BINARY)
$(MAKE) INSTALL_PREFIX=$(TARGET_DIR)/usr INSTALL_OWNER1= INSTALL_OWNER2= CC=$(TARGET_CC) -C $(MICROWIN_DIR)/src CONFIG=$(MICROWIN_CONFIG) install
microwin: uclibc $(MICROWIN_TARGET_BINARY)
microwin-clean:
-$(MAKE) -C $(MICROWIN_DIR)/src clean
microwin-dirclean:
rm -rf $(MICROWIN_DIR)

View File

@ -0,0 +1,44 @@
#############################################################
#
# mkdosfs
#
#############################################################
MKDOSFS_SOURCE=dosfstools-2.8.src.tar.gz
MKDOSFS_SITE=http://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools
MKDOSFS_DIR=$(BUILD_DIR)/dosfstools-2.8
MKDOSFS_CAT:=zcat
MKDOSFS_BINARY:=mkdosfs/mkdosfs
MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
MKDOSFS_CFLAGS="-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
else
MKDOSFS_CFLAGS="-Os -g"
endif
$(DL_DIR)/$(MKDOSFS_SOURCE):
$(WGET) -P $(DL_DIR) $(MKDOSFS_SITE)/$(MKDOSFS_SOURCE)
mkdosfs-source: $(DL_DIR)/$(MKDOSFS_SOURCE)
$(MKDOSFS_DIR)/.unpacked: $(DL_DIR)/$(MKDOSFS_SOURCE)
$(MKDOSFS_CAT) $(DL_DIR)/$(MKDOSFS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(MKDOSFS_DIR)/.unpacked
$(MKDOSFS_DIR)/$(MKDOSFS_BINARY): $(MKDOSFS_DIR)/.unpacked
$(MAKE) CFLAGS=$(MKDOSFS_CFLAGS) CC=$(TARGET_CC) -C $(MKDOSFS_DIR);
$(STRIP) $(MKDOSFS_DIR)/mkdosfs/mkdosfs;
touch -c $(MKDOSFS_DIR)/mkdosfs/mkdosfs
$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY): $(MKDOSFS_DIR)/$(MKDOSFS_BINARY)
cp -a $(MKDOSFS_DIR)/$(MKDOSFS_BINARY) $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
touch -c $(TARGET_DIR)/sbin/mkdosfs
mkdosfs: uclibc $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
mkdosfs-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKDOSFS_DIR) uninstall
-$(MAKE) -C $(MKDOSFS_DIR) clean
mkdosfs-dirclean:
rm -rf $(MKDOSFS_DIR)

View File

@ -0,0 +1,71 @@
#############################################################
#
# mke2fs
#
#############################################################
MKE2FS_SOURCE=e2fsprogs-1.27.tar.gz
MKE2FS_SITE=http://aleron.dl.sourceforge.net/sourceforge/e2fsprogs
MKE2FS_DIR=$(BUILD_DIR)/e2fsprogs-1.27
MKE2FS_CAT:=zcat
MKE2FS_BINARY:=misc/mke2fs
MKE2FS_TARGET_BINARY:=sbin/mke2fs
$(DL_DIR)/$(MKE2FS_SOURCE):
$(WGET) -P $(DL_DIR) $(MKE2FS_SITE)/$(MKE2FS_SOURCE)
mke2fs-source: $(DL_DIR)/$(MKE2FS_SOURCE)
$(MKE2FS_DIR)/.unpacked: $(DL_DIR)/$(MKE2FS_SOURCE)
$(MKE2FS_CAT) $(DL_DIR)/$(MKE2FS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(MKE2FS_DIR)/.unpacked
$(MKE2FS_DIR)/.configured: $(MKE2FS_DIR)/.unpacked
(cd $(MKE2FS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--with-cc=$(TARGET_CC) \
--with-linker=$(TARGET_CROSS)ld \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--disable-elf-shlibs --disable-swapfs \
--disable-debugfs --disable-imager \
--disable-resizer --disable-fsck \
--without-catgets $(DISABLE_NLS) \
);
touch $(MKE2FS_DIR)/.configured
$(MKE2FS_DIR)/$(MKE2FS_BINARY): $(MKE2FS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(MKE2FS_DIR)
$(STRIP) $(MKE2FS_DIR)/misc/mke2fs $(MKE2FS_DIR)/misc/badblocks;
touch -c $(MKE2FS_DIR)/misc/mke2fs
$(TARGET_DIR)/$(MKE2FS_TARGET_BINARY): $(MKE2FS_DIR)/$(MKE2FS_BINARY)
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKE2FS_DIR) install
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
# Only install a few selected items...
cp -dpf $(MKE2FS_DIR)/misc/mke2fs $(TARGET_DIR)/sbin/mke2fs;
cp -dpf $(MKE2FS_DIR)/misc/badblocks $(TARGET_DIR)/sbin/badblocks;
touch -c $(TARGET_DIR)/sbin/mke2fs
mke2fs: uclibc $(TARGET_DIR)/$(MKE2FS_TARGET_BINARY)
mke2fs-clean:
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKE2FS_DIR) uninstall
rm -f $(TARGET_DIR)/sbin/mke2fs $(TARGET_DIR)/sbin/badblocks;
-$(MAKE) -C $(MKE2FS_DIR) clean
mke2fs-dirclean:
rm -rf $(MKE2FS_DIR)

View File

@ -0,0 +1,45 @@
#############################################################
#
# mpg123
#
#############################################################
MPG123_VERSION=0.59r
# Don't alter below this line unless you (think) you know
# what you are doing! Danger, Danger!
MPG123_SOURCE=mpg123-$(MPG123_VERSION).tar.gz
MPG123_SITE=http://www.mpg123.de/mpg123
MPG123_DIR=$(BUILD_DIR)/${shell basename $(MPG123_SOURCE) .tar.gz}
MPG123_WORKDIR=$(BUILD_DIR)/mpg123-$(MPG123_VERSION)
$(DL_DIR)/$(MPG123_SOURCE):
$(WGET) -P $(DL_DIR) $(MPG123_SITE)/$(MPG123_SOURCE)
$(MPG123_DIR)/.unpacked: $(DL_DIR)/$(MPG123_SOURCE)
gzip -d -c $(DL_DIR)/$(MPG123_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(MPG123_DIR)/.unpacked
$(MPG123_WORKDIR)/mpg123: $(MPG123_DIR)/.unpacked
rm -f $@
$(MAKE) CC=$(TARGET_CC) -C $(MPG123_WORKDIR) linux
$(MPG123_WORKDIR)/.installed: $(MPG123_WORKDIR)/mpg123
mkdir -p $(TARGET_DIR)/usr/bin
cp -f $(MPG123_WORKDIR)/mpg123 $(TARGET_DIR)/usr/bin
$(STRIP) --strip-all $(TARGET_DIR)/usr/bin/mpg123
touch $(MPG123_WORKDIR)/.installed
mpg123: uclibc libmad $(MPG123_WORKDIR)/.installed
mpg123-source: $(DL_DIR)/$(MPG123_SOURCE)
mpg123-clean:
@if [ -d $(MPG123_WORKDIR)/Makefile ] ; then \
$(MAKE) -C $(MPG123_WORKDIR) clean ; \
fi;
mpg123-dirclean:
rm -rf $(MPG123_DIR) $(MPG123_WORKDIR)

View File

@ -0,0 +1,45 @@
#############################################################
#
# mrouted
#
#
#############################################################
MROUTED_SOURCE:=mrouted_3.9-beta3.orig.tar.gz
MROUTED_SITE:=http://ftp.debian.org/debian/pool/non-free/m/mrouted
MROUTED_DIR:=$(BUILD_DIR)/mrouted-3.9-beta3.orig
MROUTED_CAT:=zcat
#MROUTED_PATCH:=$(SOURCE_DIR)/mrouted_3.9-beta3-1.1.diff
MROUTED_PATCH:=mrouted_3.9-beta3-1.1.diff.gz
MROUTED_BINARY:=mrouted
MROUTED_TARGET_BINARY:=usr/sbin/mrouted
$(DL_DIR)/$(MROUTED_SOURCE):
$(WGET) -P $(DL_DIR) $(MROUTED_SITE)/$(MROUTED_SOURCE)
$(DL_DIR)/$(MROUTED_PATCH):
$(WGET) -P $(DL_DIR) $(MROUTED_SITE)/$(MROUTED_PATCH)
mrouted-source: $(DL_DIR)/$(MROUTED_SOURCE) $(DL_DIR)/$(MROUTED_PATCH)
$(MROUTED_DIR)/.unpacked: mrouted-source
$(MROUTED_CAT) $(DL_DIR)/$(MROUTED_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(MROUTED_CAT) $(DL_DIR)/$(MROUTED_PATCH) | patch -p1 -d $(MROUTED_DIR)
$(SOURCE_DIR)/patch-kernel.sh $(MROUTED_DIR) $(SOURCE_DIR) mrouted-*.patch
touch $(MROUTED_DIR)/.unpacked
$(MROUTED_DIR)/$(MROUTED_BINARY): $(MROUTED_DIR)/.unpacked
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) CC=$(TARGET_CC) -C $(MROUTED_DIR)
$(TARGET_DIR)/$(MROUTED_TARGET_BINARY): $(MROUTED_DIR)/$(MROUTED_BINARY)
cp -a $(MROUTED_DIR)/$(MROUTED_BINARY) $(TARGET_DIR)/$(MROUTED_TARGET_BINARY)
mrouted: uclibc $(TARGET_DIR)/$(MROUTED_TARGET_BINARY)
mrouted-clean:
rm -f $(TARGET_DIR)/$(MROUTED_TARGET_BINARY)
-$(MAKE) -C $(MROUTED_DIR) clean
mrouted-dirclean:
rm -rf $(MROUTED_DIR)

View File

@ -0,0 +1,133 @@
#############################################################
#
# ncurses
# this installs only a few vital termcap entries
#
#############################################################
# Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
# $Id$
#
# 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.
#
# 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.
#
# 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
# TARGETS
NCURSES_SITE:=ftp://ftp.gnu.org/pub/gnu/ncurses
NCURSES_DIR:=$(BUILD_DIR)/ncurses-5.2
NCURSES_SOURCE:=ncurses-5.2.tar.gz
$(DL_DIR)/$(NCURSES_SOURCE):
$(WGET) -P $(DL_DIR) $(NCURSES_SITE)/$(NCURSES_SOURCE)
$(NCURSES_DIR)/.dist: $(DL_DIR)/$(NCURSES_SOURCE)
gunzip -c $(DL_DIR)/$(NCURSES_SOURCE) | tar -C $(BUILD_DIR) -xvf -
#use the local tic and not whatever the build system was going to find.
$(SED) 's~\$$srcdir/shlib tic\$$suffix~/usr/bin/tic~' \
$(NCURSES_DIR)/misc/run_tic.in
touch $(NCURSES_DIR)/.dist
$(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist
(cd $(NCURSES_DIR); rm -rf config.cache; \
BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--with-terminfo-dirs=/usr/share/terminfo \
--with-default-terminfo-dir=/usr/share/terminfo \
--libdir=$(STAGING_DIR)/lib \
--with-shared --without-cxx --without-cxx-binding \
--without-ada --without-progs $(DISABLE_NLS) \
--without-profile --without-debug --disable-rpath \
--enable-echo --enable-const --enable-overwrite \
);
touch $(NCURSES_DIR)/.configured
$(NCURSES_DIR)/lib/libncurses.so.5.2: $(NCURSES_DIR)/.configured
$(MAKE) BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) \
BUILD_CCFLAGS="-I$(NCURSES_DIR) -I$(NCURSES_DIR)/include" \
BUILD_LDFLAGS="" DESTDIR=$(STAGING_DIR) -C $(NCURSES_DIR) \
libs panel menu form headers
$(STAGING_DIR)/lib/libncurses.a: $(NCURSES_DIR)/lib/libncurses.so.5.2
BUILD_CC=$(TARGET_CC) HOSTCC=$(HOSTCC) CC=$(TARGET_CC) \
$(MAKE) \
prefix=$(STAGING_DIR) \
exec_prefix=$(STAGING_DIR) \
bindir=$(STAGING_DIR)/bin \
sbindir=$(STAGING_DIR)/sbin \
libexecdir=$(STAGING_DIR)/lib \
datadir=$(STAGING_DIR)/usr/share \
sysconfdir=$(STAGING_DIR)/etc \
localstatedir=$(STAGING_DIR)/var \
libdir=$(STAGING_DIR)/lib \
infodir=$(STAGING_DIR)/info \
mandir=$(STAGING_DIR)/man \
includedir=$(STAGING_DIR)/include \
gxx_include_dir=$(STAGING_DIR)/include/c++ \
ticdir=$(STAGING_DIR)/usr/share/terminfo \
-C $(NCURSES_DIR) install;
chmod a-x $(NCURSES_DIR)/lib/libncurses.so*
touch -c $(STAGING_DIR)/lib/libncurses.a
$(TARGET_DIR)/lib/libncurses.so.5.2: $(STAGING_DIR)/lib/libncurses.a
cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/lib/
-cp -dpf $(STAGING_DIR)/usr/lib/terminfo $(TARGET_DIR)/usr/lib/
mkdir -p $(TARGET_DIR)/usr/share/terminfo
for i in x/xterm x/xterm-color x/xterm-xfree86 v/vt100 v/vt200 a/ansi l/linux; do \
cp -dpf $(STAGING_DIR)/usr/share/terminfo/$${i} $(TARGET_DIR)/usr/share/terminfo/; \
done
$(TARGET_DIR)/usr/lib/libncurses.a: $(STAGING_DIR)/lib/libncurses.a
cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/ncurses.h
cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/
cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/
cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/
cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/
rm -f $(TARGET_DIR)/usr/lib/terminfo
(cd $(TARGET_DIR)/usr/lib; ln -fs /usr/share/terminfo)
(cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libcurses.a)
(cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.a libtermcap.a)
(cd $(TARGET_DIR)/usr/include; ln -fs ncurses.h curses.h)
rm -f $(TARGET_DIR)/lib/libncurses.so
(cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libncurses.so.5.2 libncurses.so)
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libncurses.so.5.2
touch -c $(TARGET_DIR)/usr/lib/libncurses.a
ncurses-headers: $(TARGET_DIR)/usr/lib/libncurses.a
ncurses-source: $(DL_DIR)/$(NCURSES_SOURCE)
ncurses-clean:
rm -f $(STAGING_DIR)/lib/libncurses.so* $(TARGET_DIR)/lib/libncurses.so*
rm -f $(STAGING_DIR)/usr/share/tabset $(TARGET_DIR)/usr/share/tabset
rm -rf $(STAGING_DIR)/usr/share/terminfo $(TARGET_DIR)/usr/share/terminfo
-$(MAKE) -C $(NCURSES_DIR) clean
ncurses-dirclean:
rm -rf $(NCURSES_DIR)
ncurses: $(TARGET_DIR)/lib/libncurses.so.5.2

View File

@ -0,0 +1,49 @@
#############################################################
#
# netfilter
#
#############################################################
NETFILTER_SNAPSHOT:=20040508
NETFILTER_SOURCE:=patch-o-matic-$(NETFILTER_SNAPSHOT).tar.bz2
NETFILTER_SITE:=ftp://ftp.netfilter.org/pub/patch-o-matic/snapshot/
NETFILTER_DIR:=$(BUILD_DIR)/patch-o-matic-$(NETFILTER_SNAPSHOT)
NETFILTER_CAT:=bzcat
# ipv6_mld breaks net/ipv6/mcast.c
NETFILTER_EXCLUDE:=--exclude submitted/89_ipv6_mld_netfilter.patch
NETFILTER_PATCHES:= \
base \
extra/CLASSIFY.patch \
extra/CONNMARK.patch \
extra/IPMARK.patch \
extra/condition.patch \
extra/h323-conntrack-nat.patch \
extra/mms-conntrack-nat.patch \
extra/pptp-conntrack-nat.patch \
extra/string.patch
LINUX_DIR:=$(BUILD_DIR)/WRT54GS/release/src/linux/linux
$(DL_DIR)/$(NETFILTER_SOURCE):
$(WGET) -P $(DL_DIR) $(NETFILTER_SITE)/$(NETFILTER_SOURCE)
netfilter-source: $(DL_DIR)/$(NETFILTER_SOURCE)
$(NETFILTER_DIR)/.unpacked: $(DL_DIR)/$(NETFILTER_SOURCE)
$(NETFILTER_CAT) $(DL_DIR)/$(NETFILTER_SOURCE) | tar -C $(BUILD_DIR) -xvf -
#ignore whitespace in patches
$(SED) "s,\-p1,\-l \-p1," $(NETFILTER_DIR)/runme
touch $(NETFILTER_DIR)/.unpacked
$(LINUX_DIR)/.nf-patched: $(LINUX_DIR)/.patched $(NETFILTER_DIR)/.unpacked
-(cd $(NETFILTER_DIR); KERNEL_DIR=$(LINUX_DIR) ./runme --batch $(NETFILTER_EXCLUDE) $(NETFILTER_PATCHES))
touch $(LINUX_DIR)/.nf-patched
netfilter: $(LINUX_DIR)/.nf-patched
netfilter-clean:
netfilter-dirclean:
rm -rf $(NETFILTER_DIR)

View File

@ -0,0 +1,57 @@
#############################################################
#
# netkitbase
#
#############################################################
NETKITBASE_SOURCE:=netkit-base-0.17.tar.gz
NETKITBASE_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
NETKITBASE_DIR:=$(BUILD_DIR)/netkit-base-0.17
NETKITBASE_CAT:=zcat
NETKITBASE_BINARY:=inetd/inetd
NETKITBASE_TARGET_BINARY:=usr/sbin/inetd
$(DL_DIR)/$(NETKITBASE_SOURCE):
$(WGET) -P $(DL_DIR) $(NETKITBASE_SITE)/$(NETKITBASE_SOURCE)
netkitbase-source: $(DL_DIR)/$(NETKITBASE_SOURCE)
$(NETKITBASE_DIR)/.unpacked: $(DL_DIR)/$(NETKITBASE_SOURCE)
$(NETKITBASE_CAT) $(DL_DIR)/$(NETKITBASE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# use ANSI syntax
$(SED) "s/main()/main(void)/;" $(NETKITBASE_DIR)/configure
# don't try to run cross compiled binaries while configuring things
$(SED) "s~./__conftest~#./__conftest~;" $(NETKITBASE_DIR)/configure
touch $(NETKITBASE_DIR)/.unpacked
$(NETKITBASE_DIR)/.configured: $(NETKITBASE_DIR)/.unpacked
(cd $(NETKITBASE_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \
)
touch $(NETKITBASE_DIR)/.configured
$(NETKITBASE_DIR)/$(NETKITBASE_BINARY): $(NETKITBASE_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(NETKITBASE_DIR)
$(STRIP) $(NETKITBASE_DIR)/$(NETKITBASE_BINARY)
$(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY): $(NETKITBASE_DIR)/$(NETKITBASE_BINARY)
# Only install a few selected items...
mkdir -p $(TARGET_DIR)/usr/sbin
cp $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY)
mkdir -p $(TARGET_DIR)/etc
cp $(NETKITBASE_DIR)/etc.sample/inetd.conf $(TARGET_DIR)/etc/
$(SED) "s/^\([a-z]\)/#\1/;" $(TARGET_DIR)/etc/inetd.conf
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITBASE_DIR) install
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
netkitbase: uclibc $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY)
netkitbase-clean:
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITBASE_DIR) uninstall
-rm -f $(TARGET_DIR)/usr/sbin/inetd $(TARGET_DIR)/etc/inetd.conf
-rm -f $(TARGET_DIR)/etc/inetd.conf
-$(MAKE) -C $(NETKITBASE_DIR) clean
netkitbase-dirclean:
rm -rf $(NETKITBASE_DIR)

View File

@ -0,0 +1,59 @@
#############################################################
#
# netkittelnet
#
#############################################################
NETKITTELNET_SOURCE:=netkit-telnet-0.17.tar.gz
NETKITTELNET_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
NETKITTELNET_DIR:=$(BUILD_DIR)/netkit-telnet-0.17
NETKITTELNET_CAT:=zcat
NETKITTELNET_BINARY:=telnetd/telnetd
NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd
NETKITTELNET_PATCH:=$(SOURCE_DIR)/netkittelnet.patch
$(DL_DIR)/$(NETKITTELNET_SOURCE):
$(WGET) -P $(DL_DIR) $(NETKITTELNET_SITE)/$(NETKITTELNET_SOURCE)
netkittelnet-source: $(DL_DIR)/$(NETKITTELNET_SOURCE)
$(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE)
$(NETKITTELNET_CAT) $(DL_DIR)/$(NETKITTELNET_SOURCE) | tar -C $(BUILD_DIR) -xvf -
# use ANSI syntax
$(SED) "s/main()/main(void)/;" $(NETKITTELNET_DIR)/configure
# Disable termcap support
$(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c
# don't try to run cross compiled binaries while configuring things
cat $(NETKITTELNET_PATCH) | patch -p1 -d $(NETKITTELNET_DIR)
touch $(NETKITTELNET_DIR)/.unpacked
$(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked
(cd $(NETKITTELNET_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
./configure --installroot=$(TARGET_DIR) --with-c-compiler=$(TARGET_CC) \
)
touch $(NETKITTELNET_DIR)/.configured
$(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY): $(NETKITTELNET_DIR)/.configured
$(MAKE) SUB=telnetd CC=$(TARGET_CC) -C $(NETKITTELNET_DIR)
$(STRIP) $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
$(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY): $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
# Only install a few selected items...
mkdir -p $(TARGET_DIR)/usr/sbin
rm -f $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
cp $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
# Enable telnet in inetd
$(SED) "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR)/etc/inetd.conf
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) install
#rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
# $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
netkittelnet: uclibc netkitbase $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
netkittelnet-clean:
#$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NETKITTELNET_DIR) uninstall
-rm -f $(TARGET_DIR)/usr/sbin/telnetd
-$(MAKE) -C $(NETKITTELNET_DIR) clean
netkittelnet-dirclean:
rm -rf $(NETKITTELNET_DIR)

View File

@ -0,0 +1,105 @@
#############################################################
#
# netsnmp
#
#############################################################
NETSNMP_URL:=http://aleron.dl.sourceforge.net/sourceforge/net-snmp/
NETSNMP_DIR:=$(BUILD_DIR)/net-snmp-5.1
NETSNMP_SOURCE:=net-snmp-5.1.tar.gz
NETSNMP_PATCH1:=net-snmp_5.1-5.diff.gz
NETSNMP_PATCH1_URL:=http://ftp.debian.org/debian/pool/main/n/net-snmp/
NETSNMP_PATCH2:=$(SOURCE_DIR)/netsnmp.patch
$(DL_DIR)/$(NETSNMP_SOURCE):
$(WGET) -P $(DL_DIR) $(NETSNMP_URL)/$(NETSNMP_SOURCE)
$(DL_DIR)/$(NETSNMP_PATCH1):
$(WGET) -P $(DL_DIR) $(NETSNMP_PATCH1_URL)/$(NETSNMP_PATCH1)
$(NETSNMP_DIR)/.unpacked: $(DL_DIR)/$(NETSNMP_SOURCE) $(DL_DIR)/$(NETSNMP_PATCH1)
zcat $(DL_DIR)/$(NETSNMP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
zcat $(DL_DIR)/$(NETSNMP_PATCH1) | patch -p1 -d $(NETSNMP_DIR)
cat $(NETSNMP_PATCH2) | patch -p1 -d $(NETSNMP_DIR)
touch $(NETSNMP_DIR)/.unpacked
# We set CAN_USE_SYSCTL to no and use /proc since the
# sysctl code in this thing is apparently intended for
# freebsd or some such thing...
$(NETSNMP_DIR)/.configured: $(NETSNMP_DIR)/.unpacked
(cd $(NETSNMP_DIR); autoconf; \
ac_cv_CAN_USE_SYSCTL=no \
PATH=$(TARGET_PATH) \
./configure \
--with-cc=$(TARGET_CROSS)gcc \
--with-ar=$(TARGET_CROSS)ar \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--with-endianness=little \
--with-persistent-directory=/var/lib/snmp \
--enable-ucd-snmp-compatibility \
--enable-shared \
--disable-static \
--with-logfile=none \
--without-rpm \
--with-openssl \
--without-dmalloc \
--without-efence \
--without-rsaref \
--with-sys-contact="root" \
--with-sys-location="Unknown" \
--with-mib-modules="host smux ucd-snmp/dlmod" \
--with-defaults \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/man \
--infodir=/usr/info \
);
touch $(NETSNMP_DIR)/.configured
$(NETSNMP_DIR)/agent/snmpd: $(NETSNMP_DIR)/.configured
$(MAKE) -C $(NETSNMP_DIR)
$(TARGET_DIR)/usr/sbin/snmpd: $(NETSNMP_DIR)/agent/snmpd
#$(MAKE) DESTDIR=$(TARGET_DIR) -C $(NETSNMP_DIR) install
$(MAKE) PREFIX=$(TARGET_DIR)/usr \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
persistentdir=$(TARGET_DIR)/var/lib/snmp \
infodir=$(TARGET_DIR)/usr/info \
mandir=$(TARGET_DIR)/usr/man \
includedir=$(STAGING_DIR)/include/net-snmp \
ucdincludedir=$(STAGING_DIR)/include/ucd-snmp \
-C $(NETSNMP_DIR) install;
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
# Copy the .conf files.
mkdir -p $(TARGET_DIR)/etc/snmp
cp $(NETSNMP_DIR)/EXAMPLE.conf $(TARGET_DIR)/etc/snmp/snmpd.conf
cp $(NETSNMP_DIR)/EXAMPLE-trap.conf $(TARGET_DIR)/etc/snmp/snmptrapd.conf
-mv $(TARGET_DIR)/usr/share/snmp/mib2c*.conf $(TARGET_DIR)/etc/snmp
mkdir -p $(TARGET_DIR)/etc/default
cp $(NETSNMP_DIR)/debian/snmpd.default $(TARGET_DIR)/etc/default/snmpd
# Remove the unsupported snmpcheck program
rm $(TARGET_DIR)/usr/bin/snmpcheck
# Install the "broken" headers
cp $(NETSNMP_DIR)/agent/mibgroup/struct.h $(STAGING_DIR)/include/net-snmp/agent
cp $(NETSNMP_DIR)/agent/mibgroup/util_funcs.h $(STAGING_DIR)/include/net-snmp
cp $(NETSNMP_DIR)/agent/mibgroup/mibincl.h $(STAGING_DIR)/include/net-snmp/library
cp $(NETSNMP_DIR)/agent/mibgroup/header_complex.h $(STAGING_DIR)/include/net-snmp/agent
netsnmp: $(TARGET_DIR)/usr/sbin/snmpd
netsnmp-headers: $(TARGET_DIR)/usr/include/net-snmp/net-snmp-config.h
cp -a $(STAGING_DIR)/include/net-snmp $(TARGET_DIR)/usr/include/net-snmp
cp -a $(STAGING_DIR)/include/ucd-snmp $(TARGET_DIR)/usr/include/net-snmp
netsnmp-source: $(DL_DIR)/$(NETSNMP_SOURCE)
netsnmp-clean:
$(MAKE) -C $(NETSNMP_DIR) clean
netsnmp-dirclean:
rm -rf $(NETSNMP_DIR)

View File

@ -0,0 +1,72 @@
#############################################################
#
# newt
#
#############################################################
NEWT_SOURCE=newt-0.51.0.tar.bz2
NEWT_SITE=http://www.uclibc.org/
NEWT_DIR=$(BUILD_DIR)/newt-0.51.0
NEWT_VERSION=0.51.0
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
NEWT_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
else
NEWT_CFLAGS=-Os -g
endif
NEWT_CFLAGS+=-fPIC
$(DL_DIR)/$(NEWT_SOURCE):
$(WGET) -P $(DL_DIR) $(NEWT_SITE)/$(NEWT_SOURCE)
$(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE)
bzcat $(DL_DIR)/$(NEWT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(NEWT_DIR)/.source;
$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source
(cd $(NEWT_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(NEWT_DIR)/.configured;
$(NEWT_DIR)/libnewt.so.$(NEWT_VERSION): $(NEWT_DIR)/.configured
$(MAKE) CFLAGS="$(NEWT_CFLAGS)" CC=$(TARGET_CC) -C $(NEWT_DIR)
touch -c $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION)
$(STAGING_DIR)/lib/libnewt.a: $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION)
cp -a $(NEWT_DIR)/libnewt.a $(STAGING_DIR)/lib;
cp -a $(NEWT_DIR)/newt.h $(STAGING_DIR)/include;
cp -a $(NEWT_DIR)/libnewt.so* $(STAGING_DIR)/lib;
(cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so);
(cd $(STAGING_DIR)/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so.0.51);
touch -c $(STAGING_DIR)/lib/libnewt.a
$(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION): $(STAGING_DIR)/lib/libnewt.a
cp -a $(STAGING_DIR)/lib/libnewt.so* $(TARGET_DIR)/lib;
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libnewt.so*
touch -c $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION)
newt: uclibc slang $(TARGET_DIR)/lib/libnewt.so.$(NEWT_VERSION)
newt-source: $(DL_DIR)/$(NEWT_SOURCE)
newt-clean:
rm -f $(TARGET_DIR)/lib/libnewt.so*
-$(MAKE) -C $(NEWT_DIR) clean
newt-dirclean: slang-dirclean
rm -rf $(NEWT_DIR)

View File

@ -0,0 +1,62 @@
#############################################################
#
# ntp
#
#############################################################
NTP_SOURCE:=ntp-4.1.2.tar.gz
NTP_SITE:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4
NTP_DIR:=$(BUILD_DIR)/ntp-4.1.2
NTP_CAT:=zcat
NTP_BINARY:=ntpdate/ntpdate
NTP_TARGET_BINARY:=usr/bin/ntpdate
$(DL_DIR)/$(NTP_SOURCE):
$(WGET) -P $(DL_DIR) $(NTP_SITE)/$(NTP_SOURCE)
ntp-source: $(DL_DIR)/$(NTP_SOURCE)
$(NTP_DIR)/.unpacked: $(DL_DIR)/$(NTP_SOURCE)
$(NTP_CAT) $(DL_DIR)/$(NTP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SED) "s,^#if.*__GLIBC__.*_BSD_SOURCE.*$$,#if 0," \
$(NTP_DIR)/ntpd/refclock_pcf.c;
touch $(NTP_DIR)/.unpacked
$(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked
(cd $(NTP_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--with-shared \
--program-transform-name=s,,, \
);
touch $(NTP_DIR)/.configured
$(NTP_DIR)/$(NTP_BINARY): $(NTP_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(NTP_DIR)
$(TARGET_DIR)/$(NTP_TARGET_BINARY): $(NTP_DIR)/$(NTP_BINARY)
install -m 755 $(NTP_DIR)/$(NTP_BINARY) $(TARGET_DIR)/$(NTP_TARGET_BINARY)
ntp: uclibc $(TARGET_DIR)/$(NTP_TARGET_BINARY)
ntp-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(NTP_DIR) uninstall
-$(MAKE) -C $(NTP_DIR) clean
ntp-dirclean:
rm -rf $(NTP_DIR)

View File

@ -0,0 +1,78 @@
#############################################################
#
# openssh
#
#############################################################
OPENSSH_SITE:=ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/
OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.8p1
OPENSSH_SOURCE:=openssh-3.8p1.tar.gz
OPENSSH_PATCH:=$(SOURCE_DIR)/openssh.patch
$(DL_DIR)/$(OPENSSH_SOURCE):
$(WGET) -P $(DL_DIR) $(OPENSSH_SITE)/$(OPENSSH_SOURCE)
$(OPENSSH_DIR)/.unpacked: $(DL_DIR)/$(OPENSSH_SOURCE) $(OPENSSH_PATCH)
zcat $(DL_DIR)/$(OPENSSH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(OPENSSH_PATCH) | patch -p1 -d $(OPENSSH_DIR)
touch $(OPENSSH_DIR)/.unpacked
$(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.unpacked
(cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \
$(TARGET_CONFIGURE_OPTS) \
LD=$(TARGET_CROSS)gcc \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--includedir=$(STAGING_DIR)/include \
--disable-lastlog --disable-utmp \
--disable-utmpx --disable-wtmp --disable-wtmpx \
--without-x \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(OPENSSH_DIR)/.configured
$(OPENSSH_DIR)/ssh: $(OPENSSH_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(OPENSSH_DIR)
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/scp
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sftp
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sftp-server
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-add
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-agent
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keygen
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keyscan
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-keysign
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/ssh-rand-helper
-$(STRIP) --strip-unneeded $(OPENSSH_DIR)/sshd
$(TARGET_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh
$(MAKE) CC=$(TARGET_CC) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install
mkdir -p $(TARGET_DIR)/etc/init.d/
cp $(OPENSSH_DIR)/S50sshd $(TARGET_DIR)/etc/init.d/
chmod a+x $(TARGET_DIR)/etc/init.d/S50sshd
rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
openssh: $(TARGET_DIR)/usr/bin/ssh
openssh-source: $(DL_DIR)/$(OPENSSH_SOURCE)
openssh-clean:
$(MAKE) -C $(OPENSSH_DIR) clean
openssh-dirclean:
rm -rf $(OPENSSH_DIR)

View File

@ -0,0 +1,78 @@
#############################################################
#
# openssl
#
#############################################################
# TARGETS
OPENSSL_SITE:=http://www.openssl.org/source
OPENSSL_SOURCE:=openssl-0.9.7d.tar.gz
OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.7d
OPENSSL_PATCH=$(SOURCE_DIR)/openssl.patch
$(DL_DIR)/$(OPENSSL_SOURCE):
$(WGET) -P $(DL_DIR) $(OPENSSL_SITE)/$(OPENSSL_SOURCE)
$(OPENSSL_DIR)/.unpacked: $(DL_DIR)/$(OPENSSL_SOURCE) $(OPENSSL_PATCH)
gunzip -c $(DL_DIR)/$(OPENSSL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(OPENSSL_PATCH) | patch -p1 -d $(OPENSSL_DIR)
# sigh... we have to resort to this just to set a gcc flag.
$(SED) 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' \
$(OPENSSL_DIR)/Configure
touch $(OPENSSL_DIR)/.unpacked
$(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked
(cd $(OPENSSL_DIR); \
CFLAGS="-DOPENSSL_NO_KRB5 -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5" \
PATH=$(TARGET_PATH) ./Configure linux-$(ARCH) --prefix=/ \
--openssldir=/usr/lib/ssl -L$(STAGING_DIR)/lib -ldl \
-I$(STAGING_DIR)/include $(OPENSSL_OPTS) no-threads \
shared no-idea no-mdc2 no-rc5)
$(OPENSSL_DIR)/apps/openssl: $(OPENSSL_DIR)/Makefile
$(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) all build-shared
# Work around openssl build bug to link libssl.so with libcrypto.so.
-rm $(OPENSSL_DIR)/libssl.so.*.*.*
$(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) do_linux-shared
$(STAGING_DIR)/lib/libcrypto.a: $(OPENSSL_DIR)/apps/openssl
$(MAKE) CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(OPENSSL_DIR) install
cp -fa $(OPENSSL_DIR)/libcrypto.so* $(STAGING_DIR)/lib/
chmod a-x $(STAGING_DIR)/lib/libcrypto.so.0.9.7
(cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so)
(cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.7 libcrypto.so.0)
cp -fa $(OPENSSL_DIR)/libssl.so* $(STAGING_DIR)/lib/
chmod a-x $(STAGING_DIR)/lib/libssl.so.0.9.7
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so)
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so.0)
$(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7: $(STAGING_DIR)/lib/libcrypto.a
mkdir -p $(TARGET_DIR)/usr/lib
cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/usr/lib/
cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/usr/lib/
#cp -fa $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/
-$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libssl.so.0.9.7
-$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7
$(TARGET_DIR)/usr/lib/libssl.a: $(STAGING_DIR)/lib/libcrypto.a
mkdir -p $(TARGET_DIR)/usr/include
cp -a $(STAGING_DIR)/include/openssl $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/lib/libssl.a $(TARGET_DIR)/usr/lib/
cp -dpf $(STAGING_DIR)/lib/libcrypto.a $(TARGET_DIR)/usr/lib/
touch -c $(TARGET_DIR)/usr/lib/libssl.a
openssl-headers: $(TARGET_DIR)/usr/lib/libssl.a
openssl: uclibc $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7
openssl-source: $(DL_DIR)/$(OPENSSL_SOURCE)
openssl-clean:
rm -f $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/openssl
rm -f $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/libcrypto.so*
rm -f $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/libssl.so*
$(MAKE) -C $(OPENSSL_DIR) clean
openssl-dirclean:
rm -rf $(OPENSSL_DIR)

View File

@ -0,0 +1,68 @@
#############################################################
#
# openvpn
#
# NOTE: Uses start-stop-daemon in init script, so be sure
# to enable that within busybox
#
#############################################################
OPENVPN_SOURCE:=openvpn-1.5.0.tar.gz
OPENVPN_SITE:=http://aleron.dl.sourceforge.net/sourceforge/openvpn/
OPENVPN_DIR:=$(BUILD_DIR)/openvpn-1.5.0
OPENVPN_CAT:=zcat
OPENVPN_BINARY:=openvpn
OPENVPN_TARGET_BINARY:=usr/sbin/openvpn
#OPENVPN_PATCH:=$(SOURCE_DIR)/openvpn.patch
$(DL_DIR)/$(OPENVPN_SOURCE):
$(WGET) -P $(DL_DIR) $(OPENVPN_SITE)/$(OPENVPN_SOURCE)
openvpn-source: $(DL_DIR)/$(OPENVPN_SOURCE)
$(OPENVPN_DIR)/.unpacked: $(DL_DIR)/$(OPENVPN_SOURCE)
$(OPENVPN_CAT) $(DL_DIR)/$(OPENVPN_SOURCE) | tar -C $(BUILD_DIR) -xvf -
#cat $(OPENVPN_PATCH) | patch -p1 -d $(OPENVPN_DIR)
touch $(OPENVPN_DIR)/.unpacked
$(OPENVPN_DIR)/.configured: $(OPENVPN_DIR)/.unpacked
(cd $(OPENVPN_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--program-prefix="" \
--enable-pthread \
);
touch $(OPENVPN_DIR)/.configured
$(OPENVPN_DIR)/$(OPENVPN_BINARY): $(OPENVPN_DIR)/.configured
$(MAKE) -C $(OPENVPN_DIR)
$(TARGET_DIR)/$(OPENVPN_TARGET_BINARY): $(OPENVPN_DIR)/$(OPENVPN_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(OPENVPN_DIR) install
mkdir -p $(TARGET_DIR)/etc/openvpn
cp $(SOURCE_DIR)/openvpn $(TARGET_DIR)/etc/init.d/openvpn
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
openvpn: uclibc lzo openssl $(TARGET_DIR)/$(OPENVPN_TARGET_BINARY)
openvpn-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(OPENVPN_DIR) uninstall
-$(MAKE) -C $(OPENVPN_DIR) clean
openvpn-dirclean:
rm -rf $(OPENVPN_DIR)

View File

@ -0,0 +1,270 @@
# Makefile for to build the base openwrt
#
# Copyright (C) 2004 Manuel Novoa III <mjn3@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# 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
# General Public License for more details.
#
# You should have received a copy of the GNU 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
#
######################################################################
#
# WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
#
# Currently the dependencies are not all handled. But that's true of
# our buildroot in general, since it wasn't really set up for end users.
OPENWRT_TARGETS:= openwrt-linux openwrt-kmodules.tar.bz2 \
openwrt-shared openwrt-mtd openwrt-nvram openwrt-wlconf \
bridge dnsmasq1 iptables wtools busybox \
openwrt-rootprep
.PHONY: $(OPENWRT_TARGETS) openwrt-code.bin
openwrt-base: $(OPENWRT_TARGETS)
######################################################################
ifneq ($(filter $(TARGETS),openwrt-base),)
# WRT54G_SOURCE=wrt54gv2.2.02.2.tgz
# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.2
# WRT54G_SOURCE=wrt54g.2.02.7.tgz
# WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gv2/2.02.7
# WRT54G_DIR=$(BUILD_DIR)/WRT54G
WRT54G_SOURCE=wrt54gs.2.07.1.tgz
WRT54G_SITE=http://www.linksys.com/support/opensourcecode/wrt54gs/2.07.1
WRT54G_DIR=$(BUILD_DIR)/WRT54GS
# OPENWRT_ROOT=openwrt-root.tar.bz2
# OPENWRT_SITE=http://127.0.0.1
# OPENWRT_DIR=$(BUILD_DIR)/openwrt
LINUX_DIR=$(WRT54G_DIR)/release/src/linux/linux
LINUX_FORMAT=zImage
LINUX_BINLOC=arch/mips/brcm-boards/bcm947xx/compressed/vmlinuz
TARGET_MODULES_DIR:=$(TARGET_DIR)/lib/modules/2.4.20
$(LINUX_DIR)/.unpacked: $(WRT54G_DIR)/.prepared
-(cd $(BUILD_DIR); ln -sf $(LINUX_DIR) linux)
# preserve the binary-only driver
#mv $(LINUX_DIR)/drivers/net/mac/mac.o \
# $(LINUX_DIR)/drivers/net/mac/mac.o-saved
touch $(LINUX_DIR)/.unpacked
$(LINUX_DIR)/.patched: $(WRT54G_DIR)/.prepared
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-linux-netfilter.patch
$(SOURCE_DIR)/patch-kernel.sh $(LINUX_DIR)/../.. $(SOURCE_DIR) openwrt-wrt54g-linux.patch
# use replacement diag module code
cp -f $(SOURCE_DIR)/openwrt-diag.c $(LINUX_DIR)/drivers/net/diag/diag_led.c
cp -f $(SOURCE_DIR)/openwrt-wrt54g-linux.config $(LINUX_DIR)/.config
-(cd $(BUILD_DIR); ln -sf $(LINUX_DIR) linux)
touch $(LINUX_DIR)/.patched
$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched netfilter
$(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile
$(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/arch/mips/Makefile
$(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
make -C $(LINUX_DIR) oldconfig include/linux/version.h
touch $(LINUX_DIR)/.configured
$(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured $(GCC_BUILD_DIR2)/.installed
$(MAKE) -C $(LINUX_DIR) dep
touch $(LINUX_DIR)/.depend_done
$(LINUX_DIR)/$(LINUX_BINLOC): $(LINUX_DIR)/.depend_done
$(MAKE) -C $(LINUX_DIR) $(LINUX_FORMAT)
openwrt-kmodules.tar.bz2: $(LINUX_DIR)/$(LINUX_BINLOC)
$(MAKE) -C $(LINUX_DIR) modules
$(MAKE) -C $(LINUX_DIR) DEPMOD=/bin/true \
INSTALL_MOD_PATH=$(LINUX_DIR)/modules modules_install
tar -C $(LINUX_DIR)/modules/lib -cjf openwrt-kmodules.tar.bz2 modules
openwrt-linux: $(LINUX_DIR)/$(LINUX_BINLOC)
$(DL_DIR)/$(WRT54G_SOURCE):
$(WGET) -P $(DL_DIR) $(WRT54G_SITE)/$(WRT54G_SOURCE)
$(WRT54G_DIR)/.source: $(DL_DIR)/$(WRT54G_SOURCE)
#zcat $(DL_DIR)/$(WRT54G_SOURCE) | tar -C $(BUILD_DIR) -xvf - WRT54G/README.TXT WRT54G/release
zcat $(DL_DIR)/$(WRT54G_SOURCE) | tar -C $(BUILD_DIR) -xvf - WRT54GS/README.TXT WRT54GS/release
touch $(WRT54G_DIR)/.source
$(WRT54G_DIR)/.prepared: $(WRT54G_DIR)/.source
$(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-router.patch
$(SOURCE_DIR)/patch-kernel.sh $(WRT54G_DIR) $(SOURCE_DIR) openwrt-wrt54g-shared.patch
touch $(WRT54G_DIR)/.prepared
######################################################################
OPENWRT_ROOT_SKEL:=root.tar.gz
OPENWRT_SITE=http://openwrt.ksilebo.net/cgi-bin/viewcvs.cgi/root
$(DL_DIR)/$(OPENWRT_ROOT_SKEL):
$(WGET) -P $(DL_DIR) $(OPENWRT_SITE)/$(OPENWRT_ROOT_SKEL)
######################################################################
OPENWRT_SRCBASE:=$(WRT54G_DIR)/release/src
OPENWRT_SHARED_BUILD_DIR:=$(OPENWRT_SRCBASE)/router/shared
OPENWRT_SHARED_TARGET_BINARY:=usr/lib/libshared.so
$(TARGET_DIR)/$(OPENWRT_SHARED_TARGET_BINARY): $(WRT54G_DIR)/.source
$(MAKE) -C $(OPENWRT_SHARED_BUILD_DIR) -f Makefile-openwrt \
SRCBASE=$(OPENWRT_SRCBASE) INSTALLDIR=$(TARGET_DIR) \
CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \
CFLAGS="$(TARGET_CFLAGS) -I. -I$(OPENWRT_SRCBASE)/include -Wall -I$(OPENWRT_SRCBASE)/" \
install
openwrt-shared: $(TARGET_DIR)/$(OPENWRT_SHARED_TARGET_BINARY)
openwrt-shared-clean:
-$(MAKE) -C $(OPENWRT_SHARED_BUILD_DIR) clean
######################################################################
OPENWRT_NVRAM_BUILD_DIR:=$(OPENWRT_SRCBASE)/router/nvram
OPENWRT_NVRAM_TARGET_BINARY:=usr/sbin/nvram
$(TARGET_DIR)/$(OPENWRT_NVRAM_TARGET_BINARY): $(WRT54G_DIR)/.source
$(MAKE) -C $(OPENWRT_NVRAM_BUILD_DIR) \
SRCBASE=$(OPENWRT_SRCBASE) INSTALLDIR=$(TARGET_DIR) \
CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \
CFLAGS="$(TARGET_CFLAGS) -I. -I$(OPENWRT_SRCBASE)/include -Wall -DOPENWRT_NVRAM" \
install
openwrt-nvram: $(TARGET_DIR)/$(OPENWRT_NVRAM_TARGET_BINARY)
openwrt-nvram-clean:
-$(MAKE) -C $(OPENWRT_NVRAM_BUILD_DIR) clean
######################################################################
OPENWRT_MTD_BUILD_DIR:=$(OPENWRT_SRCBASE)/router/rc
OPENWRT_MTD_TARGET_BINARY:=sbin/mtd
$(TARGET_DIR)/$(OPENWRT_MTD_TARGET_BINARY): $(WRT54G_DIR)/.source $(TARGET_DIR)/$(OPENWRT_NVRAM_TARGET_BINARY) # need libnvram
$(MAKE) -C $(OPENWRT_MTD_BUILD_DIR) -f Makefile-openwrt \
TOP=$(OPENWRT_SRCBASE)/router \
SRCBASE=$(OPENWRT_SRCBASE) INSTALLDIR=$(TARGET_DIR) \
CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \
CFLAGS="$(TARGET_CFLAGS) -I. -I$(OPENWRT_SRCBASE)/router/shared -I$(OPENWRT_SRCBASE)/include -Wall -I$(OPENWRT_SRCBASE)/" \
install
openwrt-mtd: $(TARGET_DIR)/$(OPENWRT_MTD_TARGET_BINARY)
openwrt-mtd-clean:
-$(MAKE) -C $(OPENWRT_MTD_BUILD_DIR) clean
######################################################################
OPENWRT_WLCONF_BUILD_DIR:=$(OPENWRT_SRCBASE)/router/wlconf
OPENWRT_WLCONF_TARGET_BINARY:=usr/sbin/wlconf
$(TARGET_DIR)/$(OPENWRT_WLCONF_TARGET_BINARY): $(WRT54G_DIR)/.source
$(MAKE) -C $(OPENWRT_WLCONF_BUILD_DIR) \
TOP=$(OPENWRT_SRCBASE)/router \
SRCBASE=$(OPENWRT_SRCBASE) INSTALLDIR=$(TARGET_DIR) \
CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld STRIP="$(STRIP)" \
CFLAGS="$(TARGET_CFLAGS) -I. -I$(OPENWRT_SRCBASE)/router/shared -I$(OPENWRT_SRCBASE)/include -Wall" \
install
openwrt-wlconf: $(TARGET_DIR)/$(OPENWRT_WLCONF_TARGET_BINARY)
openwrt-wlconf-clean:
-$(MAKE) -C $(OPENWRT_WLCONF_BUILD_DIR) clean
######################################################################
openwrt-rootprep:
# tmp
mkdir -p $(TARGET_DIR)/tmp
chmod a+rwxt $(TARGET_DIR)/tmp
ln -sf /tmp $(TARGET_DIR)/var
rm -f $(TARGET_DIR)/usr/tmp
ln -sf ../tmp $(TARGET_DIR)/usr/tmp
# dev
mkdir -p $(TARGET_DIR)/dev
# etc
mkdir -p $(TARGET_DIR)/etc
ln -sf /tmp/resolv.conf $(TARGET_DIR)/etc/resolv.conf
# miscellaneous
mkdir -p $(TARGET_DIR)/mnt
mkdir -p $(TARGET_DIR)/proc
mkdir -p $(TARGET_DIR)/jffs
mkdir -p $(TARGET_DIR)/rom
# modules
mkdir -p $(TARGET_MODULES_DIR)
cp $(LINUX_DIR)/drivers/net/wl/wl.o $(TARGET_MODULES_DIR)
#cp $(LINUX_DIR)/drivers/net/et.4702/et.4702.o $(TARGET_MODULES_DIR)
cp $(LINUX_DIR)/drivers/net/et/et.o $(TARGET_MODULES_DIR)
cp $(LINUX_DIR)/drivers/net/diag/diag.o $(TARGET_MODULES_DIR)
######################################################################
openwrt-prune:
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
# remove unneeded uClibc libs
rm -rf $(TARGET_DIR)/lib/libthread_db*
rm -rf $(TARGET_DIR)/lib/libpthread*
# remove unneeded uClibc utils
rm -f $(TARGET_DIR)/sbin/ldconfig
rm -f $(TARGET_DIR)/usr/bin/ldd
# remove other unneeded files
rm -f $(TARGET_DIR)/usr/sbin/iptables-save
rm -f $(TARGET_DIR)/usr/sbin/iptables-restore
rm -f $(TARGET_DIR)/usr/sbin/ip6tables
######################################################################
openwrt-linux.trx: openwrt-prune squashfsroot
$(WRT54G_DIR)/release/tools/trx -o openwrt-linux.trx \
$(LINUX_DIR)/$(LINUX_BINLOC) $(IMAGE)
openwrt-gs-code.bin: openwrt-linux.trx
$(WRT54G_DIR)/release/tools/addpattern -i openwrt-linux.trx \
-o openwrt-gs-code.bin -g
openwrt-g-code.bin: openwrt-gs-code.bin
sed -e "1s,^W54S,W54G," < openwrt-gs-code.bin > openwrt-g-code.bin
openwrt-code.bin: openwrt-gs-code.bin openwrt-g-code.bin
######################################################################
openwrt-sourceball:
tar cjf buildroot-openwrt.tar.bz2 \
README.openwrt \
Makefile \
Makefile-openwrt \
make/openwrt.mk \
make/uclibc.mk \
make/busybox.mk \
sources/uClibc.config \
sources/uClibc.config-openwrt \
sources/busybox-openwrt-*.patch \
sources/busybox.config \
sources/busybox.config-openwrt \
sources/dnsmasq1-openwrt.patch \
sources/iptables-openwrt-extensions.patch \
sources/openwrt-wrt54g-linux.config \
sources/openwrt-wrt54g-*.patch \
sources/openwrt-diag.c
endif

View File

@ -0,0 +1,60 @@
#############################################################
#
# patch
#
#############################################################
GNUPATCH_SOURCE:=patch_2.5.9.orig.tar.gz
GNUPATCH_SITE:=http://ftp.debian.org/debian/pool/main/p/patch
GNUPATCH_CAT:=zcat
GNUPATCH_DIR:=$(BUILD_DIR)/patch-2.5.9
GNUPATCH_BINARY:=patch
GNUPATCH_TARGET_BINARY:=usr/bin/patch
$(DL_DIR)/$(GNUPATCH_SOURCE):
$(WGET) -P $(DL_DIR) $(GNUPATCH_SITE)/$(GNUPATCH_SOURCE)
patch-source: $(DL_DIR)/$(GNUPATCH_SOURCE)
$(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE)
$(GNUPATCH_CAT) $(DL_DIR)/$(GNUPATCH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(GNUPATCH_DIR)/.unpacked
$(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked
(cd $(GNUPATCH_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(GNUPATCH_DIR)/.configured
$(GNUPATCH_DIR)/$(GNUPATCH_BINARY): $(GNUPATCH_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(GNUPATCH_DIR)
$(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY): $(GNUPATCH_DIR)/$(GNUPATCH_BINARY)
rm -f $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
cp -a $(GNUPATCH_DIR)/$(GNUPATCH_BINARY) $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
patch: uclibc $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
patch-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GNUPATCH_DIR) uninstall
-$(MAKE) -C $(GNUPATCH_DIR) clean
patch-dirclean:
rm -rf $(GNUPATCH_DIR)

View File

@ -0,0 +1,71 @@
#############################################################
#
# pciutils
#
#############################################################
PCIUTILS_SOURCE:=pciutils-2.1.10.tar.gz
PCIUTILS_SITE:=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
PCIUTILS_DIR:=$(BUILD_DIR)/pciutils-2.1.10
PCIUTILS_CAT:=zcat
# Yet more targets...
PCIIDS_SITE:=http://pciids.sourceforge.net/
PCIIDS_SOURCE:=pci.ids.bz2
PCIIDS_CAT:=bzcat
$(DL_DIR)/$(PCIUTILS_SOURCE):
$(WGET) -P $(DL_DIR) $(PCIUTILS_SITE)/$(PCIUTILS_SOURCE)
$(DL_DIR)/$(PCIIDS_SOURCE):
$(WGET) -P $(DL_DIR) $(PCIIDS_SITE)/$(PCIIDS_SOURCE)
pciutils-source: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
$(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
$(PCIUTILS_CAT) $(DL_DIR)/$(PCIUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(PCIIDS_CAT) $(DL_DIR)/$(PCIIDS_SOURCE) > $(PCIUTILS_DIR)/pci.id
touch $(PCIUTILS_DIR)/.unpacked
$(PCIUTILS_DIR)/.configured: $(PCIUTILS_DIR)/.unpacked
(cd $(PCIUTILS_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(PCIUTILS_DIR)/.configured
$(PCIUTILS_DIR)/lspci: $(PCIUTILS_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(PCIUTILS_DIR)
$(TARGET_DIR)/sbin/lspci: $(PCIUTILS_DIR)/lspci
install -c $(PCIUTILS_DIR)/lspci $(TARGET_DIR)/sbin/lspci
$(TARGET_DIR)/sbin/setpci: $(PCIUTILS_DIR)/setpci
install -c $(PCIUTILS_DIR)/setpci $(TARGET_DIR)/sbin/setpci
$(TARGET_DIR)/usr/share/misc/pci.ids: $(PCIUTILS_DIR)/.dist
install -Dc $(PCIUTILS_DIR)/pci.ids $(TARGET_DIR)/usr/share/misc/pci.ids
pciutils: uclibc $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/usr/share/misc/pci.ids
pciutils-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PCIUTILS_DIR) uninstall
-$(MAKE) -C $(PCIUTILS_DIR) clean
pciutils-dirclean:
rm -rf $(PCIUTILS_DIR)

View File

@ -0,0 +1,108 @@
#############################################################
#
# pcmcia card services
#
#############################################################
# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
#
# 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.
#
# 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.
#
# 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
PCMCIA_SOURCE:=pcmcia-cs-3.2.7.tar.gz
PCMCIA_SITE:=http://aleron.dl.sourceforge.net/sourceforge/pcmcia-cs
PCMCIA_DIR:=$(BUILD_DIR)/pcmcia-cs-3.2.7
PCMCIA_PATCH:=$(SOURCE_DIR)/pcmcia.patch
PCMCIA_CAT:=zcat
$(DL_DIR)/$(PCMCIA_SOURCE):
$(WGET) -P $(DL_DIR) $(PCMCIA_SITE)/$(PCMCIA_SOURCE)
pcmcia-source: $(DL_DIR)/$(PCMCIA_SOURCE)
$(PCMCIA_DIR)/.unpacked: $(DL_DIR)/$(PCMCIA_SOURCE)
$(PCMCIA_CAT) $(DL_DIR)/$(PCMCIA_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(PCMCIA_DIR)/.unpacked
$(PCMCIA_DIR)/.patched: $(PCMCIA_DIR)/.unpacked
cat $(PCMCIA_PATCH) | patch -d $(PCMCIA_DIR) -p1
touch $(PCMCIA_DIR)/.patched
$(PCMCIA_DIR)/.configured: $(PCMCIA_DIR)/.patched
( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_SOURCE_DIR) --noprompt \
--rcdir=/etc --arch=$(ARCH) --trust --srctree --nocardbus \
--sysv --kcc=$(KERNEL_CROSS)gcc --ucc=$(TARGET_CC) --ld=$(TARGET_CROSS)ld \
--target=$(TARGET_DIR))
$(SED) "s/pump/udhcpc/" $(PCMCIA_DIR)/etc/network
$(SED) "s/ide_cs/ide-cs/" $(PCMCIA_DIR)/etc/config
$(SED) "s/bind \"wvlan_cs\"/bind \"orinoco_cs\"/g" $(PCMCIA_DIR)/etc/config
touch $(PCMCIA_DIR)/.configured
$(PCMCIA_DIR)/cardmgr/cardmgr: $(PCMCIA_DIR)/.configured
$(MAKE) -C $(PCMCIA_DIR) -i all
-A=`find $(PCMCIA_DIR) -type f -perm +111` ; \
for fo in $$A; do \
file $$fo | grep "ELF" | grep "executable" > /dev/null 2>&1; \
if [ $$? = 0 ] ; then \
$(STRIP) $$fo; \
fi; \
done
touch -c $(PCMCIA_DIR)/cardmgr/cardmgr
$(TARGET_DIR)/sbin/cardmgr: $(PCMCIA_DIR)/cardmgr/cardmgr
rm -rf $(TARGET_DIR)/etc/pcmcia;
$(MAKE) -i -C $(PCMCIA_DIR) install
rm -rf $(TARGET_DIR)/usr/man;
rm -rf $(TARGET_DIR)/usr/share/man;
rm -rf $(TARGET_DIR)/usr/X11R6/man;
rm -rf $(TARGET_DIR)/etc/rc.d;
rm -rf $(TARGET_DIR)/etc/rc?.d;
rm -f $(TARGET_DIR)/etc/init.d/pcmcia*;
rm -f $(TARGET_DIR)/sbin/dump_cis $(TARGET_DIR)/sbin/pack_cis
rm -f $(TARGET_DIR)/usr/share/pnp.ids $(TARGET_DIR)/sbin/lspnp $(TARGET_DIR)/sbin/setpnp;
rm -f $(TARGET_DIR)/sbin/pcinitrd
rm -f $(TARGET_DIR)/sbin/probe
rm -f $(TARGET_DIR)/sbin/ide_info
rm -f $(TARGET_DIR)/sbin/scsi_info
rm -f $(TARGET_DIR)/sbin/ftl_check
rm -f $(TARGET_DIR)/sbin/ftl_format
rm -f $(TARGET_DIR)/usr/X11R6/bin/xcardinfo
rm -rf $(TARGET_DIR)/etc/sysconfig
mkdir -p $(TARGET_DIR)/etc/default
cp -f $(PCMCIA_DIR)/etc/pcmcia $(TARGET_DIR)/etc/default/
cp -f $(PCMCIA_DIR)/etc/rc.pcmcia $(TARGET_DIR)/etc/init.d/S30pcmcia
rm -rf $(TARGET_DIR)/etc/pcmcia/cis
chmod a+x $(TARGET_DIR)/etc/init.d/S30pcmcia
chmod -R u+w $(TARGET_DIR)/etc/pcmcia/*
# use busybox depmod.pl so we need the sources unpacked
$(PCMCIA_DIR)/.modules.dep: $(BUSYBOX_DIR)/.configured $(TARGET_DIR)/lib/modules
[ -d $(TARGET_DIR)/lib/modules/$(LINUX_VERSION) ] && \
$(BUSYBOX_DIR)/examples/depmod.pl \
-b $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/ \
-k $(LINUX_DIR)/vmlinux \
-F $(LINUX_DIR)/System.map \
> $(TARGET_DIR)/lib/modules/$(LINUX_VERSION)/modules.dep
touch $(PCMCIA_DIR)/.modules.dep
pcmcia: uclibc $(TARGET_DIR)/sbin/cardmgr $(PCMCIA_DIR)/.modules.dep
pcmcia-clean:
rm -f $(TARGET_DIR)/sbin/cardmgr
-$(MAKE) -C $(PCMCIA_DIR) clean
rm -f $(PCMCIA_DIR)/.configured $(PCMCIA_DIR)/config.out
pcmcia-dirclean:
rm -rf $(PCMCIA_DIR)

View File

@ -0,0 +1,68 @@
#############################################################
#
# pppd
#
#############################################################
PPPD_SOURCE:=ppp-2.4.1.tar.gz
PPPD_SITE:=ftp://ftp.samba.org/pub/ppp
PPPD_DIR:=$(BUILD_DIR)/ppp-2.4.1
PPPD_CAT:=zcat
PPPD_BINARY:=pppd/pppd
PPPD_TARGET_BINARY:=usr/sbin/pppd
$(DL_DIR)/$(PPPD_SOURCE):
$(WGET) -P $(DL_DIR) $(PPPD_SITE)/$(PPPD_SOURCE)
pppd-source: $(DL_DIR)/$(PPPD_SOURCE)
$(PPPD_DIR)/.unpacked: $(DL_DIR)/$(PPPD_SOURCE)
$(PPPD_CAT) $(DL_DIR)/$(PPPD_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SED) 's/ -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP//' $(PPPD_DIR)/pppd/Makefile.linux
$(SED) 's/$(INSTALL) -s/$(INSTALL)/' $(PPPD_DIR)/*/Makefile.linux
$(SED) 's/ -o root//' $(PPPD_DIR)/*/Makefile.linux
$(SED) 's/ -g daemon//' $(PPPD_DIR)/*/Makefile.linux
touch $(PPPD_DIR)/.unpacked
$(PPPD_DIR)/.configured: $(PPPD_DIR)/.unpacked
(cd $(PPPD_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(PPPD_DIR)/.configured
$(PPPD_DIR)/$(PPPD_BINARY): $(PPPD_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(PPPD_DIR)
$(TARGET_DIR)/$(PPPD_TARGET_BINARY): $(PPPD_DIR)/$(PPPD_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PPPD_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
pppd: uclibc $(TARGET_DIR)/$(PPPD_TARGET_BINARY)
pppd-clean:
rm -f $(TARGET_DIR)/usr/sbin/pppd
rm -f $(TARGET_DIR)/usr/sbin/chat
rm -rf $(TARGET_DIR)/etc/ppp
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(PPPD_DIR) uninstall
-$(MAKE) -C $(PPPD_DIR) clean
pppd-dirclean:
rm -rf $(PPPD_DIR)

View File

@ -0,0 +1,57 @@
#############################################################
#
# python
#
#############################################################
PYTHON_VERSION=2.3.2
PYTHON_SOURCE:=Python-$(PYTHON_VERSION).tgz
PYTHON_SITE:=http://python.org/ftp/python/$(PYTHON_VERSION)
PYTHON_DIR:=$(BUILD_DIR)/Python-$(PYTHON_VERSION)
PYTHON_CAT:=zcat
PYTHON_BINARY:=python
PYTHON_INSTALL_DIR:=$(BUILD_DIR)/python_install
PYTHON_TARGET_BINARY:=$(PYTHON_INSTALL_DIR)/bin/python
$(DL_DIR)/$(PYTHON_SOURCE):
$(WGET) -P $(DL_DIR) $(PYTHON_SITE)/$(PYTHON_SOURCE)
python-source: $(DL_DIR)/$(PYTHON_SOURCE)
$(PYTHON_DIR)/.unpacked: $(DL_DIR)/$(PYTHON_SOURCE)
$(PYTHON_CAT) $(DL_DIR)/$(PYTHON_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(PYTHON_DIR)/.unpacked
$(PYTHON_DIR)/.configured: $(PYTHON_DIR)/.unpacked
(cd $(PYTHON_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--sysconfdir=/etc \
$(DISABLE_NLS) \
);
touch $(PYTHON_DIR)/.configured
$(PYTHON_DIR)/$(PYTHON_BINARY): $(PYTHON_DIR)/.configured
LD_LIBRARY_PATH=$(STAGING_DIR)/lib
$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR)
$(TARGET_DIR)/$(PYTHON_TARGET_BINARY): $(PYTHON_DIR)/$(PYTHON_BINARY)
python: uclibc $(TARGET_DIR)/$(PYTHON_TARGET_BINARY)
$(MAKE) CC=$(TARGET_CC) -C $(PYTHON_DIR) install
rm $(PYTHON_INSTALL_DIR)/bin/idle
rm $(PYTHON_INSTALL_DIR)/bin/pydoc
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
python-clean:
-$(MAKE) -C $(PYTHON_DIR) distclean
rm $(PYTHON_DIR)/.configured
python-dirclean:
rm -rf $(PYTHON_DIR)

View File

@ -0,0 +1,59 @@
#############################################################
#
# raidtools2
#
#############################################################
RAIDTOOLS2_SOURCE:=raidtools2-1.00.3.tar.gz
RAIDTOOLS2_SITE:=
RAIDTOOLS2_DIR:=$(BUILD_DIR)/raidtools2-1.00.3
RAIDTOOLS2_CAT:=zcat
RAIDTOOLS2_BINARY:=mkraid
RAIDTOOLS2_TARGET_BINARY:=sbin/mkraid
$(DL_DIR)/$(RAIDTOOLS2_SOURCE):
$(WGET) -P $(DL_DIR) $(RAIDTOOLS2_SITE)/$(RAIDTOOLS2_SOURCE)
raidtools2-source: $(DL_DIR)/$(RAIDTOOLS2_SOURCE)
$(RAIDTOOLS2_DIR)/.unpacked: $(DL_DIR)/$(RAIDTOOLS2_SOURCE)
$(RAIDTOOLS2_CAT) $(DL_DIR)/$(RAIDTOOLS2_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(RAIDTOOLS2_DIR)/.unpacked
$(RAIDTOOLS2_DIR)/.configured: $(RAIDTOOLS2_DIR)/.unpacked
(cd $(RAIDTOOLS2_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share/misc \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--enable-fsect-man5 \
);
touch $(RAIDTOOLS2_DIR)/.configured
$(RAIDTOOLS2_DIR)/$(RAIDTOOLS2_BINARY): $(RAIDTOOLS2_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(RAIDTOOLS2_DIR)
$(TARGET_DIR)/$(RAIDTOOLS2_TARGET_BINARY): $(RAIDTOOLS2_DIR)/$(RAIDTOOLS2_BINARY)
$(MAKE) ROOTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(RAIDTOOLS2_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
raidtools2: zlib uclibc $(TARGET_DIR)/$(RAIDTOOLS2_TARGET_BINARY)
raidtools2-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(RAIDTOOLS2_DIR) uninstall
-$(MAKE) -C $(RAIDTOOLS2_DIR) clean
raidtools2-dirclean:
rm -rf $(RAIDTOOLS2_DIR)

View File

@ -0,0 +1,70 @@
#############################################################
#
# rxvt
#
#############################################################
# Copyright (C) 2002 by Tom Walsh <Tom@OpenHardware.net>
#
# 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.
#
# 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.
#
# 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
RXVT_SOURCE:=rxvt-2.6.4.tar.bz2
RXVT_PATCH:=$(SOURCE_DIR)/rxvt-2.6.4.patch
RXVT_SITE:=ftp://ftp.rxvt.org/pub/rxvt/
RXVT_CAT:=bzcat
RXVT_DIR:=$(BUILD_DIR)/rxvt-2.6.4
RXVT_BINARY:=$(RXVT_DIR)/src/rxvt
$(DL_DIR)/$(RXVT_SOURCE):
$(WGET) -P $(DL_DIR) $(RXVT_SITE)/$(RXVT_SOURCE)
rxvt-source: $(DL_DIR)/$(RXVT_SOURCE)
$(RXVT_DIR)/.unpacked: $(DL_DIR)/$(RXVT_SOURCE)
$(RXVT_CAT) $(DL_DIR)/$(RXVT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(RXVT_DIR)/.unpacked
$(RXVT_DIR)/.configured: $(RXVT_DIR)/.unpacked
(cd $(RXVT_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr/X11R6 \
--mandir=/usr/man \
--infodir=/usr/info \
--x-includes=$(TINYX_DIR)/exports/include \
--x-libraries=$(TINYX_DIR)/exports/lib \
);
cat $(RXVT_PATCH) | patch -d $(RXVT_DIR) -p1
touch $(RXVT_DIR)/.configured
$(RXVT_BINARY): $(RXVT_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(RXVT_DIR)
$(STRIP) -x $(RXVT_BINARY)
$(TARGET_DIR)/usr/X11R6/bin/rxvt: $(RXVT_BINARY)
cp -f $(RXVT_BINARY) $(TARGET_DIR)/usr/X11R6/bin
rxvt: tinyx $(TARGET_DIR)/usr/X11R6/bin/rxvt
rxvt-clean:
rm -f $(TARGET_DIR)/usr/X11R6/bin/rxvt
-$(MAKE) -C $(RXVT_DIR) clean
rxvt-dirclean:
rm -rf $(RXVT_DIR)

View File

@ -0,0 +1,136 @@
#############################################################
#
# sed
#
#############################################################
SED_SOURCE:=sed-4.0.8.tar.gz
SED_SITE:=ftp://ftp.gnu.org/gnu/sed
SED_CAT:=zcat
SED_DIR1:=$(TOOL_BUILD_DIR)/sed-4.0.8
SED_DIR2:=$(BUILD_DIR)/sed-4.0.8
SED_BINARY:=sed/sed
SED_TARGET_BINARY:=bin/sed
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
SED_CPPFLAGS=-D_FILE_OFFSET_BITS=64
endif
SED:=$(STAGING_DIR)/bin/sed -i -e
HOST_SED_TARGET=$(shell ./sources/sedcheck.sh)
$(DL_DIR)/$(SED_SOURCE):
$(WGET) -P $(DL_DIR) $(SED_SITE)/$(SED_SOURCE)
sed-source: $(DL_DIR)/$(SED_SOURCE)
#############################################################
#
# build sed for use on the host system
#
#############################################################
$(SED_DIR1)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
mkdir -p $(TOOL_BUILD_DIR)
mkdir -p $(DL_DIR)
mkdir -p $(STAGING_DIR)/bin;
$(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
touch $(SED_DIR1)/.unpacked
$(SED_DIR1)/.configured: $(SED_DIR1)/.unpacked
(cd $(SED_DIR1); rm -rf config.cache; \
./configure \
--prefix=$(STAGING_DIR) \
--prefix=/usr \
);
touch $(SED_DIR1)/.configured
$(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured
$(MAKE) -C $(SED_DIR1)
# This stuff is needed to work around GNU make deficiencies
build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
@if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi;
@if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \
-ot $(SED_DIR1)/$(SED_BINARY) ] ; then \
set -x; \
mkdir -p $(STAGING_DIR)/bin; \
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(SED_DIR1) install; \
mv $(STAGING_DIR)/usr/bin/sed $(STAGING_DIR)/bin/; \
rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
$(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi
use-sed-host-binary:
@if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \
if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \
mkdir -p $(STAGING_DIR)/bin; \
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); \
ln -s $$SED $(STAGING_DIR)/$(SED_TARGET_BINARY)
host-sed: $(HOST_SED_TARGET)
host-sed-clean:
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(SED_DIR1) uninstall
-$(MAKE) -C $(SED_DIR1) clean
host-sed-dirclean:
rm -rf $(SED_DIR1)
#############################################################
#
# build sed for use on the target system
#
#############################################################
$(SED_DIR2)/.unpacked: $(DL_DIR)/$(SED_SOURCE)
$(SED_CAT) $(DL_DIR)/$(SED_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(SED_DIR2)/.unpacked
$(SED_DIR2)/.configured: $(SED_DIR2)/.unpacked
(cd $(SED_DIR2); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="$(SED_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
touch $(SED_DIR2)/.configured
$(SED_DIR2)/$(SED_BINARY): $(SED_DIR2)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(SED_DIR2)
# This stuff is needed to work around GNU make deficiencies
sed-target_binary: $(SED_DIR2)/$(SED_BINARY)
@if [ -L $(TARGET_DIR)/$(SED_TARGET_BINARY) ] ; then \
rm -f $(TARGET_DIR)/$(SED_TARGET_BINARY); fi;
@if [ ! -f $(SED_DIR2)/$(SED_BINARY) -o $(TARGET_DIR)/$(SED_TARGET_BINARY) \
-ot $(SED_DIR2)/$(SED_BINARY) ] ; then \
set -x; \
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SED_DIR2) install; \
mv $(TARGET_DIR)/usr/bin/sed $(TARGET_DIR)/bin/; \
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc; fi
sed: uclibc sed-target_binary
sed-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SED_DIR2) uninstall
-$(MAKE) -C $(SED_DIR2) clean
sed-dirclean:
rm -rf $(SED_DIR2)

View File

@ -0,0 +1,36 @@
#############################################################
#
# sfdisk support
#
#############################################################
SFDISK_SOURCE=sfdisk.tar.bz2
SFDISK_SITE:=http://www.uclibc.org/
SFDISK_DIR=$(BUILD_DIR)/sfdisk
$(DL_DIR)/$(SFDISK_SOURCE):
$(WGET) -P $(DL_DIR) $(SFDISK_SITE)/$(SFDISK_SOURCE)
$(SFDISK_DIR): $(DL_DIR)/$(SFDISK_SOURCE)
bzcat $(DL_DIR)/$(SFDISK_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SFDISK_DIR)/sfdisk: $(SFDISK_DIR)
$(MAKE) CROSS=$(TARGET_CROSS) DEBUG=false -C $(SFDISK_DIR);
-$(STRIP) $(SFDISK_DIR)/sfdisk;
touch -c $(SFDISK_DIR)/sfdisk
$(TARGET_DIR)/sbin/sfdisk: $(SFDISK_DIR)/sfdisk
cp $(SFDISK_DIR)/sfdisk $(TARGET_DIR)/sbin/sfdisk;
touch -c $(TARGET_DIR)/sbin/sfdisk
sfdisk: uclibc $(TARGET_DIR)/sbin/sfdisk
sfdisk-source: $(DL_DIR)/$(SFDISK_SOURCE)
sfdisk-clean:
rm -f $(TARGET_DIR)/sbin/sfdisk
-$(MAKE) -C $(SFDISK_DIR) clean
sfdisk-dirclean:
rm -rf $(SFDISK_DIR)

View File

@ -0,0 +1,48 @@
#############################################################
#
# slang
#
#############################################################
SLANG_SOURCE=slang-1.4.5-mini.tar.bz2
SLANG_SITE:=http://www.uclibc.org/
SLANG_DIR=$(BUILD_DIR)/slang-1.4.5-mini
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
SLANG_CFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
endif
SLANG_CFLAGS+=-fPIC
$(DL_DIR)/$(SLANG_SOURCE):
$(WGET) -P $(DL_DIR) $(SLANG_SITE)/$(SLANG_SOURCE)
$(SLANG_DIR): $(DL_DIR)/$(SLANG_SOURCE)
bzcat $(DL_DIR)/$(SLANG_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SLANG_DIR)/libslang.so: $(SLANG_DIR)
$(MAKE) CFLAGS="-Os -g $(SLANG_CFLAGS)" CC=$(TARGET_CC) -C $(SLANG_DIR)
touch -c $(SLANG_DIR)/libslang.so;
$(STAGING_DIR)/lib/libslang.so.1: $(SLANG_DIR)/libslang.so
cp -a $(SLANG_DIR)/libslang.a $(STAGING_DIR)/lib;
cp -a $(SLANG_DIR)/libslang.so $(STAGING_DIR)/lib;
cp -a $(SLANG_DIR)/slang.h $(STAGING_DIR)/include;
cp -a $(SLANG_DIR)/slcurses.h $(STAGING_DIR)/include;
(cd $(STAGING_DIR)/lib; ln -fs libslang.so libslang.so.1);
touch -c $(STAGING_DIR)/lib/libslang.so.1
$(TARGET_DIR)/lib/libslang.so.1: $(STAGING_DIR)/lib/libslang.so.1
cp -a $(STAGING_DIR)/lib/libslang.so* $(TARGET_DIR)/lib;
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libslang.so*
touch -c $(TARGET_DIR)/lib/libslang.so.1
slang: uclibc $(STAGING_DIR)/lib/libslang.so.1 $(TARGET_DIR)/lib/libslang.so.1
slang-source: $(DL_DIR)/$(SLANG_SOURCE)
slang-clean:
rm -f $(TARGET_DIR)/lib/libslang.so*
-$(MAKE) -C $(SLANG_DIR) clean
slang-dirclean:
rm -rf $(SLANG_DIR)

View File

@ -0,0 +1,67 @@
#############################################################
#
# socat
#
#############################################################
SOCAT_VERSION=1.3.0.1
# Don't alter below this line unless you (think) you know
# what you are doing! Danger, Danger!
SOCAT_SOURCE=socat-$(SOCAT_VERSION).tar.bz2
SOCAT_SITE=http://www.dest-unreach.org/socat/download/
#SOCAT_DIR=$(BUILD_DIR)/${shell basename $(SOCAT_SOURCE) .tar.bz2}
SOCAT_DIR=$(BUILD_DIR)/socat-1.3
#SOCAT_WORKDIR=$(BUILD_DIR)/socat_workdir
SOCAT_WORKDIR=$(SOCAT_DIR)
$(DL_DIR)/$(SOCAT_SOURCE):
$(WGET) -P $(DL_DIR) $(SOCAT_SITE)/$(SOCAT_SOURCE)
$(SOCAT_DIR)/.unpacked: $(DL_DIR)/$(SOCAT_SOURCE)
bzip2 -d -c $(DL_DIR)/$(SOCAT_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(SOCAT_DIR)/.unpacked
$(SOCAT_WORKDIR)/Makefile: $(SOCAT_DIR)/.unpacked
rm -f $(SOCAT_WORKDIR)/Makefile
mkdir -p $(SOCAT_WORKDIR)
(cd $(SOCAT_WORKDIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
$(SOCAT_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
);
$(SOCAT_WORKDIR)/socat: $(SOCAT_WORKDIR)/Makefile
rm -f $@
$(MAKE) -C $(SOCAT_WORKDIR)
$(SOCAT_WORKDIR)/.installed: $(SOCAT_WORKDIR)/socat
mkdir -p $(TARGET_DIR)/usr/man/man1
$(MAKE) -C $(SOCAT_WORKDIR) install prefix=$(TARGET_DIR)/usr
socat: uclibc $(SOCAT_WORKDIR)/.installed
socat-source: $(DL_DIR)/$(SOCAT_SOURCE)
socat-clean:
@if [ -d $(SOCAT_WORKDIR)/Makefile ] ; then \
$(MAKE) -C $(SOCAT_WORKDIR) clean ; \
fi;
socat-dirclean:
rm -rf $(SOCAT_DIR) $(SOCAT_WORKDIR)

View File

@ -0,0 +1,51 @@
#############################################################
#
# mksquashfs to build to target squashfs filesystems
#
#############################################################
SQUASHFS_DIR=$(BUILD_DIR)/squashfs1.3r3
SQUASHFS_SOURCE=squashfs1.3r3.tar.gz
SQUASHFS_SITE=http://aleron.dl.sourceforge.net/sourceforge/squashfs
$(DL_DIR)/$(SQUASHFS_SOURCE):
$(WGET) -P $(DL_DIR) $(SQUASHFS_SITE)/$(SQUASHFS_SOURCE)
$(SQUASHFS_DIR): $(DL_DIR)/$(SQUASHFS_SOURCE) #$(SQUASHFS_PATCH)
zcat $(DL_DIR)/$(SQUASHFS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SOURCE_DIR)/patch-kernel.sh $(SQUASHFS_DIR) $(SOURCE_DIR) squashfs.patch
$(SQUASHFS_DIR)/squashfs-tools/mksquashfs: $(SQUASHFS_DIR)
$(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools;
squashfs: $(SQUASHFS_DIR)/squashfs-tools/mksquashfs
squashfs-source: $(DL_DIR)/$(SQUASHFS_SOURCE)
squashfs-clean:
-$(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools clean
squashfs-dirclean:
rm -rf $(SQUASHFS_DIR)
#############################################################
#
# Build the squashfs root filesystem image
#
#############################################################
squashfsroot: squashfs
#-@find $(TARGET_DIR)/lib -type f -name \*.so\* | xargs $(STRIP) --strip-unneeded 2>/dev/null || true;
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
@rm -rf $(TARGET_DIR)/usr/man
@rm -rf $(TARGET_DIR)/usr/info
#$(SQUASHFS_DIR)/squashfs-tools/mksquashfs -q -D $(SOURCE_DIR)/device_table.txt $(TARGET_DIR) $(IMAGE)
$(SQUASHFS_DIR)/squashfs-tools/mksquashfs $(TARGET_DIR) $(IMAGE) -noappend -root-owned
squashfsroot-source: squashfs-source
squashfsroot-clean:
-$(MAKE) -C $(SQUASHFS_DIR) clean
squashfsroot-dirclean:
rm -rf $(SQUASHFS_DIR)

View File

@ -0,0 +1,59 @@
#############################################################
#
# strace
#
#############################################################
STRACE_SOURCE:=strace-4.5.3.tar.bz2
STRACE_SITE:=http://aleron.dl.sourceforge.net/sourceforge/strace
STRACE_CAT:=bzcat
STRACE_DIR:=$(BUILD_DIR)/strace-4.5.3
$(DL_DIR)/$(STRACE_SOURCE):
$(WGET) -P $(DL_DIR) $(STRACE_SITE)/$(STRACE_SOURCE)
strace-source: $(DL_DIR)/$(STRACE_SOURCE)
$(STRACE_DIR)/.unpacked: $(DL_DIR)/$(STRACE_SOURCE)
$(STRACE_CAT) $(DL_DIR)/$(STRACE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(STRACE_DIR)/.unpacked
$(STRACE_DIR)/.configured: $(STRACE_DIR)/.unpacked
(cd $(STRACE_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(STRACE_DIR)/.configured
$(STRACE_DIR)/strace: $(STRACE_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(STRACE_DIR)
$(TARGET_DIR)/usr/bin/strace: $(STRACE_DIR)/strace
install -c $(STRACE_DIR)/strace $(TARGET_DIR)/usr/bin/strace
$(STRIP) $(TARGET_DIR)/usr/bin/strace > /dev/null 2>&1
strace: uclibc $(TARGET_DIR)/usr/bin/strace
strace-clean:
$(MAKE) -C $(STRACE_DIR) clean
strace-dirclean:
rm -rf $(STRACE_DIR)

View File

@ -0,0 +1,59 @@
#############################################################
#
# System Linux kernel target
#
# This uses an existing linux kernel source tree on
# your build system, and makes no effort at compiling
# anything....
#
# You will probably want to change LINUX_SOURCE to
# point to wherever you installed you kernel.
#
# -Erik
#
#############################################################
ifneq ($(filter $(TARGETS),system-linux),)
LINUX_SOURCE=/usr/src/linux
LINUX_DIR=$(BUILD_DIR)/linux
LINUX_KERNEL=$(BUILD_DIR)/buildroot-kernel
# Used by pcmcia-cs and others
LINUX_SOURCE_DIR=$(LINUX_SOURCE)
$(LINUX_DIR)/.configured:
mkdir -p $(LINUX_DIR)/include
(cd $(LINUX_DIR)/include; \
for i in $(LINUX_SOURCE)/include/*; do ln -sf $$i ; done; \
rm -f asm; \
if [ "$(ARCH)" = "powerpc" ];then \
ln -fs asm-ppc asm; \
elif [ "$(ARCH)" = "mips" ];then \
ln -fs asm-mips asm; \
elif [ "$(ARCH)" = "mipsel" ];then \
ln -fs asm-mips asm; \
elif [ "$(ARCH)" = "arm" ];then \
ln -fs asm-arm asm; \
(cd asm-arm; \
if [ ! -L proc ] ; then \
ln -fs proc-armv proc; \
ln -fs arch-ebsa285 arch; fi); \
elif [ "$(ARCH)" = "cris" ];then \
ln -fs asm-cris asm; \
else ln -fs asm-$(ARCH) asm; \
fi)
cp $(LINUX_SOURCE)/Makefile $(LINUX_DIR)/
cp $(LINUX_SOURCE)/Rules.make $(LINUX_DIR)/
touch $(LINUX_DIR)/.configured
$(LINUX_KERNEL): $(LINUX_DIR)/.configured
system-linux: $(LINUX_DIR)/.configured
system-linux-clean: clean
rm -f $(LINUX_KERNEL)
rm -rf $(LINUX_DIR)
system-linux-dirclean:
rm -rf $(LINUX_DIR)
endif

View File

@ -0,0 +1,66 @@
#############################################################
#
# tar
#
#############################################################
GNUTAR_SOURCE:=tar-1.13.25.tar.gz
GNUTAR_SITE:=ftp://alpha.gnu.org/gnu/tar
GNUTAR_DIR:=$(BUILD_DIR)/tar-1.13.25
GNUTAR_CAT:=zcat
GNUTAR_BINARY:=src/tar
GNUTAR_TARGET_BINARY:=bin/tar
$(DL_DIR)/$(GNUTAR_SOURCE):
$(WGET) -P $(DL_DIR) $(GNUTAR_SITE)/$(GNUTAR_SOURCE)
tar-source: $(DL_DIR)/$(GNUTAR_SOURCE)
$(GNUTAR_DIR)/.unpacked: $(DL_DIR)/$(GNUTAR_SOURCE)
$(GNUTAR_CAT) $(DL_DIR)/$(GNUTAR_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(GNUTAR_DIR)/.unpacked
$(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
(cd $(GNUTAR_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
$(DISABLE_LARGEFILE) \
);
touch $(GNUTAR_DIR)/.configured
$(GNUTAR_DIR)/$(GNUTAR_BINARY): $(GNUTAR_DIR)/.configured
$(MAKE) -C $(GNUTAR_DIR)
# This stuff is needed to work around GNU make deficiencies
tar-target_binary: $(GNUTAR_DIR)/$(GNUTAR_BINARY)
@if [ -L $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) ] ; then \
rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi;
@if [ ! -f $(GNUTAR_DIR)/$(GNUTAR_BINARY) -o $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY) \
-ot $(GNUTAR_DIR)/$(GNUTAR_BINARY) ] ; then \
set -x; \
rm -f $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); \
cp -a $(GNUTAR_DIR)/$(GNUTAR_BINARY) $(TARGET_DIR)/$(GNUTAR_TARGET_BINARY); fi ;
tar: uclibc tar-target_binary
tar-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(GNUTAR_DIR) uninstall
-$(MAKE) -C $(GNUTAR_DIR) clean
tar-dirclean:
rm -rf $(GNUTAR_DIR)

View File

@ -0,0 +1,52 @@
#############################################################
#
# tinylogin
#
#############################################################
# Enable this to use the tinylogin daily snapshot
USE_TINYLOGIN_SNAPSHOT=true
ifeq ($(USE_TINYLOGIN_SNAPSHOT),true)
# Be aware that this changes daily....
TINYLOGIN_DIR:=$(BUILD_DIR)/tinylogin
TINYLOGIN_SOURCE:=tinylogin-snapshot.tar.bz2
TINYLOGIN_SITE:=http://tinylogin.busybox.net/downloads/snapshots
else
TINYLOGIN_DIR:=$(BUILD_DIR)/tinylogin-1.4
TINYLOGIN_SOURCE:=tinylogin-1.4.tar.bz2
TINYLOGIN_SITE:=http://tinylogin.busybox.net/downloads
endif
$(DL_DIR)/$(TINYLOGIN_SOURCE):
$(WGET) -P $(DL_DIR) $(TINYLOGIN_SITE)/$(TINYLOGIN_SOURCE)
tinylogin-source: $(DL_DIR)/$(TINYLOGIN_SOURCE)
$(TINYLOGIN_DIR)/Config.h: $(DL_DIR)/$(TINYLOGIN_SOURCE)
bzcat $(DL_DIR)/$(TINYLOGIN_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(SED) "s/\`id -u\` -ne 0/0 == 1/" \
$(TINYLOGIN_DIR)/install.sh
$(SED) "s/4755 --owner=root --group=root/755/" \
$(TINYLOGIN_DIR)/install.sh
$(SED) "s/^DOSTATIC.*/DOSTATIC=false/g;" $(TINYLOGIN_DIR)/Makefile
$(SED) "s/^DODEBUG.*/DODEBUG=false/g;" $(TINYLOGIN_DIR)/Makefile
# date test this one
touch $(TINYLOGIN_DIR)/Config.h
$(TINYLOGIN_DIR)/tinylogin: $(TINYLOGIN_DIR)/Config.h
$(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" \
CFLAGS_EXTRA="$(TARGET_CFLAGS)" -C $(TINYLOGIN_DIR)
$(TARGET_DIR)/bin/tinylogin: $(TINYLOGIN_DIR)/tinylogin
$(MAKE) CC=$(TARGET_CC) CROSS="$(TARGET_CROSS)" \
PREFIX="$(TARGET_DIR)" -C $(TINYLOGIN_DIR) \
CFLAGS_EXTRA="$(TARGET_CFLAGS)" install
tinylogin: uclibc $(TARGET_DIR)/bin/tinylogin
tinylogin-clean:
rm -f $(TARGET_DIR)/bin/tinylogin
-$(MAKE) -C $(TINYLOGIN_DIR) clean
tinylogin-dirclean:
rm -rf $(TINYLOGIN_DIR)

View File

@ -0,0 +1,127 @@
#############################################################
#
# tinyx - a small footprint X-server for the TuxScreen
#
#############################################################
# Copyright (C) 2002 by Tom Walsh <Tom@OpenHardware.net>
#
# 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.
#
# 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.
#
# 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
#
#############################################################
# You may want to change these.
#############################################################
TINYX_APPS:=xlsfonts/xlsfonts xmodmap/xmodmap
#xset/xset xdpyinfo/xdpyinfo xsetroot/xsetroot \
# xrdb/xrdb xrandr/xrandr \
# xhost/xhost xauth/xauth oclock/oclock xeyes/xeyes
#
TINYX_LIBS:=ICE X11 Xext Xpm
# Xaw SM Xt Xmu
#############################################################
# Stuff below this line shouldn't need changes.
# if you do change, look in rxvt & matchbox for the impact!
#############################################################
#
# Where resources are found.
#
TINYX_DIR:=$(BUILD_DIR)/xc-011010
TINYX_LDIR:=$(TINYX_DIR)/lib
TINYX_PROGS:=$(TINYX_DIR)/programs
TINYX_PATCH:=$(SOURCE_DIR)/tinyx-011010.patch
TINYX_SOURCE:=xc-011010.tar.bz2
TINYX_SITE:= http://intimate.handhelds.org/jacques/
TINYX_CF:=$(TINYX_DIR)/config/cf
#
# Some things that you may want to change.
#
TINYX_XFBDEV:=$(TINYX_DIR)/programs/Xserver/Xfbdev
TINYX_CAT:=bzcat
TINYX_BINX:=$(TARGET_DIR)/usr/X11R6/bin/
TINYX_LIBX:=$(TARGET_DIR)/usr/lib/
#
# These rules fetch various tinyx source files.
#
$(DL_DIR)/$(TINYX_SOURCE):
$(WGET) -P $(DL_DIR) $(TINYX_SITE)/$(TINYX_SOURCE)
$(DL_DIR)/cross.def:
$(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/cross.def
$(DL_DIR)/host.def:
$(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/host.def
#
# rule to make sure that we have the source, and it is configured.
#
$(TINYX_DIR)/.configure: $(DL_DIR)/$(TINYX_SOURCE) $(DL_DIR)/cross.def $(DL_DIR)/host.def
$(TINYX_CAT) $(DL_DIR)/$(TINYX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(TINYX_PATCH) | patch -d $(TINYX_DIR) -p1
cp $(DL_DIR)/host.def $(TINYX_CF)/host.def
cp $(DL_DIR)/cross.def $(TINYX_CF)/cross.def
$(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' \
$(TINYX_CF)/cross.def \
$(TINYX_LDIR)/X11/Xlib.h
touch $(TINYX_DIR)/.configure
#
# Now that we have the source, build it...
#
$(TINYX_XFBDEV): $(TINYX_DIR)/.configure
rm -f $(TINYX_BINX)/Xfbdev
( cd $(TINYX_DIR) ; $(MAKE) World ; cd $(BUILDROOT) )
#
# Once Frame Buffer is built, we install executables.
#
$(TINYX_BINX)/Xfbdev: $(TINYX_XFBDEV)
-mkdir $(TARGET_DIR)/usr/X11R6
-mkdir $(TINYX_BINX)
for file in $(TINYX_APPS) ; do \
cp -f $(TINYX_DIR)/programs/$$file $(TINYX_BINX) ; \
$(STRIP) $(TINYX_PROGS)/$$file ; \
done
cp $(TINYX_DIR)/programs/Xserver/Xfbdev $(TINYX_BINX)
$(STRIP) $(TINYX_BINX)/Xfbdev
cp -f $(TINYX_DIR)/startx $(TARGET_DIR)/bin
chmod a+x $(TARGET_DIR)/bin/startx
#
# After we have executables installed, install the libraries.
#
$(TINYX_LIBX)/libX11.so.6.2: $(TINYX_XFBDEV)
for dirs in $(TINYX_LIBS) ; do \
file=`find $(TINYX_LDIR)/$$dirs -type f -iname "lib$$dirs.so*"` ; \
$(STRIP) --strip-unneeded $$file ; \
cp -f $$file $(TINYX_LIBX) ; \
file=`find $(TINYX_LDIR)/$$dirs -type l -iname "lib$$dirs.so*"` ; \
cp -pRf $$file $(TINYX_LIBX) ; \
done
tinyx: zlib $(TINYX_LIBX)/libX11.so.6.2 $(TINYX_BINX)/Xfbdev
tinyx-source: $(DL_DIR)/$(TINYX_SOURCE)
tinyx-clean:
-rm -rf $(TARGET_DIR)/usr/X11R6
-$(MAKE) -C $(TINYX_DIR) clean
tinyx-dirclean:
-rm -rf $(TINYX_DIR)
-rm -rf $(TARGET_DIR)/usr/X11R6

View File

@ -0,0 +1,51 @@
TN5250_SITE:=http://aleron.dl.sourceforge.net/sourceforge/tn5250
TN5250_DIR:=$(BUILD_DIR)/tn5250-0.16.4
TN5250_SOURCE:=tn5250-0.16.4.tar.gz
$(DL_DIR)/$(TN5250_SOURCE):
$(WGET) -P $(DL_DIR) $(TN5250_SITE)/$(TN5250_SOURCE)
$(TN5250_DIR)/.dist: $(DL_DIR)/$(TN5250_SOURCE)
gunzip -c $(DL_DIR)/$(TN5250_SOURCE) | tar -C $(BUILD_DIR) -xvf -
-touch $(TN5250_DIR)/.dist
$(TN5250_DIR)/.configured: $(TN5250_DIR)/.dist
(cd $(TN5250_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--with-slang --without-x --without-ssl \
);
touch $(TN5250_DIR)/.configured
$(TN5250_DIR)/tn5250: $(TN5250_DIR)/.configured
$(MAKE) CC=$(TARGET_CC) -C $(TN5250_DIR)
$(TARGET_DIR)/usr/bin/tn5250: $(TN5250_DIR)/tn5250
install -c $(TN5250_DIR)/tn5250 $(TARGET_DIR)/usr/bin/tn5250
tn5250: uclibc slang $(TARGET_DIR)/usr/bin/tn5250
tn5250-source: $(DL_DIR)/$(TN5250_SOURCE)
tn5250-clean:
$(MAKE) -C $(TN5250_DIR) clean
tn5250-dirclean:
rm -rf $(TN5250_DIR)

View File

@ -0,0 +1,37 @@
#############################################################
#
# ttcp
#
#############################################################
#
TTCP_SOURCE_URL=http://ftp.sunet.se/ftp/pub/network/monitoring/ttcp
TTCP_SOURCE=ttcp.c
TTCP_BUILD_DIR=$(BUILD_DIR)/ttcp
$(DL_DIR)/$(TTCP_SOURCE):
$(WGET) -P $(DL_DIR) $(TTCP_SOURCE_URL)/$(TTCP_SOURCE)
$(TTCP_BUILD_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE)
-mkdir $(TTCP_BUILD_DIR)
cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_BUILD_DIR)
touch $(TTCP_BUILD_DIR)/.unpacked
$(TTCP_BUILD_DIR)/.configured: $(TTCP_BUILD_DIR)/.unpacked
touch $(TTCP_BUILD_DIR)/.configured
$(TTCP_BUILD_DIR)/ttcp: $(TTCP_BUILD_DIR)/.configured
$(TARGET_CC) -O2 -o $(TTCP_BUILD_DIR)/ttcp $(TTCP_BUILD_DIR)/$(TTCP_SOURCE)
$(TARGET_DIR)/usr/bin/ttcp: $(TTCP_BUILD_DIR)/ttcp
cp -af $(TTCP_BUILD_DIR)/ttcp $(TARGET_DIR)/usr/bin/
ttcp: $(TARGET_DIR)/usr/bin/ttcp
ttcp-source: $(DL_DIR)/$(TTCP_SOURCE)
ttcp-clean:
rm -f $(TTCP_BUILD_DIR)/*.o $(TTCP_BUILD_DIR)/ttcp
ttcp-dirclean:
rm -rf $(TTCP_BUILD_DIR)

View File

@ -0,0 +1,184 @@
#############################################################
#
# uClibc (the C library)
#
#############################################################
ifneq ($(strip $(USE_UCLIBC_SNAPSHOT)),)
# Be aware that this changes daily....
UCLIBC_DIR:=$(BUILD_DIR)/uClibc
UCLIBC_SOURCE:=uClibc-$(strip $(USE_UCLIBC_SNAPSHOT)).tar.bz2
UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots
else
UCLIBC_DIR:=$(BUILD_DIR)/uClibc-0.9.26
UCLIBC_SOURCE:=uClibc-0.9.26.tar.bz2
UCLIBC_SITE:=http://www.uclibc.org/downloads
endif
UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
-e 's/i.86/i386/' \
-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/sh64/sh/' \
-e 's/sh[234]/sh/' \
-e 's/mips.*/mips/' \
-e 's/mipsel.*/mips/' \
-e 's/cris.*/cris/' \
)
$(DL_DIR)/$(UCLIBC_SOURCE):
$(WGET) -P $(DL_DIR) $(UCLIBC_SITE)/$(UCLIBC_SOURCE)
$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
ifeq ($(SOFT_FLOAT),true)
# Make sure we have a soft float specs file for this arch
if [ ! -f $(SOURCE_DIR)/specs-$(ARCH)-soft-float ] ; then \
echo soft float configured but no specs file for this arch ; \
/bin/false ; \
fi;
endif
bzcat $(DL_DIR)/$(UCLIBC_SOURCE) | tar -C $(BUILD_DIR) -xvf -
#(cd $(BUILD_DIR) ; ln -s $(DL_DIR)/uClibc)
#-mkdir $(UCLIBC_DIR)
#(cd $(DL_DIR)/uClibc && tar cf - .) | (cd $(UCLIBC_DIR) && tar xvfp - )
ifeq ($(strip $(USE_UCLIBC_LDSO_0_9_24)),true)
$(SOURCE_DIR)/patch-kernel.sh $(UCLIBC_DIR) $(SOURCE_DIR) uClibc-ldso-0.9.24.patch
endif
touch $(UCLIBC_DIR)/.unpacked
$(UCLIBC_DIR)/.configured: $(UCLIBC_DIR)/.unpacked $(LINUX_DIR)/.configured
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(UCLIBC_DIR)/Rules.mak
ifeq ($(ENABLE_LOCALE),true)
cp $(SOURCE_DIR)/uClibc.config-locale $(UCLIBC_DIR)/.config
else
cp $(SOURCE_DIR)/uClibc.config $(UCLIBC_DIR)/.config
endif
$(SED) 's,^.*TARGET_$(UCLIBC_TARGET_ARCH).*,TARGET_$(UCLIBC_TARGET_ARCH)=y,g' \
$(UCLIBC_DIR)/.config
$(SED) 's,^TARGET_ARCH.*,TARGET_ARCH=\"$(UCLIBC_TARGET_ARCH)\",g' $(UCLIBC_DIR)/.config
$(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_DIR)\",g' \
$(UCLIBC_DIR)/.config
$(SED) 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \
$(UCLIBC_DIR)/.config
$(SED) 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \
$(UCLIBC_DIR)/.config
$(SED) 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \
$(UCLIBC_DIR)/.config
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
$(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.config
else
$(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(UCLIBC_DIR)/.config
endif
$(SED) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(UCLIBC_DIR)/.config
ifeq ($(strip $(SOFT_FLOAT)),true)
$(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(UCLIBC_DIR)/.config
endif
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/include
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/usr/lib
mkdir -p $(TOOL_BUILD_DIR)/uClibc_dev/lib
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
HOSTCC="$(HOSTCC)" \
pregen install_dev;
touch $(UCLIBC_DIR)/.configured
$(UCLIBC_DIR)/lib/libc.a: $(UCLIBC_DIR)/.configured $(LIBFLOAT_TARGET)
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX= \
DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
RUNTIME_PREFIX=/ \
HOSTCC="$(HOSTCC)" \
all
ifeq ($(strip $(USE_UCLIBC_LDSO_0_9_24)),true)
#rm -rf $(UCLIBC_DIR)/ld-uClibc* $(UCLIBC_DIR)/libdl*
$(MAKE) -C $(UCLIBC_DIR)/ldso-0.9.24 \
PREFIX= \
DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
RUNTIME_PREFIX=/ \
HOSTCC="$(HOSTCC)" \
all shared
endif
$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a: $(UCLIBC_DIR)/lib/libc.a
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(STAGING_DIR)/ \
DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
RUNTIME_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
install_runtime
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(STAGING_DIR)/ \
DEVEL_PREFIX=$(REAL_GNU_TARGET_NAME)/ \
RUNTIME_PREFIX=$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/ \
install_dev
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(STAGING_DIR) \
HOSTCC="$(HOSTCC)" \
utils install_utils
# Clean up the host compiled utils...
$(MAKE) -C $(UCLIBC_DIR)/utils clean
ifneq ($(TARGET_DIR),)
$(TARGET_DIR)/lib/libc.so.0: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(TARGET_DIR) \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=/ \
install_runtime
$(TARGET_DIR)/usr/bin/ldd: $(TARGET_DIR)/lib/libc.so.0
$(MAKE) -C $(UCLIBC_DIR) $(TARGET_CONFIGURE_OPTS) \
PREFIX=$(TARGET_DIR) utils install_utils
UCLIBC_TARGETS=$(TARGET_DIR)/lib/libc.so.0 $(TARGET_DIR)/usr/bin/ldd
endif
uclibc-configured: $(UCLIBC_DIR)/.configured
uclibc: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a \
$(UCLIBC_TARGETS)
uclibc-source: $(DL_DIR)/$(UCLIBC_SOURCE)
uclibc-configured-source: uclibc-source
uclibc-clean:
-$(MAKE) -C $(UCLIBC_DIR) clean
rm -f $(UCLIBC_DIR)/.config
uclibc-dirclean:
rm -rf $(UCLIBC_DIR)
#############################################################
#
# uClibc for the target just needs its header files
# and whatnot installed.
#
#############################################################
$(TARGET_DIR)/usr/lib/libc.a: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib/libc.a
$(MAKE) -C $(UCLIBC_DIR) \
PREFIX=$(TARGET_DIR) \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=/ \
install_dev
ifeq ($(GCC_2_95_TOOLCHAIN),true)
uclibc_target: gcc2_95 uclibc $(TARGET_DIR)/usr/lib/libc.a
else
uclibc_target: gcc3_3 uclibc $(TARGET_DIR)/usr/lib/libc.a
endif
uclibc_target-clean:
rm -f $(TARGET_DIR)/include
uclibc_target-dirclean:
rm -f $(TARGET_DIR)/include

View File

@ -0,0 +1,64 @@
#############################################################
#
# uchdp DHCP client and/or server
#
#############################################################
# Copyright (C) 2001-2003 by Erik Andersen <andersen@codepoet.org>
# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
#
# 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.
#
# 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.
#
# 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
UDHCP_SOURCE:=udhcp-0.9.8.tar.gz
UDHCP_SITE:=http://udhcp.busybox.net/downloads/
UDHCP_DIR:=$(BUILD_DIR)/udhcp-0.9.8
$(DL_DIR)/$(UDHCP_SOURCE):
$(WGET) -P $(DL_DIR) $(UDHCP_SITE)/$(UDHCP_SOURCE)
udhcp-source: $(DL_DIR)/$(UDHCP_SOURCE)
$(UDHCP_DIR)/.unpacked: $(DL_DIR)/$(UDHCP_SOURCE)
zcat $(DL_DIR)/$(UDHCP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(UDHCP_DIR)/.unpacked
#$(UDHCP_DIR)/.unpacked:
# (cd $(BUILD_DIR); \
# CVS_PASSFILE=$(CVS_PASSFILE) \
# cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co udhcp )
# touch $(UDHCP_DIR)/.unpacked
$(UDHCP_DIR)/udhcpc: $(UDHCP_DIR)/.unpacked
$(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(UDHCP_DIR)
$(TARGET_DIR)/sbin/udhcpc: $(UDHCP_DIR)/udhcpc
$(SED) 's/pump/udhcpc/' $(TARGET_DIR)/etc/pcmcia/network*
$(SED) 's/PUMP/UDHCPC/' $(TARGET_DIR)/etc/pcmcia/network*
$(SED) 's/DHCP="n"/DHCP="y"/' $(TARGET_DIR)/etc/pcmcia/network*
mkdir -p $(TARGET_DIR)/sbin
rm -f $(TARGET_DIR)/sbin/udhcpc
cp $(UDHCP_DIR)/udhcpc $(TARGET_DIR)/sbin/
mkdir -p $(TARGET_DIR)/usr/share/udhcpc
cp $(UDHCP_DIR)/samples/simple.script $(TARGET_DIR)/usr/share/udhcpc/default.script
chmod a+x $(TARGET_DIR)/sbin/udhcpc $(TARGET_DIR)/usr/share/udhcpc/default.script
udhcp: uclibc $(TARGET_DIR)/sbin/udhcpc
udhcp-clean:
rm -f $(TARGET_DIR)/sbin/udhcpc
-$(MAKE) -C $(UDHCP_DIR) clean
udhcp-dirclean:
rm -rf $(UDHCP_DIR)

View File

@ -0,0 +1,69 @@
#############################################################
#
# util-linux
#
#############################################################
UTIL-LINUX_SOURCE:=util-linux_2.12.orig.tar.gz
UTIL-LINUX_SITE:=http://ftp.debian.org/debian/pool/main/u/util-linux/
UTIL-LINUX_PATCH:=util-linux_2.12-6.diff.gz
UTIL-LINUX_CAT:=zcat
UTIL-LINUX_DIR:=$(BUILD_DIR)/util-linux-2.12
UTIL-LINUX_BINARY:=$(UTIL-LINUX_DIR)/misc-utils/mcookie
UTIL-LINUX_TARGET_BINARY:=$(TARGET_DIR)/usr/bin/mcookie
$(DL_DIR)/$(UTIL-LINUX_SOURCE):
$(WGET) -P $(DL_DIR) $(UTIL-LINUX_SITE)/$(UTIL-LINUX_SOURCE)
$(DL_DIR)/$(UTIL-LINUX_PATCH):
$(WGET) -P $(DL_DIR) $(UTIL-LINUX_SITE)/$(UTIL-LINUX_PATCH)
$(UTIL-LINUX_DIR)/.unpacked: $(DL_DIR)/$(UTIL-LINUX_SOURCE) $(DL_DIR)/$(UTIL-LINUX_PATCH)
$(UTIL-LINUX_CAT) $(DL_DIR)/$(UTIL-LINUX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
$(UTIL-LINUX_CAT) $(DL_DIR)/$(UTIL-LINUX_PATCH) | patch -p1 -d $(UTIL-LINUX_DIR)
cat $(SOURCE_DIR)/util-linux.patch | patch -p1 -d $(UTIL-LINUX_DIR)
touch $(UTIL-LINUX_DIR)/.unpacked
$(UTIL-LINUX_DIR)/.configured: $(UTIL-LINUX_DIR)/.unpacked
(cd $(UTIL-LINUX_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
ARCH=$(ARCH) \
);
$(SED) "s,^INSTALLSUID=.*,INSTALLSUID=\\$$\(INSTALL\) -m \\$$\(BINMODE\)," \
$(UTIL-LINUX_DIR)/MCONFIG
$(SED) "s,^USE_TTY_GROUP=.*,USE_TTY_GROUP=no," $(UTIL-LINUX_DIR)/MCONFIG
touch $(UTIL-LINUX_DIR)/.configured
$(UTIL-LINUX_BINARY): $(UTIL-LINUX_DIR)/.configured
$(MAKE) ARCH=$(ARCH) CC=$(TARGET_CC) -C $(UTIL-LINUX_DIR)
$(UTIL-LINUX_TARGET_BINARY): $(UTIL-LINUX_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) USE_TTY_GROUP=no -C $(UTIL-LINUX_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
util-linux: uclibc $(UTIL-LINUX_TARGET_BINARY)
util-linux-source: $(DL_DIR)/$(UTIL-LINUX_SOURCE)
util-linux-clean:
#There is no working 'uninstall' target. Just skip it...
#$(MAKE) DESTDIR=$(TARGET_DIR) -C $(UTIL-LINUX_DIR) uninstall
-$(MAKE) -C $(UTIL-LINUX_DIR) clean
util-linux-dirclean:
rm -rf $(UTIL-LINUX_DIR)

View File

@ -0,0 +1,88 @@
#############################################################
#
# valgrind
#
#############################################################
VALGRIND_SITE:=http://developer.kde.org/~sewardj/
VALGRIND_DIR:=$(BUILD_DIR)/valgrind-2.1.1
VALGRIND_SOURCE:=valgrind-2.1.1.tar.bz2
VALGRIND_PATCH:=$(SOURCE_DIR)/valgrind.patch
$(DL_DIR)/$(VALGRIND_SOURCE):
$(WGET) -P $(DL_DIR) $(VALGRIND_SITE)/$(VALGRIND_SOURCE)
$(VALGRIND_DIR)/.unpacked: $(DL_DIR)/$(VALGRIND_SOURCE)
bzcat $(DL_DIR)/$(VALGRIND_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(VALGRIND_DIR)/.unpacked
$(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked
cat $(VALGRIND_PATCH) | patch -d $(VALGRIND_DIR) -p1
touch $(VALGRIND_DIR)/.patched
$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
(cd $(VALGRIND_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
$(DISABLE_NLS) \
--without-uiout --disable-valgrindmi \
--disable-tui --disable-valgrindtk \
--without-x --without-included-gettext \
);
touch $(VALGRIND_DIR)/.configured
$(VALGRIND_DIR)/coregrind/valgrind.so: $(VALGRIND_DIR)/.configured
$(MAKE) -C $(VALGRIND_DIR)
-$(STRIP) --strip-unneeded $(VALGRIND_DIR)/*.so*
touch -c $(VALGRIND_DIR)/coregrind/valgrind.so
$(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/coregrind/valgrind.so
$(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
sbindir=$(TARGET_DIR)/usr/sbin \
libexecdir=$(TARGET_DIR)/usr/lib \
datadir=$(TARGET_DIR)/usr/share \
sysconfdir=$(TARGET_DIR)/etc \
sharedstatedir=$(TARGET_DIR)/usr/com \
localstatedir=$(TARGET_DIR)/var \
libdir=$(TARGET_DIR)/usr/lib \
infodir=$(TARGET_DIR)/usr/info \
mandir=$(TARGET_DIR)/usr/man \
includedir=$(TARGET_DIR)/usr/include \
-C $(VALGRIND_DIR) install;
rm -rf $(TARGET_DIR)/usr/share/doc/valgrind
#mkdir -p $(TARGET_DIR)/etc/default
#cp $(VALGRIND_DIR)/valgrind.default $(TARGET_DIR)/etc/default/valgrind
#mkdir -p $(TARGET_DIR)/usr/lib/valgrind
#cp $(VALGRIND_DIR)/woody.supp $(TARGET_DIR)/usr/lib/valgrind/
touch -c $(TARGET_DIR)/usr/bin/valgrind
ifeq ($(ARCH),i386)
valgrind: $(TARGET_DIR)/usr/bin/valgrind
else
valgrind:
endif
valgrind-source: $(DL_DIR)/$(VALGRIND_SOURCE)
valgrind-clean:
$(MAKE) -C $(VALGRIND_DIR) clean
valgrind-dirclean:
rm -rf $(VALGRIND_DIR)

View File

@ -0,0 +1,66 @@
#############################################################
#
# vtun
#
# NOTE: Uses start-stop-daemon in init script, so be sure
# to enable that within busybox
#
#############################################################
VTUN_SOURCE:=vtun-2.6.tar.gz
VTUN_SITE:=http://aleron.dl.sourceforge.net/sourceforge/vtun/
VTUN_DIR:=$(BUILD_DIR)/vtun-2.6
VTUN_CAT:=zcat
VTUN_BINARY:=vtund
VTUN_TARGET_BINARY:=usr/sbin/vtund
VTUN_PATCH:=$(SOURCE_DIR)/vtun.patch
$(DL_DIR)/$(VTUN_SOURCE):
$(WGET) -P $(DL_DIR) $(VTUN_SITE)/$(VTUN_SOURCE)
vtun-source: $(DL_DIR)/$(VTUN_SOURCE)
$(VTUN_DIR)/.unpacked: $(DL_DIR)/$(VTUN_SOURCE)
$(VTUN_CAT) $(DL_DIR)/$(VTUN_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv $(BUILD_DIR)/vtun $(VTUN_DIR)
cat $(VTUN_PATCH) | patch -p1 -d $(VTUN_DIR)
touch $(VTUN_DIR)/.unpacked
$(VTUN_DIR)/.configured: $(VTUN_DIR)/.unpacked zlib lzo openssl
(cd $(VTUN_DIR); rm -rf config.cache; \
$(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--with-ssl-headers=$(STAGING_DIR)/include/openssl \
--with-lzo-headers=$(STAGING_DIR)/include \
);
touch $(VTUN_DIR)/.configured
$(VTUN_DIR)/$(VTUN_BINARY): $(VTUN_DIR)/.configured
$(MAKE) -C $(VTUN_DIR)
$(TARGET_DIR)/$(VTUN_TARGET_BINARY): $(VTUN_DIR)/$(VTUN_BINARY)
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(VTUN_DIR) install
rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
$(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
vtun: uclibc $(TARGET_DIR)/$(VTUN_TARGET_BINARY)
vtun-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(VTUN_DIR) uninstall
-$(MAKE) -C $(VTUN_DIR) clean
vtun-dirclean:
rm -rf $(VTUN_DIR)

View File

@ -0,0 +1,50 @@
#############################################################
#
# wtools - Wireless Tools
#
#############################################################
#
WTOOLS_SOURCE_URL=http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux
WTOOLS_SOURCE=wireless_tools.26.tar.gz
WTOOLS_BUILD_DIR=$(BUILD_DIR)/wireless_tools.26
$(DL_DIR)/$(WTOOLS_SOURCE):
$(WGET) -P $(DL_DIR) $(WTOOLS_SOURCE_URL)/$(WTOOLS_SOURCE)
$(WTOOLS_BUILD_DIR)/.unpacked: $(DL_DIR)/$(WTOOLS_SOURCE)
zcat $(DL_DIR)/$(WTOOLS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(WTOOLS_BUILD_DIR)/.unpacked
$(WTOOLS_BUILD_DIR)/.configured: $(WTOOLS_BUILD_DIR)/.unpacked
touch $(WTOOLS_BUILD_DIR)/.configured
$(WTOOLS_BUILD_DIR)/iwconfig: $(WTOOLS_BUILD_DIR)/.configured
$(MAKE) -C $(WTOOLS_BUILD_DIR) \
CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \
BUILD_SHARED=y # may want to make this an option
$(TARGET_DIR)/sbin/iwconfig: $(WTOOLS_BUILD_DIR)/iwconfig
# Copy The Wireless Tools
cp -af $(WTOOLS_BUILD_DIR)/iwconfig $(TARGET_DIR)/sbin/
cp -af $(WTOOLS_BUILD_DIR)/iwevent $(TARGET_DIR)/sbin/
cp -af $(WTOOLS_BUILD_DIR)/iwgetid $(TARGET_DIR)/sbin/
cp -af $(WTOOLS_BUILD_DIR)/iwlist $(TARGET_DIR)/sbin/
cp -af $(WTOOLS_BUILD_DIR)/iwpriv $(TARGET_DIR)/sbin/
cp -af $(WTOOLS_BUILD_DIR)/iwspy $(TARGET_DIR)/sbin/
cp -af $(WTOOLS_BUILD_DIR)/libiw.so.26 $(TARGET_DIR)/lib
$(STRIP) $(TARGET_DIR)/sbin/iwconfig $(TARGET_DIR)/sbin/iwevent \
$(TARGET_DIR)/sbin/iwgetid $(TARGET_DIR)/sbin/iwlist \
$(TARGET_DIR)/sbin/iwpriv $(TARGET_DIR)/sbin/iwspy \
$(TARGET_DIR)/lib/libiw.so.26
wtools: $(TARGET_DIR)/sbin/iwconfig
wtools-source: $(DL_DIR)/$(WTOOLS_SOURCE)
wtools-clean:
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(WTOOLS_BUILD_DIR) uninstall
-$(MAKE) -C $(WTOOLS_BUILD_DIR) clean
wtools-dirclean:
rm -rf $(WTOOLS_BUILD_DIR)

View File

@ -0,0 +1,72 @@
#############################################################
#
# zlib
#
#############################################################
ZLIB_SOURCE=zlib-1.1.4.tar.bz2
ZLIB_SITE=http://aleron.dl.sourceforge.net/sourceforge/libpng
ZLIB_DIR=$(BUILD_DIR)/zlib-1.1.4
ZLIB_CFLAGS= $(TARGET_CFLAGS) -fPIC
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
ZLIB_CFLAGS+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
endif
$(DL_DIR)/$(ZLIB_SOURCE):
$(WGET) -P $(DL_DIR) $(ZLIB_SITE)/$(ZLIB_SOURCE)
$(ZLIB_DIR)/.source: $(DL_DIR)/$(ZLIB_SOURCE)
bzcat $(DL_DIR)/$(ZLIB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
touch $(ZLIB_DIR)/.source
$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.source
(cd $(ZLIB_DIR); \
./configure \
--shared \
--prefix=/usr \
--exec-prefix=$(STAGING_DIR)/usr/bin \
--libdir=$(STAGING_DIR)/lib \
--includedir=$(STAGING_DIR)/include \
);
touch $(ZLIB_DIR)/.configured;
$(ZLIB_DIR)/libz.so.1.1.4: $(ZLIB_DIR)/.configured
$(MAKE) LDSHARED="$(TARGET_CROSS)ld -shared -soname,libz.so.1" \
CFLAGS="$(ZLIB_CFLAGS)" CC=$(TARGET_CC) -C $(ZLIB_DIR) all libz.a;
touch -c $(ZLIB_DIR)/libz.so.1.1.4
$(STAGING_DIR)/lib/libz.so.1.1.4: $(ZLIB_DIR)/libz.so.1.1.4
cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/lib;
cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/include;
cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/include;
cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/lib;
(cd $(STAGING_DIR)/lib; ln -fs libz.so.1.1.4 libz.so.1);
chmod a-x $(STAGING_DIR)/lib/libz.so.1.1.4
touch -c $(STAGING_DIR)/lib/libz.so.1.1.4
$(TARGET_DIR)/lib/libz.so.1.1.4: $(STAGING_DIR)/lib/libz.so.1.1.4
cp -dpf $(STAGING_DIR)/lib/libz.so* $(TARGET_DIR)/lib;
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libz.so*
touch -c $(TARGET_DIR)/lib/libz.so.1.1.4
$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/lib/libz.so.1.1.4
mkdir -p $(TARGET_DIR)/usr/include
cp -dpf $(STAGING_DIR)/include/zlib.h $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/include/zconf.h $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/lib/libz.a $(TARGET_DIR)/usr/lib/
rm -f $(TARGET_DIR)/lib/libz.so
(cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libz.so.1.1.4 libz.so)
touch -c $(TARGET_DIR)/usr/lib/libz.a
zlib-headers: $(TARGET_DIR)/usr/lib/libz.a
zlib: uclibc $(TARGET_DIR)/lib/libz.so.1.1.4
zlib-source: $(DL_DIR)/$(ZLIB_SOURCE)
zlib-clean:
rm -f $(TARGET_DIR)/lib/libz.so*
-$(MAKE) -C $(ZLIB_DIR) clean
zlib-dirclean:
rm -rf $(ZLIB_DIR)

View File

@ -0,0 +1 @@
dl

View File

@ -0,0 +1,407 @@
diff -urN STLport-4.5.3/Makefile STLport-4.5.3-devel/Makefile
--- STLport-4.5.3/Makefile Wed Dec 31 17:00:00 1969
+++ STLport-4.5.3-devel/Makefile Tue Jan 7 15:28:08 2003
@@ -0,0 +1,44 @@
+# Makefile to compile stlport with uClibc
+#
+# Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU 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
+
+ARCH:=i386
+PREFIX:=/usr/$(ARCH)-linux-uclibc
+CROSS:= $(PREFIX)/../bin/$(ARCH)-linux-uclibc-
+CC=$(CROSS)gcc
+CXX=$(CROSS)g++
+AR = $(CROSS)ar
+STRIP = $(CROSS)strip --remove-section=.comment --remove-section=.note --strip-unneeded
+.EXPORT_ALL_VARIABLES:
+
+all:
+ rm -f lib/lib*
+ make -C src -f gcc-uClibc.mak all
+ (cd lib; rm -f libstdc++_debug.so; \
+ ln -fs libstdc++.so.4.5 libstdc++.so; \
+ ln -fs libstdc++.so.4.5 libstdc++.so.0;)
+ $(STRIP) lib/libstdc++.so.4.5;
+
+clean:
+ make -C src -f gcc-uClibc.mak clean
+ rm -rf lib/*
+
+install:
+ (cd lib; \
+ cp -a libstdc++.a $(PREFIX)/lib; \
+ cp -a libstdc++.so libstdc++.so.0 libstdc++.so.4.5 $(PREFIX)/lib;)
+ cp -a stlport $(PREFIX)/include/c++
diff -urN STLport-4.5.3/src/dll_main.cpp STLport-4.5.3-devel/src/dll_main.cpp
--- STLport-4.5.3/src/dll_main.cpp Sat Feb 2 16:11:56 2002
+++ STLport-4.5.3-devel/src/dll_main.cpp Tue Jan 7 15:28:08 2003
@@ -52,7 +52,7 @@
# include <locale>
# endif
-# if defined (_STLP_UNIX)
+# if defined (_STLP_UNIX) && defined (_STLP_PTHREADS) && ! defined (_STLP_USE_UCLIBC)
# define _STLP_HAS_PERTHREAD_ALLOCATOR
# include <stl/_pthread_alloc.h>
# endif
diff -urN STLport-4.5.3/src/gcc-uClibc.mak STLport-4.5.3-devel/src/gcc-uClibc.mak
--- STLport-4.5.3/src/gcc-uClibc.mak Wed Dec 31 17:00:00 1969
+++ STLport-4.5.3-devel/src/gcc-uClibc.mak Tue Jan 7 15:28:08 2003
@@ -0,0 +1,61 @@
+#
+# Basename for libraries
+#
+LIB_BASENAME:=libstdc++
+LIB_SHAREDNAME:=$(LIB_BASENAME).so
+LIB_SHAREDNAME_FULL:=$(LIB_SHAREDNAME).0
+
+#
+# guts for common stuff
+#
+#
+LINK:=$(AR) -cr
+#DYN_LINK:=$(CC) -fno-exceptions -lpthread -lm -shared -Wl,-soname=$(LIB_SHAREDNAME_FULL) -o
+DYN_LINK:=$(CC) -fno-exceptions -shared -Wl,-soname=$(LIB_SHAREDNAME_FULL) -o
+
+OBJEXT=o
+DYNEXT=so
+STEXT=a
+RM=rm -rf
+PATH_SEP=/
+MKDIR=mkdir -p
+COMP=GCC$(ARCH)
+INSTALL_STEP = install_unix
+
+all: release_dynamic release_static
+#all: all_dynamic all_static symbolic_links
+
+include common_macros.mak
+STLDEBUG_NAME:=$(LIB_BASENAME).debug
+
+# Lets disable exception support, since this saves over 200k...
+DEFINE_FLAGS:= -fno-exceptions
+#DEFINE_FLAGS:= -D_STLP_NO_EXCEPTIONS -fno-exceptions -DSTL_NO_EXCEPTIONS
+
+#DEFINE_FLAGS+= -D_STLP_USE_UCLIBC -D_STLP_NO_WCHAR_T \
+# -DUSE_SPRINTF_INSTEAD -D_ISOC99_SOURCE
+
+WARNING_FLAGS:= -W -Wno-sign-compare -Wno-unused -Wno-uninitialized
+INCLUDE_FLAGS = -I${STLPORT_DIR}
+CXXFLAGS_COMMON = $(WARNING_FLAGS) $(DEFINE_FLAGS) $(INCLUDE_FLAGS)
+
+CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -Os
+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -Os -fPIC
+
+CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -O -g
+CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -O -g -fPIC
+
+CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
+CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG -fPIC
+
+include common_percent_rules.mak
+include common_rules.mak
+
+
+#install: all
+# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib
+
+#%.s: %.cpp
+# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@
+
+
diff -urN STLport-4.5.3/src/num_put_float.cpp STLport-4.5.3-devel/src/num_put_float.cpp
--- STLport-4.5.3/src/num_put_float.cpp Fri Jan 18 15:06:52 2002
+++ STLport-4.5.3-devel/src/num_put_float.cpp Tue Jan 7 15:28:08 2003
@@ -65,6 +65,12 @@
# endif
+# if defined(_STLP_USE_UCLIBC)
+# define __USE_ISOC99 1
+# include <math.h>
+# include <float.h>
+# endif
+
# include <cstdlib>
#if defined (_MSC_VER) || defined (__MINGW32__) || defined (__BORLANDC__) || defined (__DJGPP) || defined (_STLP_SCO_OPENSERVER) || defined (__NCR_SVR)
@@ -209,7 +215,7 @@
#ifdef USE_SPRINTF_INSTEAD
-#elif defined (__hpux) || defined (__DJGPP) || ( defined(_STLP_USE_GLIBC) && ! defined (__MSL__) )
+#elif defined (__hpux) || defined (__DJGPP) || ( defined(_STLP_USE_GLIBC) && ! defined (__MSL__) ) || defined (_STLP_USE_UCLIBC)
# if defined (isfinite)
inline bool _Stl_is_nan_or_inf(double x) { return !isfinite(x); }
# else
@@ -238,7 +244,7 @@
}
inline bool _Stl_is_neg_inf(double x) { return _fpclass(x) == _FPCLASS_NINF; }
inline bool _Stl_is_neg_nan(double x) { return _isnan(x) && _copysign(1., x) < 0 ; }
-#elif defined(__MRC__) || defined(__SC__) //*TY 02/24/2000 - added support for MPW
+#elif defined(__MRC__) || defined(__SC__)
bool _Stl_is_nan_or_inf(double x) { return isnan(x) || !isfinite(x); }
bool _Stl_is_inf(double x) { return !isfinite(x); }
bool _Stl_is_neg_inf(double x) { return !isfinite(x) && signbit(x); }
@@ -280,7 +286,7 @@
inline char* _Stl_qfcvtR(long double x, int n, int* pt, int* sign, char* buf)
{ return fcvtbuf(x, n, pt, sign, buf); }
# endif
-#elif defined (_STLP_USE_GLIBC)
+#elif defined (_STLP_USE_GLIBC) || defined(_STLP_USE_UCLIBC)
inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf)
{ return buf + ecvt_r(x, n, pt, sign, buf, NDIG+2); }
inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf)
diff -urN STLport-4.5.3/src/stdio_streambuf.cpp STLport-4.5.3-devel/src/stdio_streambuf.cpp
--- STLport-4.5.3/src/stdio_streambuf.cpp Thu Jan 10 11:41:52 2002
+++ STLport-4.5.3-devel/src/stdio_streambuf.cpp Tue Jan 7 15:28:08 2003
@@ -82,7 +82,7 @@
_STLP_VENDOR_CSTD::fgetpos(_M_file, &pos);
// added 21 june 00 mdb,rjf,wjs: glibc 2.2 changed fpos_t to be a struct instead
// of a primitive type
-#if (defined(__GLIBC__) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) )
+#if defined(_STLP_USE_UCLIBC) || (defined(__GLIBC__) && defined(_STLP_USE_GLIBC) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) )
return pos_type((streamoff)pos.__pos);
#elif defined(__ISCPP__) || defined(__MVS__) || (__OS400__)
return pos_type(pos.__fpos_elem[ 0 ]);
@@ -101,13 +101,16 @@
// added 21 june 00 mdb,rjf,wjs: glibc 2.2 changed fpos_t to be a struct instead
// of a primitive type
-#if (defined(__GLIBC__) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) )
+#if (defined(__GLIBC__) && defined(_STLP_USE_GLIBC) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) )
fpos_t p;
p.__pos = pos;
memset( &(p.__state), 0, sizeof(p.__state) );
#elif defined(__MVS__) || (__OS400__)
fpos_t p;
p.__fpos_elem[0] = pos;
+#elif defined(_STLP_USE_UCLIBC)
+ fpos_t p;
+ p.__pos = pos;
#else
fpos_t p(pos);
#endif
diff -urN STLport-4.5.3/stlport/config/_prolog.h STLport-4.5.3-devel/stlport/config/_prolog.h
--- STLport-4.5.3/stlport/config/_prolog.h Sun Oct 28 13:26:44 2001
+++ STLport-4.5.3-devel/stlport/config/_prolog.h Tue Jan 7 15:28:08 2003
@@ -1,3 +1,8 @@
+/* Evil hack to make sure everything behaves itself */
+#define _STLP_USE_UCLIBC
+//#define _STLP_NO_WCHAR_T
+//#define _ISOC99_SOURCE
+//#define USE_SPRINTF_INSTEAD
#if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)
diff -urN STLport-4.5.3/stlport/config/stl_gcc.h STLport-4.5.3-devel/stlport/config/stl_gcc.h
--- STLport-4.5.3/stlport/config/stl_gcc.h Thu Jan 10 11:41:58 2002
+++ STLport-4.5.3-devel/stlport/config/stl_gcc.h Tue Jan 7 15:28:08 2003
@@ -3,7 +3,7 @@
*/
/* Systems having GLIBC installed have different traits */
-#if ! defined (_STLP_USE_GLIBC) && ( defined (__linux__) || defined (__CYGWIN__) )
+#if ! defined (_STLP_USE_GLIBC) && ! defined (_STLP_USE_UCLIBC) && ( defined (__linux__) || defined (__CYGWIN__) )
# define _STLP_USE_GLIBC
#endif
diff -urN STLport-4.5.3/stlport/cstdlib STLport-4.5.3-devel/stlport/cstdlib
--- STLport-4.5.3/stlport/cstdlib Thu Aug 23 15:51:54 2001
+++ STLport-4.5.3-devel/stlport/cstdlib Tue Jan 7 15:28:08 2003
@@ -55,9 +55,11 @@
using _STLP_VENDOR_CSTD::atof;
using _STLP_VENDOR_CSTD::atoi;
using _STLP_VENDOR_CSTD::atol;
+# ifndef _STLP_USE_UCLIBC
using _STLP_VENDOR_CSTD::mblen;
using _STLP_VENDOR_CSTD::mbstowcs;
using _STLP_VENDOR_CSTD::mbtowc;
+# endif
using _STLP_VENDOR_CSTD::strtod;
using _STLP_VENDOR_CSTD::strtol;
using _STLP_VENDOR_CSTD::strtoul;
diff -urN STLport-4.5.3/stlport/stl/_config.h STLport-4.5.3-devel/stlport/stl/_config.h
--- STLport-4.5.3/stlport/stl/_config.h Fri Jan 18 15:08:36 2002
+++ STLport-4.5.3-devel/stlport/stl/_config.h Tue Jan 7 15:28:08 2003
@@ -26,6 +26,16 @@
#ifndef _STLP_CONFIG_H
# define _STLP_CONFIG_H
+/* Make the STLport headers provide uClibc support by default */
+#define _STLP_NO_EXCEPTIONS 1
+#define STL_NO_EXCEPTIONS 1
+#define _STLP_USE_UCLIBC 1
+//#define _STLP_NO_WCHAR_T 1
+#define _STLP_NO_LONG_DOUBLE 1
+#define USE_SPRINTF_INSTEAD 1
+#define _ISOC99_SOURCE 1
+#define _STLP_NO_ANACHRONISMS 1
+
/*
* Purpose of this file :
*
@@ -164,7 +174,7 @@
/* Operating system recognition (basic) */
# if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX) || defined (__NetBSD__) || defined (__Lynx__)
# define _STLP_UNIX 1
-# if defined (__linux__) && ! defined (_STLP_USE_GLIBC)
+# if defined (__linux__) && ! defined (_STLP_USE_GLIBC) && ! defined (_STLP_USE_UCLIBC)
# define _STLP_USE_GLIBC 1
# endif
# elif defined(macintosh) || defined (_MAC)
diff -urN STLport-4.5.3/stlport/stl/_stdio_file.h STLport-4.5.3-devel/stlport/stl/_stdio_file.h
--- STLport-4.5.3/stlport/stl/_stdio_file.h Fri Jan 18 15:07:00 2002
+++ STLport-4.5.3-devel/stlport/stl/_stdio_file.h Tue Jan 7 15:28:08 2003
@@ -634,6 +634,112 @@
}
# define _STLP_FILE_I_O_IDENTICAL
+#elif defined(_STLP_USE_UCLIBC)
+
+#if defined(__MASK_READING)
+
+inline int _FILE_fd(const FILE *__f) { return __f->__filedes; }
+
+// Returns a pointer to the beginning of the buffer.
+inline char* _FILE_I_begin(const FILE *__f) { return (char*) __f->__bufstart; }
+
+// Returns the current read/write position within the buffer.
+inline char* _FILE_I_next(const FILE *__f) { return (char*) __f->__bufpos; }
+
+// Returns a pointer immediately past the end of the buffer.
+inline char* _FILE_I_end(const FILE *__f) { return (char*)__f->__bufend; }
+
+// Returns the number of characters remaining in the buffer, i.e.
+// _FILE_[IO]_end(__f) - _FILE_[IO]_next(__f).
+inline ptrdiff_t _FILE_I_avail(const FILE *__f)
+ { return __f->__bufgetc_u - __f->__bufpos; }
+
+// Increments the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_preincr(FILE *__f) { return *(char*)(++__f->__bufpos); }
+
+// Increments the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_postincr(FILE *__f) { return *(char*)(__f->__bufpos++); }
+
+// Decrements the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_predecr(FILE *__f) { return *(char*)(--__f->__bufpos); }
+
+// Decrements the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_postdecr(FILE *__f) { return *(char*)(__f->__bufpos--); }
+
+// Increments the current read/write position by __n.
+inline void _FILE_I_bump(FILE *__f, int __n) { __f->__bufpos += __n; }
+
+// Sets the beginning of the bufer to __begin, the current read/write
+// position to __next, and the buffer's past-the-end pointer to __end.
+// If any of those pointers is null, then all of them must be null.
+inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end)
+{
+ __f->__bufstart = (unsigned char*)__begin;
+ __f->__bufpos = (unsigned char*)__next;
+ __f->__bufend = (unsigned char*)__end;
+ __f->__bufgetc_u = (unsigned char*)__begin;
+ __f->__bufputc_u = (unsigned char*)__end;
+}
+
+# define _STLP_FILE_I_O_IDENTICAL
+
+#else // Support old stdio for a little while.
+
+inline int _FILE_fd(const FILE *__f) { return __f->filedes; }
+
+// Returns a pointer to the beginning of the buffer.
+inline char* _FILE_I_begin(const FILE *__f) { return (char*) __f->bufstart; }
+
+// Returns the current read/write position within the buffer.
+inline char* _FILE_I_next(const FILE *__f) { return (char*) __f->bufpos; }
+
+// Returns a pointer immediately past the end of the buffer.
+inline char* _FILE_I_end(const FILE *__f) { return (char*)__f->bufend; }
+
+// Returns the number of characters remaining in the buffer, i.e.
+// _FILE_[IO]_end(__f) - _FILE_[IO]_next(__f).
+inline ptrdiff_t _FILE_I_avail(const FILE *__f)
+ { return __f->bufgetc - __f->bufpos; }
+
+// Increments the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_preincr(FILE *__f) { return *(char*)(++__f->bufpos); }
+
+// Increments the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_postincr(FILE *__f) { return *(char*)(__f->bufpos++); }
+
+// Decrements the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_predecr(FILE *__f) { return *(char*)(--__f->bufpos); }
+
+// Decrements the current read/write position by 1, returning the
+// character at the old position.
+inline char& _FILE_I_postdecr(FILE *__f) { return *(char*)(__f->bufpos--); }
+
+// Increments the current read/write position by __n.
+inline void _FILE_I_bump(FILE *__f, int __n) { __f->bufpos += __n; }
+
+// Sets the beginning of the bufer to __begin, the current read/write
+// position to __next, and the buffer's past-the-end pointer to __end.
+// If any of those pointers is null, then all of them must be null.
+inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end)
+{
+ __f->bufstart = (unsigned char*)__begin;
+ __f->bufpos = (unsigned char*)__next;
+ __f->bufend = (unsigned char*)__end;
+ __f->bufgetc = (unsigned char*)__begin;
+ __f->bufputc = (unsigned char*)__end;
+}
+
+# define _STLP_FILE_I_O_IDENTICAL
+
+#endif
+
#else /* A C library that we don't have an implementation for. */
# error The C++ I/O library is not configured for this compiler
diff -urN STLport-4.5.3/stlport/stl/c_locale.h STLport-4.5.3-devel/stlport/stl/c_locale.h
--- STLport-4.5.3/stlport/stl/c_locale.h Fri Jan 18 15:07:00 2002
+++ STLport-4.5.3-devel/stlport/stl/c_locale.h Wed Jan 8 10:58:10 2003
@@ -401,6 +401,21 @@
# define _Locale_SPACE _S
# define _Locale_PRINT (_P | _U | _L | _N | _B)
# define _Locale_ALPHA (_U | _L)
+
+# elif defined(_STLP_USE_UCLIBC) /* linux, using the gnu compiler */
+
+# define _Locale_CNTRL _IScntrl
+# define _Locale_UPPER _ISupper
+# define _Locale_LOWER _ISlower
+# define _Locale_DIGIT _ISdigit
+# define _Locale_XDIGIT _ISxdigit
+# define _Locale_PUNCT _ISpunct
+# define _Locale_SPACE _ISspace
+# define _Locale_PRINT _ISprint
+# define _Locale_ALPHA _ISalpha
+
+#else
+# error Unknown Locale
#endif
# endif /* _STLP_C_LOCALE_H */

Some files were not shown because too many files have changed in this diff Show More