-e 's/cris.*/cris/' \
)
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
all: world
Please feed suggestions, bug reports, insults, and bribes back to:
Erik Andersen <andersen@codepoet.org>
-
-
-NOTE:
-
- For './configure' to behave itself with certain applications, you may need
- to create a symlink under "/lib" on your system that points to the uClibc
- shared library loader in the staging directory. For example, on my system
-
- $ cd /lib
- $ sudo ln -s /home/andersen/buildroot/build/staging_dir/lib/ld-uClibc.so.0 ld-uClibc.so.0
-
- If you don't use sudo, run 'su -' to become root when making the link. If
- you aren't root it won't work. The reason for this symlink, is it allows
- './configure' to actually execute the test applications it compiles against
- uClibc during the configuration process....
-
$(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked
(cd $(AUTOCONF_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) EMACS="no" \
+ $(TARGET_CONFIGURE_OPTS) EMACS="no" \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked
(cd $(AUTOMAKE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
(cd $(BASH_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) CC_FOR_BUILD=$(HOSTCC) \
+ $(TARGET_CONFIGURE_OPTS) CC_FOR_BUILD=$(HOSTCC) \
+ 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 \
$(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 \
$(DB_DIR)/.configured: $(DB_DIR)/.dist
(cd $(DB_DIR)/build_unix; rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(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 \
$(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
(cd $(BISON_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(BRIDGE_BUILD_DIR)/.configured: $(BRIDGE_BUILD_DIR)/.unpacked
(cd $(BRIDGE_BUILD_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--with-linux-headers=$(BUILD_DIR)/linux \
);
$(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked
(cd $(COREUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--infodir=/usr/info \
--disable-nls \
);
+ #Fix up the max number of open files per process, which apparently
+ # is not set when cross compiling
+ perl -i -p -e 's,.*UTILS_OPEN_MAX.*,#define UTILS_OPEN_MAX 1019,g' \
+ $(COREUTILS_DIR)/config.h
touch $(COREUTILS_DIR)/.configured
$(COREUTILS_DIR)/$(COREUTILS_BINARY): $(COREUTILS_DIR)/.configured
touch $(DHCP_RELAY_DIR)/.unpacked
$(DHCP_RELAY_DIR)/.configured: $(DHCP_RELAY_DIR)/.unpacked
- (cd $(DHCP_RELAY_DIR); PATH=$(TARGET_PATH) CC=$(TARGET_CC) ./configure );
+ (cd $(DHCP_RELAY_DIR); $(TARGET_CONFIGURE_OPTS) ./configure );
touch $(DHCP_RELAY_DIR)/.configured
$(DHCP_RELAY_DIR)/$(DHCP_RELAY_BINARY): $(DHCP_RELAY_DIR)/.configured
$(DIFFUTILS_DIR)/.configured: $(DIFFUTILS_DIR)/.unpacked
(cd $(DIFFUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(ED_DIR)/.configured: $(ED_DIR)/.unpacked
(cd $(ED_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--disable-nls \
$(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE)
$(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ # Use the system file utility, not the one we just built
+ perl -pi -e "s,\./file,file,g" $(FILE_DIR)/Makefile.in $(FILE_DIR)/Makefile.am
touch $(FILE_DIR)/.unpacked
$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked
(cd $(FILE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE)
$(FINDUTILS_CAT) $(DL_DIR)/$(FINDUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
mv $(FINDUTILS_DIR).orig $(FINDUTILS_DIR)
- (cd $(FINDUTILS_DIR); perl -i -p -e "s,# define mbstate_t int,# define mbstate_t int\n\
- # define wchar_t char,;" $(FINDUTILS_DIR)/lib/quotearg.c)
touch $(FINDUTILS_DIR)/.unpacked
$(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked
(cd $(FINDUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
+ 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 \
$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked
(cd $(FLEX_DIR); autoconf; rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked
(cd $(GAWK_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
+ 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 \
mkdir -p $(TARGET_DIR)/usr/include
mkdir -p $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)/
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
- (cd $(BINUTILS_DIR2); PATH=$(TARGET_PATH) AR=$(TARGET_CROSS)ar \
- RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
+ (cd $(BINUTILS_DIR2); $(TARGET_CONFIGURE_OPTS) \
+ AR_FOR_TARGET=$(TARGET_CROSS)ar \
+ AS_FOR_TARGET=$(TARGET_CROSS)as \
+ LD_FOR_TARGET=$(TARGET_CROSS)ld \
+ NM_FOR_TARGET=$(TARGET_CROSS)nm \
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
touch $(BINUTILS_DIR2)/.configured
$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured
- $(MAKE) AR=$(TARGET_CROSS)ar \
- RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld \
- CC=$(TARGET_CROSS)gcc GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc tooldir=/usr -C $(BINUTILS_DIR2)
+ $(MAKE) tooldir=/usr -C $(BINUTILS_DIR2)
$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump
- CC=$(HOSTCC) GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
- AR_FOR_TARGET=$(TARGET_CROSS)ar RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
- LD_FOR_TARGET=$(TARGET_CROSS)ld NM_FOR_TARGET=$(TARGET_CROSS)nm \
- CC_FOR_TARGET=$(TARGET_CROSS)gcc \
- $(MAKE) \
- tooldor=/usr \
+ $(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
includedir=$(TARGET_DIR)/usr/include \
gxx_include_dir=$(TARGET_DIR)/usr/include/c++ \
toolexecdir=$(TARGET_DIR)/lib/gcc-lib/$(GNU_TARGET_NAME) \
- -C $(BINUTILS_DIR2) install;
+ -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/$(GNU_TARGET_NAME)/bin/*
mkdir -p $(TARGET_DIR)/usr/$(GNU_TARGET_NAME)
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include)
(cd $(TARGET_DIR)/usr/$(GNU_TARGET_NAME); ln -fs ../include sys-include)
- (cd $(GCC_BUILD_DIR3); PATH=$(TARGET_PATH) \
- AS=$(TARGET_CROSS)as \
- LD=$(TARGET_CROSS)ld \
- AR=$(TARGET_CROSS)ar \
- NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
- GCC=$(TARGET_CROSS)gcc \
- CXX=$(TARGET_CROSS)c++ \
- RANLIB=$(TARGET_CROSS)ranlib \
+ (cd $(GCC_BUILD_DIR3); $(TARGET_CONFIGURE_OPTS) \
+ AR_FOR_TARGET=$(TARGET_CROSS)ar \
+ AS_FOR_TARGET=$(TARGET_CROSS)as \
+ LD_FOR_TARGET=$(TARGET_CROSS)ld \
+ NM_FOR_TARGET=$(TARGET_CROSS)nm \
+ CC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ GCC_FOR_TARGET=$(TARGET_CROSS)gcc \
+ CXX_FOR_TARGET=$(TARGET_CROSS)g++ \
+ RANLIB_FOR_TARGET=$(TARGET_CROSS)ranlib \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
touch $(GCC_BUILD_DIR3)/.configured
$(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured
- AS=$(TARGET_CROSS)as \
- LD=$(TARGET_CROSS)ld \
- AR=$(TARGET_CROSS)ar \
- NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
- GCC=$(TARGET_CROSS)gcc \
- CXX=$(TARGET_CROSS)g++ \
- RANLIB=$(TARGET_CROSS)ranlib \
- $(MAKE) -C $(GCC_BUILD_DIR3)
+ $(MAKE) -C $(GCC_BUILD_DIR3)
touch $(GCC_BUILD_DIR3)/.compiled
$(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR3)/.compiled
- $(MAKE) \
- CC=$(TARGET_CROSS)gcc \
- AS=$(TARGET_CROSS)as \
- LD=$(TARGET_CROSS)ld \
- AR=$(TARGET_CROSS)ar \
- NM=$(TARGET_CROSS)nm \
- CC=$(TARGET_CROSS)gcc \
- GCC=$(TARGET_CROSS)gcc \
- CXX=$(TARGET_CROSS)g++ \
- RANLIB=$(TARGET_CROSS)ranlib \
+ $(MAKE) \
prefix=$(TARGET_DIR)/usr \
exec_prefix=$(TARGET_DIR)/usr \
bindir=$(TARGET_DIR)/usr/bin \
$(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked
(cd $(GDB_DIR); rm -rf config.cache; \
- AR=$(TARGET_CROSS)ar \
- AS=$(TARGET_CROSS)as LD=$(TARGET_CROSS)ld \
- RANLIB=$(TARGET_CROSS)ranlib NM=$(TARGET_CROSS)nm \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
$(GDB_WDIR)/.configured: $(GDB_DIR)/.unpacked
mkdir -p $(GDB_WDIR)
(cd $(GDB_WDIR); rm -rf config.cache; \
- AR=$(TARGET_CROSS)ar \
- AS=$(TARGET_CROSS)as LD=$(TARGET_CROSS)ld \
- RANLIB=$(TARGET_CROSS)ranlib NM=$(TARGET_CROSS)nm \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
$(GDB_DIR)/gdb/gdbserver/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(GNUGREP_DIR)/.configured: $(GNUGREP_DIR)/.unpacked
(cd $(GNUGREP_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--infodir=/usr/info \
--disable-nls \
--disable-perl-regexp \
+ --without-included-regex \
);
touch $(GNUGREP_DIR)/.configured
touch $(HOSTAP_BUILD_DIR)/.configured
$(HOSTAP_BUILD_DIR)/driver/modules/hostap.o: $(HOSTAP_BUILD_DIR)/.configured
- $(MAKE) -C $(HOSTAP_BUILD_DIR) pccard KERNEL_PATH=$(BUILD_DIR)/linux CC=$(TARGET_CC)
+ $(MAKE) -C $(HOSTAP_BUILD_DIR) pccard KERNEL_PATH=$(LINUX_SOURCE_DIR) CC=$(TARGET_CC)
$(MAKE) -C $(HOSTAP_BUILD_DIR)/utils CC=$(TARGET_CC)
$(MAKE) -C $(HOSTAP_BUILD_DIR)/hostapd CC=$(TARGET_CC)
touch -c $(HOSTAP_BUILD_DIR)/driver/modules/hostap.o
$(JPEG_DIR)/.configured: $(JPEG_DIR)/.unpacked
zcat $(DL_DIR)/$(JPEG_SOURCE) | tar -C $(BUILD_DIR) -xvf -
(cd $(JPEG_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked
(cd $(LIBGLIB12_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked
(cd $(LIBTOOL_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(LINKS_DIR)/.configured: $(LINKS_DIR)/.unpacked
(cd $(LINKS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
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)
$(LRZSZ_DIR)/.configured: $(LRZSZ_DIR)/.unpacked
(cd $(LRZSZ_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(M4_DIR)/.configured: $(M4_DIR)/.unpacked
(cd $(M4_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
);
$(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked
(cd $(GNUMAKE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(MKE2FS_DIR)/.configured: $(MKE2FS_DIR)/.unpacked
(cd $(MKE2FS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(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 \
#
#############################################################
# Copyright (C) 2002 by Ken Restivo <ken@246gt.com>
-# $Id: ncurses.mk,v 1.22 2003/02/12 12:43:15 andersen Exp $
+# $Id: ncurses.mk,v 1.23 2003/03/04 19:16:18 andersen Exp $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as
$(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist
(cd $(NCURSES_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) BUILD_CC=$(HOSTCC) \
- HOSTCC=$(HOSTCC) CC=$(TARGET_CC) \
+ BUILD_CC=$(HOSTCC) HOSTCC=$(HOSTCC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source
(cd $(NEWT_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(NTP_DIR)/.configured: $(NTP_DIR)/.unpacked
(cd $(NTP_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
OPENSSH_SITE:=ftp://ftp.tux.org/bsd/openbsd/OpenSSH/portable/
OPENSSH_DIR:=$(BUILD_DIR)/openssh-3.5p1
OPENSSH_SOURCE:=openssh-3.5p1.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_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; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ (cd $(OPENSSH_DIR); rm -rf config.cache; autoconf; \
+ $(TARGET_CONFIGURE_OPTS) \
+ LD=$(TARGET_CROSS)gcc \
./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 \
+ --libexecdir=/usr/sbin \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
# TARGETS
OPENSSL_SITE:=http://www.openssl.org/source
-OPENSSL_SOURCE:=openssl-0.9.7.tar.gz
-OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.7
+OPENSSL_SOURCE:=openssl-0.9.7a.tar.gz
+OPENSSL_DIR:=$(BUILD_DIR)/openssl-0.9.7a
OPENSSL_PATCH=$(SOURCE_DIR)/openssl.patch
$(DL_DIR)/$(OPENSSL_SOURCE):
$(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked
(cd $(GNUPATCH_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(PCIUTILS_DIR)/.configured: $(PCIUTILS_DIR)/.unpacked
(cd $(PCIUTILS_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
touch $(PCMCIA_DIR)/.patched
$(PCMCIA_DIR)/.configured: $(PCMCIA_DIR)/.patched
- ( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_DIR) --noprompt \
+ ( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_SOURCE_DIR) --noprompt \
--rcdir=/etc --arch=$(ARCH) --trust --srctree --nocardbus \
--sysv --kcc=$(HOSTCC) --ucc=$(TARGET_CC) --ld=$(TARGET_CROSS)ld \
--target=$(TARGET_DIR))
$(PPPD_DIR)/.configured: $(PPPD_DIR)/.unpacked
(cd $(PPPD_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(RXVT_DIR)/.configured: $(RXVT_DIR)/.unpacked
(cd $(RXVT_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(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 \
$(SED_DIR)/.configured: $(SED_DIR)/.unpacked
(cd $(SED_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
rm -f $(SOCAT_WORKDIR)/Makefile
mkdir -p $(SOCAT_WORKDIR)
(cd $(SOCAT_WORKDIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(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 \
$(STRACE_DIR)/.configured: $(STRACE_DIR)/.unpacked
(cd $(STRACE_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
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)
- (cd $(LINUX_DIR); ln -s $(LINUX_SOURCE)/include)
+ 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)" = "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
$(STAGING_DIR)/include/linux/version.h: $(LINUX_DIR)/.configured
mkdir -p $(STAGING_DIR)/include
rm -rf $(STAGING_DIR)/include/linux
- cp -dpa $(LINUX_SOURCE)/include/linux $(STAGING_DIR)/include/
+ cp -dpa $(LINUX_DIR)/include/linux $(STAGING_DIR)/include/
rm -rf $(STAGING_DIR)/include/asm
mkdir -p $(STAGING_DIR)/include/asm
- cp -dpa $(LINUX_SOURCE)/include/asm/* $(STAGING_DIR)/include/asm/
+ cp -dpa $(LINUX_DIR)/include/asm/* $(STAGING_DIR)/include/asm/
rm -rf $(STAGING_DIR)/include/scsi
mkdir -p $(STAGING_DIR)/include/scsi
- cp -dpa $(LINUX_SOURCE)/include/scsi/* $(STAGING_DIR)/include/scsi
+ cp -dpa $(LINUX_DIR)/include/scsi/* $(STAGING_DIR)/include/scsi
touch -c $(STAGING_DIR)/include/linux/version.h
system-linux: $(STAGING_DIR)/include/linux/version.h
$(GNUTAR_DIR)/.configured: $(GNUTAR_DIR)/.unpacked
(cd $(GNUTAR_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
$(TN5250_DIR)/.configured: $(TN5250_DIR)/.dist
(cd $(TN5250_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
(cd $(BINUTILS_DIR1); CC=$(HOSTCC) \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
RANLIB=$(TARGET_CROSS)ranlib CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
NM=$(TARGET_CROSS)nm CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
(cd $(BINUTILS_DIR1); CC=$(HOSTCC) \
$(BINUTILS_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
RANLIB=$(TARGET_CROSS)ranlib CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
NM=$(TARGET_CROSS)nm CC=$(HOSTCC) \
$(GCC_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=$(STAGING_DIR) \
--exec-prefix=$(STAGING_DIR) \
--bindir=$(STAGING_DIR)/bin \
LINUX_PATCH_1_SITE:=http://telia.dl.sourceforge.net/sourceforge/user-mode-linux
LINUX_KCONFIG=$(SOURCE_DIR)/linux-uml.config
LINUX_KERNEL=$(BASE_DIR)/UMlinux
+# Used by pcmcia-cs and others
+LINUX_SOURCE_DIR=$(LINUX_DIR)
$(DL_DIR)/$(LINUX_SOURCE):
$(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
$(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched
(cd $(VALGRIND_DIR); rm -rf config.cache; \
- PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ $(TARGET_CONFIGURE_OPTS) \
./configure \
--target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--- /dev/null
+diff -urN openssh-3.5p1.orig/configure.ac openssh-3.5p1/configure.ac
+--- openssh-3.5p1.orig/configure.ac 2002-09-25 18:38:47.000000000 -0600
++++ openssh-3.5p1/configure.ac 2003-03-04 04:54:47.000000000 -0700
+@@ -504,6 +504,9 @@
+ [
+ AC_MSG_RESULT(no)
+ AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
++ ],
++ [AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+
+@@ -535,6 +538,9 @@
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
++ ],
++ [AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ])
+ fi
+ ]
+@@ -676,6 +682,9 @@
+ AC_MSG_RESULT(no)
+ AC_DEFINE(BROKEN_SNPRINTF)
+ AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
++ ],
++ [AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+ fi
+@@ -810,6 +819,10 @@
+ [
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(OpenSSL version header not found.)
++ ],
++ [
++ ssl_header_ver="90700f (OpenSSL 0.9.7a 19 Feb 2003)"
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to $ssl_header_ver])
+ ]
+ )
+
+@@ -843,6 +856,10 @@
+ [
+ AC_MSG_RESULT(not found)
+ AC_MSG_ERROR(OpenSSL library not found.)
++ ],
++ [
++ ssl_library_ver="90700f (OpenSSL 0.9.7a 19 Feb 2003)"
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to $ssl_library_ver])
+ ]
+ )
+
+@@ -860,6 +877,10 @@
+ [
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Your OpenSSL headers do not match your library)
++ ],
++ [
++ AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+
+@@ -889,6 +910,11 @@
+ # Default to use of the rand helper if OpenSSL doesn't
+ # seed itself
+ USE_RAND_HELPER=yes
++ ],
++ [
++ OPENSSL_SEEDS_ITSELF=yes
++ AC_MSG_RESULT(yes)
++ AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
+ ]
+ )
+
+@@ -1475,7 +1501,8 @@
+ #else
+ main() { exit(0); }
+ #endif
+- ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
++ ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ],
++ [ true ]
+ )
+ fi
+ AC_SUBST(NO_SFTP)
+@@ -1596,6 +1623,7 @@
+ }
+ ],
+ [ ac_cv_have_accrights_in_msghdr="yes" ],
++ [ ac_cv_have_accrights_in_msghdr="no" ],
+ [ ac_cv_have_accrights_in_msghdr="no" ]
+ )
+ ])
+@@ -1620,7 +1648,8 @@
+ }
+ ],
+ [ ac_cv_have_control_in_msghdr="yes" ],
+- [ ac_cv_have_control_in_msghdr="no" ]
++ [ ac_cv_have_control_in_msghdr="no" ],
++ [ ac_cv_have_control_in_msghdr="yes" ]
+ )
+ ])
+ if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
+@@ -1931,13 +1960,14 @@
+ )
+ fi
+ fi
++if test "$cross_compiling" != yes; then
+ AC_CHECK_FILE("/dev/ptc",
+ [
+ AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
+ have_dev_ptc=1
+ ]
+ )
+-
++fi
+ # Options from here on. Some of these are preset by platform above
+ AC_ARG_WITH(mantype,
+ [ --with-mantype=man|cat|doc Set man page type],
+diff -urN openssh-3.5p1.orig/sshd_config openssh-3.5p1/sshd_config
+--- openssh-3.5p1.orig/sshd_config 2002-09-26 21:21:58.000000000 -0600
++++ openssh-3.5p1/sshd_config 2003-03-04 04:42:03.000000000 -0700
+@@ -89,5 +89,8 @@
+ #Banner /some/path
+ #VerifyReverseMapping no
+
++ClientAliveInterval 15
++ClientAliveCountMax 4
++
+ # override default of no subsystems
+-Subsystem sftp /usr/libexec/sftp-server
++Subsystem sftp /usr/sbin/sftp-server
#else
# define LOAD ld
# define X(i) [%i1+i*4]
---- openssl-0.9.7.orig/crypto/md5/md5.h
-+++ openssl-0.9.7/crypto/md5/md5.h
-@@ -78,7 +78,7 @@
-
- #if defined(OPENSSL_SYS_WIN16) || defined(__LP32__)
- #define MD5_LONG unsigned long
--#elif defined(OENSSL_SYS_CRAY) || defined(__ILP64__)
-+#elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
- #define MD5_LONG unsigned long
- #define MD5_LONG_LOG2 3
- /*
--- openssl-0.9.7.orig/crypto/opensslconf.h
+++ openssl-0.9.7/crypto/opensslconf.h
@@ -4,17 +4,38 @@
#endif
/* These default values were supplied by
---- openssl-0.9.7.orig/crypto/ui/ui_util.c
-+++ openssl-0.9.7/crypto/ui/ui_util.c
-@@ -78,12 +78,14 @@
- if (ui)
- {
- ok = UI_add_input_string(ui,prompt,0,buf,0,size-1);
-- if (ok == 0 && verify)
-+ if (ok >= 0 && verify)
- ok = UI_add_verify_string(ui,prompt,0,buff,0,size-1,
- buf);
-- if (ok == 0)
-+ if (ok >= 0)
- ok=UI_process(ui);
- UI_free(ui);
- }
-+ if (ok > 0)
-+ ok = 0;
- return(ok);
- }
--- openssl-0.9.7.orig/ssl/ssl_algs.c
+++ openssl-0.9.7/ssl/ssl_algs.c
@@ -109,3 +109,8 @@