From: Eric Andersen Date: Fri, 17 Jan 2003 08:03:59 +0000 (-0000) Subject: standardize handling of GNU configure scripts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef7784a62d2ecd681b37aee7040e71bbb34a51cd;p=buildroot.git standardize handling of GNU configure scripts -Erik --- diff --git a/Makefile b/Makefile index 8e1f4d3e36..cde7e4cc2f 100644 --- a/Makefile +++ b/Makefile @@ -55,14 +55,14 @@ BUILD_WITH_LARGEFILE:=true WGET:=wget --passive-ftp # Optimize toolchain for which type of CPU? -#OPTIMIZE_FOR_CPU:=i486 -#OPTIMIZE_FOR_CPU:=strongarm -#OPTIMIZE_FOR_CPU:=whatever -OPTIMIZE_FOR_CPU:=$(ARCH) +OPTIMIZE_FOR_CPU=$(ARCH) +#OPTIMIZE_FOR_CPU=i486 +#OPTIMIZE_FOR_CPU=strongarm +#OPTIMIZE_FOR_CPU=whatever # Any additional gcc options you may want to include.... -#EXTRA_GCC_CONFIG_OPTIONS:=--without-float -EXTRA_GCC_CONFIG_OPTIONS:= +EXTRA_GCC_CONFIG_OPTIONS= +#EXTRA_GCC_CONFIG_OPTIONS=--without-float ############################################################# # @@ -135,7 +135,8 @@ TARGET_PATH:=$(STAGING_DIR)/bin:$(STAGING_DIR)/usr/bin:/bin:/sbin:/usr/bin:/usr/ STRIP:=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note #STRIP:=/bin/true IMAGE:=$(BASE_DIR)/root_fs -GNU_TARGET_NAME:=$(OPTIMIZE_FOR_CPU)-pc-linux-gnu +MAKE:=make +GNU_TARGET_NAME:=$(OPTIMIZE_FOR_CPU)-unknown-linux-gnu ifneq ($(strip $(ARCH)),i386) CROSS:=$(ARCH)-linux- endif diff --git a/make/autoconf.mk b/make/autoconf.mk index 0ba80381ab..5554061a91 100644 --- a/make/autoconf.mk +++ b/make/autoconf.mk @@ -20,11 +20,20 @@ $(AUTOCONF_DIR)/.unpacked: $(DL_DIR)/$(AUTOCONF_SOURCE) touch $(AUTOCONF_DIR)/.unpacked $(AUTOCONF_DIR)/.configured: $(AUTOCONF_DIR)/.unpacked - (cd $(AUTOCONF_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE EMACS="no" ./configure \ - --target=i386-uclibc \ + (cd $(AUTOCONF_DIR); rm -rf config.cache; PATH=$(STAGING_DIR)/bin:$$PATH \ + CC=$(TARGET_CC1) EMACS="no" \ + ./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 \ ); touch $(AUTOCONF_DIR)/.configured @@ -53,7 +62,7 @@ autoconf: uclibc $(TARGET_DIR)/$(AUTOCONF_TARGET_BINARY) autoconf-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(AUTOCONF_DIR) uninstall - -make -C $(AUTOCONF_DIR) clean + -$(MAKE) -C $(AUTOCONF_DIR) clean autoconf-dirclean: rm -rf $(AUTOCONF_DIR) diff --git a/make/automake.mk b/make/automake.mk index 52ffebb4a2..32b16eaa80 100644 --- a/make/automake.mk +++ b/make/automake.mk @@ -20,11 +20,20 @@ $(AUTOMAKE_DIR)/.unpacked: $(DL_DIR)/$(AUTOMAKE_SOURCE) touch $(AUTOMAKE_DIR)/.unpacked $(AUTOMAKE_DIR)/.configured: $(AUTOMAKE_DIR)/.unpacked - (cd $(AUTOMAKE_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure \ - --target=i386-uclibc \ + (cd $(AUTOMAKE_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ ); touch $(AUTOMAKE_DIR)/.configured @@ -55,7 +64,7 @@ automake: uclibc $(TARGET_DIR)/$(AUTOMAKE_TARGET_BINARY) automake-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(AUTOMAKE_DIR) uninstall - -make -C $(AUTOMAKE_DIR) clean + -$(MAKE) -C $(AUTOMAKE_DIR) clean automake-dirclean: rm -rf $(AUTOMAKE_DIR) diff --git a/make/bash.mk b/make/bash.mk index dc11c36090..c52795fb25 100644 --- a/make/bash.mk +++ b/make/bash.mk @@ -20,10 +20,23 @@ $(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE) touch $(BASH_DIR)/.unpacked $(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked - (cd $(BASH_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \ - --mandir=/junk --infodir=/junk \ - --with-curses --enable-alias \ + (cd $(BASH_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + --with-curses \ + --enable-alias \ ); touch $(BASH_DIR)/.configured @@ -40,7 +53,7 @@ bash: ncurses uclibc $(TARGET_DIR)/$(BASH_TARGET_BINARY) bash-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(BASH_DIR) uninstall - -make -C $(BASH_DIR) clean + -$(MAKE) -C $(BASH_DIR) clean bash-dirclean: rm -rf $(BASH_DIR) diff --git a/make/berkeleydb.mk b/make/berkeleydb.mk index 09680ef5f0..7c5d083343 100644 --- a/make/berkeleydb.mk +++ b/make/berkeleydb.mk @@ -17,23 +17,31 @@ $(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE) zcat $(DL_DIR)/$(DB_SOURCE) | tar -C $(BUILD_DIR) -xvf - touch $(DB_DIR)/.dist -$(DB_DIR)/build_unix/Makefile: $(DB_DIR)/.dist - (cd $(DB_DIR)/build_unix; PATH="$(TARGET_PATH)" \ - CC=$(TARGET_CC1) ../dist/configure \ - --prefix=/usr \ - --localstatedir=/var \ - --sysconfdir=/etc \ - --libexecdir=/usr/sbin \ - --mandir=/usr/share/man \ - --enable-shared=yes \ - ) - -$(DB_DIR)/build_unix/.libs/libdb-4.0.so: $(DB_DIR)/build_unix/Makefile - PATH="$(TARGET_PATH)" make -C $(DB_DIR)/build_unix +$(DB_DIR)/.configured: $(DB_DIR)/.dist + (cd $(DB_DIR)/build_unix; rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ../dist/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 \ + --enable-shared \ + ); + touch $(DB_DIR)/.configured + +$(DB_DIR)/build_unix/.libs/libdb-4.0.so: $(DB_DIR)/.configured + $(MAKE) CC=$(TARGET_CC1) -C $(DB_DIR)/build_unix $(STAGING_DIR)/lib/libdb-4.0.so: $(DB_DIR)/build_unix/.libs/libdb-4.0.so -mkdir -p $(STAGING_DIR)/man/man1 - PATH="$(TARGET_PATH)" make -C $(DB_DIR)/build_unix prefix=$(STAGING_DIR) install + $(MAKE) DESTDIR=$(STAGING_DIR) CC=$(TARGET_CC1) -C $(DB_DIR)/build_unix install rm -rf $(STAGING_DIR)/man/man1 $(TARGET_DIR)/lib/libdb-4.0.so: $(STAGING_DIR)/lib/libdb-4.0.so @@ -43,7 +51,7 @@ $(TARGET_DIR)/lib/libdb-4.0.so: $(STAGING_DIR)/lib/libdb-4.0.so -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib//libdb*so* db-clean: - make -C $(DB_DIR)/build_unix clean + $(MAKE) -C $(DB_DIR)/build_unix clean db-dirclean: rm -rf $(DB_DIR) diff --git a/make/coreutils.mk b/make/coreutils.mk index aac13bdc35..86b84e4c7a 100644 --- a/make/coreutils.mk +++ b/make/coreutils.mk @@ -22,10 +22,21 @@ $(COREUTILS_DIR)/.unpacked: $(DL_DIR)/$(COREUTILS_SOURCE) touch $(COREUTILS_DIR)/.unpacked $(COREUTILS_DIR)/.configured: $(COREUTILS_DIR)/.unpacked - (cd $(COREUTILS_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr \ - --target=$(ARCH)-linux --host=$(ARCH)-linux \ - --disable-nls --mandir=/junk --infodir=/junk \ + (cd $(COREUTILS_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ ); touch $(COREUTILS_DIR)/.configured @@ -48,7 +59,7 @@ coreutils: uclibc $(TARGET_DIR)/$(COREUTILS_TARGET_BINARY) coreutils-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(COREUTILS_DIR) uninstall - -make -C $(COREUTILS_DIR) clean + -$(MAKE) -C $(COREUTILS_DIR) clean coreutils-dirclean: rm -rf $(COREUTILS_DIR) diff --git a/make/ext2root.mk b/make/ext2root.mk index 1e4b9f1339..ad0dd1db53 100644 --- a/make/ext2root.mk +++ b/make/ext2root.mk @@ -36,6 +36,7 @@ GENEXT2_REALSIZE=$(subst total,, $(shell 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; @@ -46,7 +47,7 @@ ext2root: genext2fs ext2root-source: $(DL_DIR)/$(GENEXT2_SOURCE) ext2root-clean: - -make -C $(GENEXT2_DIR) clean + -$(MAKE) -C $(GENEXT2_DIR) clean ext2root-dirclean: rm -rf $(GENEXT2_DIR) diff --git a/make/findutils.mk b/make/findutils.mk index c32e986890..82727d4d4d 100644 --- a/make/findutils.mk +++ b/make/findutils.mk @@ -23,10 +23,21 @@ $(FINDUTILS_DIR)/.unpacked: $(DL_DIR)/$(FINDUTILS_SOURCE) touch $(FINDUTILS_DIR)/.unpacked $(FINDUTILS_DIR)/.configured: $(FINDUTILS_DIR)/.unpacked - (cd $(FINDUTILS_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \ - --mandir=/junk --infodir=/junk --localstatedir=/var/lib/locate \ - --libexecdir='$${prefix}/lib/locate' \ + (cd $(FINDUTILS_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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/lib \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --disable-nls \ ); touch $(FINDUTILS_DIR)/.configured @@ -34,19 +45,14 @@ $(FINDUTILS_DIR)/$(FINDUTILS_BINARY): $(FINDUTILS_DIR)/.configured $(MAKE) CC=$(TARGET_CC1) -C $(FINDUTILS_DIR) $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY): $(FINDUTILS_DIR)/$(FINDUTILS_BINARY) - $(MAKE) prefix=$(TARGET_DIR)/usr exec_prefix=$(TARGET_DIR)/usr \ - bindir=$(TARGET_DIR)/usr/bin sbindir=$(TARGET_DIR)/usr/sbin \ - sysconfdir=$(TARGET_DIR)/usr/etc datadir=$(TARGET_DIR)/usr/share \ - includedir=$(TARGET_DIR)/usr/include libdir=$(TARGET_DIR)/usr/lib \ - localstatedir=$(TARGET_DIR)/var mandir=$(TARGET_DIR)/junk \ - infodir=$(TARGET_DIR)/junk CC=$(TARGET_CC1) -C $(FINDUTILS_DIR) install + $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(FINDUTILS_DIR) install rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/junk findutils: uclibc $(TARGET_DIR)/$(FINDUTILS_TARGET_BINARY) findutils-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(FINDUTILS_DIR) uninstall - -make -C $(FINDUTILS_DIR) clean + -$(MAKE) -C $(FINDUTILS_DIR) clean findutils-dirclean: rm -rf $(FINDUTILS_DIR) diff --git a/make/gawk.mk b/make/gawk.mk index 84671a6fe5..f801f7ffcd 100644 --- a/make/gawk.mk +++ b/make/gawk.mk @@ -20,22 +20,20 @@ $(GAWK_DIR)/.unpacked: $(DL_DIR)/$(GAWK_SOURCE) touch $(GAWK_DIR)/.unpacked $(GAWK_DIR)/.configured: $(GAWK_DIR)/.unpacked - (cd $(GAWK_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure \ + (cd $(GAWK_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./configure \ --target=$(GNU_TARGET_NAME) \ --prefix=/usr \ --exec-prefix=/usr \ --bindir=/usr/bin \ --sbindir=/usr/sbin \ - --sysconfdir=/etc \ --libexecdir=/usr/lib \ + --sysconfdir=/etc \ --datadir=/usr/share \ - --libdir=/usr/lib \ --localstatedir=/var \ - --mandir=/junk \ - --infodir=/junk \ - --includedir=$(STAGING_DIR)/include \ - --oldincludedir=$(STAGING_DIR)/usr/include \ + --mandir=/usr/man \ + --infodir=/usr/info \ --disable-nls \ ); touch $(GAWK_DIR)/.configured @@ -51,7 +49,7 @@ gawk: uclibc $(TARGET_DIR)/$(GAWK_TARGET_BINARY) gawk-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(GAWK_DIR) uninstall - -make -C $(GAWK_DIR) clean + -$(MAKE) -C $(GAWK_DIR) clean gawk-dirclean: rm -rf $(GAWK_DIR) diff --git a/make/gdb.mk b/make/gdb.mk index 04663e5111..51eff8bc54 100644 --- a/make/gdb.mk +++ b/make/gdb.mk @@ -16,19 +16,30 @@ $(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE) touch $(GDB_DIR)/.unpacked $(GDB_DIR)/.configured: $(GDB_DIR)/.unpacked - (cd $(GDB_DIR); rm -rf config.cache; CC=$(TARGET_CC1) \ - AR=$(TARGET_CROSS)ar NM=$(TARGET_CROSS)nm \ - LD=$(TARGET_CROSS)ld AS=$(TARGET_CROSS)as \ - ./configure --prefix=/usr \ - --includedir=$(STAGING_DIR)/include \ - --disable-nls --without-uiout --disable-gdbmi \ - --disable-tui --disable-gdbtk --without-x \ - --disable-sim --enable-gdbserver \ - --without-included-gettext); + (cd $(GDB_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + --without-uiout --disable-gdbmi \ + --disable-tui --disable-gdbtk --without-x \ + --disable-sim --enable-gdbserver \ + --without-included-gettext \ + ); touch $(GDB_DIR)/.configured $(GDB_DIR)/gdb/gdb: $(GDB_DIR)/.configured - make CC=$(TARGET_CC1) -C $(GDB_DIR) + $(MAKE) CC=$(TARGET_CC1) -C $(GDB_DIR) $(STRIP) $(GDB_DIR)/gdb/gdb $(TARGET_DIR)/usr/bin/gdb: $(GDB_DIR)/gdb/gdb @@ -37,7 +48,7 @@ $(TARGET_DIR)/usr/bin/gdb: $(GDB_DIR)/gdb/gdb gdb: $(TARGET_DIR)/usr/bin/gdb gdb-clean: - make -C $(GDB_DIR) clean + $(MAKE) -C $(GDB_DIR) clean gdb-dirclean: rm -rf $(GDB_DIR) diff --git a/make/gdbserver.mk b/make/gdbserver.mk index b31496fb68..cfc834a200 100644 --- a/make/gdbserver.mk +++ b/make/gdbserver.mk @@ -11,18 +11,29 @@ GDB_WDIR:=$(BUILD_DIR)/gdbserver $(GDB_WDIR)/.configured: $(GDB_DIR)/.unpacked - (cd $(GDB_WDIR); rm -rf config.cache; CC=$(TARGET_CC1) \ - AR=$(TARGET_CROSS)ar NM=$(TARGET_CROSS)nm \ - LD=$(TARGET_CROSS)ld AS=$(TARGET_CROSS)as \ - $(GDB_DIR)/gdb/gdbserver/configure --prefix=/usr \ - --includedir=$(STAGING_DIR)/include \ - --disable-nls --without-uiout --disable-gdbmi \ - --disable-tui --disable-gdbtk --without-x \ - --without-included-gettext); + (cd $(GDB_WDIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + --without-uiout --disable-gdbmi \ + --disable-tui --disable-gdbtk --without-x \ + --without-included-gettext \ + ); touch $(GDB_WDIR)/.configured $(GDB_DIR)/gdb/gdbserver/gdbserver: $(GDB_WDIR)/.configured - make CC=$(TARGET_CC1) -C $(GDB_WDIR) + $(MAKE) CC=$(TARGET_CC1) -C $(GDB_WDIR) $(STRIP) $(GDB_WDIR)/gdbserver $(TARGET_DIR)/usr/bin/gdbserver: $(GDB_DIR)/gdb/gdbserver/gdbserver @@ -31,7 +42,7 @@ $(TARGET_DIR)/usr/bin/gdbserver: $(GDB_DIR)/gdb/gdbserver/gdbserver gdbserver: $(TARGET_DIR)/usr/bin/gdbserver gdbserver-clean: - make -C $(GDB_WDIR) clean + $(MAKE) -C $(GDB_WDIR) clean gdbserver-dirclean: rm -rf $(GDB_WDIR) diff --git a/make/libglib12.mk b/make/libglib12.mk index 2ddb03c032..d5227d36c3 100644 --- a/make/libglib12.mk +++ b/make/libglib12.mk @@ -19,9 +19,22 @@ $(LIBGLIB12_DIR)/.unpacked: $(DL_DIR)/$(LIBGLIB12_SOURCE) touch $(LIBGLIB12_DIR)/.unpacked $(LIBGLIB12_DIR)/.configured: $(LIBGLIB12_DIR)/.unpacked - (cd $(LIBGLIB12_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - ./configure --prefix=$(STAGING_DIR) --enable-shared \ - --host=$(ARCH)-pc-linux-gnu \ + (cd $(LIBGLIB12_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + --enable-shared \ ); touch $(LIBGLIB12_DIR)/.configured @@ -29,7 +42,7 @@ $(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.configured $(MAKE) CC=$(TARGET_CC1) -C $(LIBGLIB12_DIR) $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY): $(LIBGLIB12_DIR)/.libs/$(LIBGLIB12_BINARY) - $(MAKE) CC=$(TARGET_CC1) -C $(LIBGLIB12_DIR) install + $(MAKE) CC=$(TARGET_CC1) prefix=$(STAGING_DIR) -C $(LIBGLIB12_DIR) install $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY): $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) cp -a $(STAGING_DIR)/lib/$(LIBGLIB12_BINARY) $(TARGET_DIR)/lib/ @@ -41,7 +54,7 @@ libglib12: uclibc $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) libglib12-clean: rm -f $(TARGET_DIR)/lib/$(LIBGLIB12_BINARY) - -make -C $(LIBGLIB12_DIR) clean + -$(MAKE) -C $(LIBGLIB12_DIR) clean libglib12-dirclean: rm -rf $(LIBGLIB12_DIR) diff --git a/make/libtool.mk b/make/libtool.mk index ca2702d867..0d1ac56dde 100644 --- a/make/libtool.mk +++ b/make/libtool.mk @@ -20,11 +20,21 @@ $(LIBTOOL_DIR)/.unpacked: $(DL_DIR)/$(LIBTOOL_SOURCE) touch $(LIBTOOL_DIR)/.unpacked $(LIBTOOL_DIR)/.configured: $(LIBTOOL_DIR)/.unpacked - (cd $(LIBTOOL_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure \ - --target=i386-uclibc \ + (cd $(LIBTOOL_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ ); touch $(LIBTOOL_DIR)/.configured @@ -54,7 +64,7 @@ libtool: uclibc $(TARGET_DIR)/$(LIBTOOL_TARGET_BINARY) libtool-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(LIBTOOL_DIR) uninstall - -make -C $(LIBTOOL_DIR) clean + -$(MAKE) -C $(LIBTOOL_DIR) clean libtool-dirclean: rm -rf $(LIBTOOL_DIR) diff --git a/make/links.mk b/make/links.mk index 40c2aee7be..675aea94a9 100644 --- a/make/links.mk +++ b/make/links.mk @@ -17,22 +17,33 @@ $(LINKS_DIR)/.unpacked: $(DL_DIR)/$(LINKS_SOURCE) touch $(LINKS_DIR)/.unpacked $(LINKS_DIR)/.configured: $(LINKS_DIR)/.unpacked - (cd $(LINKS_DIR); rm -rf config.cache; CC=$(TARGET_CC1) \ - ./configure --prefix=/usr \ - --libexecdir=/usr/lib --sysconfdir=/etc \ - --localstatedir=/tmp --libdir=/etc \ - --disable-nls); + (cd $(LINKS_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + ); touch $(LINKS_DIR)/.configured $(LINKS_DIR)/links: $(LINKS_DIR)/.configured - make CC=$(TARGET_CC1) -C $(LINKS_DIR) + $(MAKE) CC=$(TARGET_CC1) -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 + $(MAKE) -C $(LINKS_DIR) clean links-dirclean: rm -rf $(LINKS_DIR) diff --git a/make/m4.mk b/make/m4.mk index cc10e4a609..70ceb92ae9 100644 --- a/make/m4.mk +++ b/make/m4.mk @@ -20,11 +20,21 @@ $(M4_DIR)/.unpacked: $(DL_DIR)/$(M4_SOURCE) touch $(M4_DIR)/.unpacked $(M4_DIR)/.configured: $(M4_DIR)/.unpacked - (cd $(M4_DIR); rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure \ + (cd $(M4_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ ); touch $(M4_DIR)/.configured @@ -53,7 +63,7 @@ m4: uclibc $(TARGET_DIR)/$(M4_TARGET_BINARY) m4-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(M4_DIR) uninstall - -make -C $(M4_DIR) clean + -$(MAKE) -C $(M4_DIR) clean m4-dirclean: rm -rf $(M4_DIR) diff --git a/make/make.mk b/make/make.mk index 9fc8f7f5c5..cc12592b68 100644 --- a/make/make.mk +++ b/make/make.mk @@ -20,9 +20,21 @@ $(GNUMAKE_DIR)/.unpacked: $(DL_DIR)/$(GNUMAKE_SOURCE) touch $(GNUMAKE_DIR)/.unpacked $(GNUMAKE_DIR)/.configured: $(GNUMAKE_DIR)/.unpacked - (cd $(GNUMAKE_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \ - --mandir=/junk --infodir=/junk \ + (cd $(GNUMAKE_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ ); touch $(GNUMAKE_DIR)/.configured @@ -37,7 +49,7 @@ make: uclibc $(TARGET_DIR)/$(GNUMAKE_TARGET_BINARY) make-clean: $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(GNUMAKE_DIR) uninstall - -make -C $(GNUMAKE_DIR) clean + -$(MAKE) -C $(GNUMAKE_DIR) clean make-dirclean: rm -rf $(GNUMAKE_DIR) diff --git a/make/ncurses.mk b/make/ncurses.mk index 8ab30c2e76..1f5f44866b 100644 --- a/make/ncurses.mk +++ b/make/ncurses.mk @@ -5,7 +5,7 @@ # ############################################################# # Copyright (C) 2002 by Ken Restivo -# $Id: ncurses.mk,v 1.15 2003/01/16 22:04:22 andersen Exp $ +# $Id: ncurses.mk,v 1.16 2003/01/17 08:03:59 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 @@ -55,8 +55,9 @@ $(NCURSES_DIR)/.configured: $(NCURSES_DIR)/.dist --with-default-terminfo-dir=/usr/share/terminfo \ --libdir=$(STAGING_DIR)/lib \ --includedir=$(STAGING_DIR)/include \ - --with-shared --without-cxx --without-cxx-binding --without-ada \ - --without-progs --disable-nls); + --with-shared --without-cxx --without-cxx-binding \ + --without-ada --without-progs --disable-nls \ + ); touch $(NCURSES_DIR)/.configured $(NCURSES_DIR)/lib/libncurses.so: $(NCURSES_DIR)/.configured diff --git a/make/newt.mk b/make/newt.mk index 54db8eb947..56fba9ea05 100644 --- a/make/newt.mk +++ b/make/newt.mk @@ -23,10 +23,22 @@ $(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE) $(NEWT_PATCH) touch $(NEWT_DIR)/.source; $(NEWT_DIR)/.configured: $(NEWT_DIR)/.source - (cd $(NEWT_DIR); rm -rf config.cache; CC=$(TARGET_CC1) \ - ./configure --shared --prefix=/usr --exec_prefix=$(STAGING_DIR)/usr/bin \ - --libdir=$(STAGING_DIR)/lib --includedir=$(STAGING_DIR)/include \ - --host=$(ARCH)-pc-linux-gnu); + (cd $(NEWT_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + ); touch $(NEWT_DIR)/.configured; $(NEWT_DIR)/libnewt.so.0.50.17: $(NEWT_DIR)/.configured @@ -50,7 +62,7 @@ newt: uclibc slang $(TARGET_DIR)/lib/libnewt.so.0.50.17 newt-clean: rm -f $(TARGET_DIR)/lib/libnewt.so* - -make -C $(NEWT_DIR) clean + -$(MAKE) -C $(NEWT_DIR) clean newt-dirclean: slang-dirclean rm -rf $(NEWT_DIR) diff --git a/make/openssh.mk b/make/openssh.mk index 024c8b0731..01fda92824 100644 --- a/make/openssh.mk +++ b/make/openssh.mk @@ -21,37 +21,40 @@ $(OPENSSH_DIR)/.patched: $(OPENSSH_DIR)/.unpacked touch $(OPENSSH_DIR)/.patched $(OPENSSH_DIR)/.configured: $(OPENSSH_DIR)/.patched - (cd $(OPENSSH_DIR); rm -rf config.cache; CC=$(TARGET_CC1) \ - ./configure \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib \ - --datadir=/usr/share \ - --includedir=/usr/include \ - --libdir=/usr/lib \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - --includedir=$(STAGING_DIR)/include \ - --disable-lastlog --disable-utmp --disable-utmpx --disable-wtmp --disable-wtmpx \ - --disable-nls --without-x); + (cd $(OPENSSH_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + --includedir=$(STAGING_DIR)/include \ + --disable-lastlog --disable-utmp \ + --disable-utmpx --disable-wtmp --disable-wtmpx \ + --disable-nls --without-x \ + ); touch $(OPENSSH_DIR)/.configured $(OPENSSH_DIR)/ssh: $(OPENSSH_DIR)/.configured - make CC=$(TARGET_CC1) -C $(OPENSSH_DIR) + $(MAKE) CC=$(TARGET_CC1) -C $(OPENSSH_DIR) -$(STRIP) --strip-unneeded $(OPENSSH_DIR)/*.so* $(TARGET_DIR)/usr/bin/ssh: $(OPENSSH_DIR)/ssh - make CC=$(TARGET_CC1) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install + $(MAKE) CC=$(TARGET_CC1) DESTDIR=$(TARGET_DIR) -C $(OPENSSH_DIR) install rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc openssh: $(TARGET_DIR)/usr/bin/ssh openssh-clean: - make -C $(OPENSSH_DIR) clean + $(MAKE) -C $(OPENSSH_DIR) clean openssh-dirclean: rm -rf $(OPENSSH_DIR) diff --git a/make/openssl.mk b/make/openssl.mk index 183781ee5e..f43a75bff1 100644 --- a/make/openssl.mk +++ b/make/openssl.mk @@ -21,15 +21,15 @@ $(OPENSSL_DIR)/.unpacked: $(DL_DIR)/$(OPENSSL_SOURCE) $(OPENSSL_PATCH) $(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked (cd $(OPENSSL_DIR); \ PATH=$(TARGET_PATH) ./Configure linux-$(ARCH) --prefix=$(STAGING_DIR) \ - --openssldir=$(STAGING_DIR) -L$(STAGING_DIR)/lib -ldl \ + --openssldir=$(STAGING_DIR)/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_CC1) -C $(OPENSSL_DIR) all build-shared + $(MAKE) CC=$(TARGET_CC1) -C $(OPENSSL_DIR) all build-shared $(STAGING_DIR)/lib/libcrypto.so.0: $(OPENSSL_DIR)/apps/openssl - make CC=$(TARGET_CC1) -C $(OPENSSL_DIR) install + $(MAKE) CC=$(TARGET_CC1) -C $(OPENSSL_DIR) install cp -fa $(OPENSSL_DIR)/libcrypto.so* $(STAGING_DIR)/lib/ (cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.6 libcrypto.so) (cd $(STAGING_DIR)/lib; ln -fs libcrypto.so.0.9.6 libcrypto.so.0) diff --git a/make/sed.mk b/make/sed.mk index f62d70d062..a6af02e4aa 100644 --- a/make/sed.mk +++ b/make/sed.mk @@ -20,9 +20,21 @@ $(SED_DIR)/.unpacked: $(DL_DIR)/$(SED_SOURCE) touch $(SED_DIR)/.unpacked $(SED_DIR)/.configured: $(SED_DIR)/.unpacked - (cd $(SED_DIR); autoconf; rm -f config.cache; CC=$(TARGET_CC1) \ - CFLAGS=-D_POSIX_SOURCE ./configure --prefix=/usr --disable-nls \ - --mandir=/junk --infodir=/junk \ + (cd $(SED_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ ); touch $(SED_DIR)/.configured diff --git a/make/socat.mk b/make/socat.mk index 56d545d928..9a9fc6019d 100644 --- a/make/socat.mk +++ b/make/socat.mk @@ -26,8 +26,22 @@ $(SOCAT_DIR)/.unpacked: $(DL_DIR)/$(SOCAT_SOURCE) $(SOCAT_WORKDIR)/Makefile: $(TARGET_CC) $(SOCAT_DIR)/.unpacked rm -f $(SOCAT_WORKDIR)/Makefile mkdir -p $(SOCAT_WORKDIR) - (cd $(SOCAT_WORKDIR) && CONFIG_SITE=$(SOURCE_DIR)/socat-config.site-$(ARCH) \ - CC=$(TARGET_CC) $(SOCAT_DIR)/configure --prefix=/usr) + (cd $(SOCAT_WORKDIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + $(SOCAT_DIR)/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 \ + ); $(SOCAT_WORKDIR)/socat: $(SOCAT_WORKDIR)/Makefile rm -f $@ diff --git a/make/strace.mk b/make/strace.mk index 84b055e01b..cab7383d88 100644 --- a/make/strace.mk +++ b/make/strace.mk @@ -2,48 +2,53 @@ # # strace # -# Maintainer: Ken Restivo -# ############################################################# -#$Id: strace.mk,v 1.3 2002/11/20 23:16:09 andersen Exp $ - -# TARGETS +STRACE_SOURCE:=strace_4.4-1.tar.gz STRACE_SITE:=http://telia.dl.sourceforge.net/sourceforge/strace -STRACE_SOURCE:=strace_4.4-1.tar.gz +STRACE_CAT:=zcat STRACE_DIR:=$(BUILD_DIR)/strace-4.4 + $(DL_DIR)/$(STRACE_SOURCE): - $(WGET) -P $(DL_DIR) $(STRACE_SITE)/$(STRACE_SOURCE) + $(WGET) -P $(DL_DIR) $(STRACE_SITE)/$(STRACE_SOURCE) strace-source: $(DL_DIR)/$(STRACE_SOURCE) -$(STRACE_DIR)/.dist: $(DL_DIR)/$(STRACE_SOURCE) - zcat $(DL_DIR)/$(STRACE_SOURCE) | tar -C $(BUILD_DIR) -xvf - - touch $(STRACE_DIR)/.dist - -$(STRACE_DIR)/Makefile: $(STRACE_DIR)/.dist - (cd ${STRACE_DIR}; \ - export PATH="${TARGET_PATH}"; \ - ./configure --with-shared --prefix=$(STAGING_DIR)/usr \ - --target=$(ARCH)-linux --host=$(ARCH)-linux ) +$(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; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + ); + touch $(STRACE_DIR)/.configured + +$(STRACE_DIR)/strace: $(STRACE_DIR)/.configured + $(MAKE) CC=$(TARGET_CC1) -C $(STRACE_DIR) + +$(TARGET_DIR)/usr/bin/strace: $(STRACE_DIR)/strace + install -c $(STRACE_DIR)/strace $(TARGET_DIR)/usr/bin/strace -$(STRACE_DIR)/strace: $(STRACE_DIR)/Makefile - make CC="${TARGET_CC}" LD="${TARGET_LD}" \ - AS="${TARGET_AS}" -C $(STRACE_DIR) - -$(STAGING_DIR)/usr/bin/strace: $(STRACE_DIR)/strace - -mkdir -p $(STAGING_DIR)/usr/man/man1 - make -C $(STRACE_DIR) install - rm -rf $(STAGING_DIR)/usr/man/man1 - -$(TARGET_DIR)/usr/bin/strace: $(STAGING_DIR)/usr/bin/strace - install -c $(STAGING_DIR)/usr/bin/strace $(TARGET_DIR)/usr/bin/strace +strace: uclibc $(TARGET_DIR)/usr/bin/strace strace-clean: - make -C $(STRACE_DIR) clean + $(MAKE) -C $(STRACE_DIR) clean strace-dirclean: rm -rf $(STRACE_DIR) -strace: uclibc $(TARGET_DIR)/usr/bin/strace diff --git a/make/uclibc_toolchain.mk b/make/uclibc_toolchain.mk index a55adf06cc..becfaa64e8 100644 --- a/make/uclibc_toolchain.mk +++ b/make/uclibc_toolchain.mk @@ -24,9 +24,7 @@ ifeq ($(USE_UCLIBC_TOOLCHAIN),true) # hacking on the toolchain... # ############################################################# -GNU_TARGET_NAME:=$(ARCH)-linux TARGET_LANGUAGES:=c,c++ -MAKE=make # If you want multilib enabled, enable this... #MULTILIB:=--enable-multilib @@ -229,7 +227,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.gcc_build_hacks --oldincludedir=$(STAGING_DIR)/include $(MULTILIB) \ --enable-target-optspace --disable-nls --with-gnu-ld \ --disable-shared --enable-languages=c --disable-__cxa_atexit \ - --program-prefix=$(ARCH)-uclibc-); + $(EXTRA_GCC_CONFIG_OPTIONS) --program-prefix=$(ARCH)-uclibc-); touch $(GCC_BUILD_DIR1)/.configured $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured @@ -361,25 +359,38 @@ $(GCC_DIR)/.g++_build_hacks: $(GCC_DIR)/.patched $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.g++_build_hacks mkdir -p $(GCC_BUILD_DIR2) - (cd $(GCC_BUILD_DIR2); PATH=$(STAGING_DIR)/bin:$$PATH AR=$(ARCH)-uclibc-ar \ - RANLIB=$(ARCH)-uclibc-ranlib CC=$(HOSTCC) $(GCC_DIR)/configure \ - --target=$(GNU_TARGET_NAME) --prefix=$(STAGING_DIR) \ - --exec-prefix=$(STAGING_DIR) --bindir=$(STAGING_DIR)/bin \ - --sbindir=$(STAGING_DIR)/sbin --sysconfdir=$(STAGING_DIR)/etc \ - --datadir=$(STAGING_DIR)/share --includedir=$(STAGING_DIR)/include \ - --libdir=$(STAGING_DIR)/lib --localstatedir=$(STAGING_DIR)/var \ - --mandir=$(STAGING_DIR)/man --infodir=$(STAGING_DIR)/info \ + (cd $(GCC_BUILD_DIR2); PATH=$(STAGING_DIR)/bin:$$PATH AR=$(TARGET_CROSS)ar \ + RANLIB=$(TARGET_CROSS)ranlib LD=$(TARGET_CROSS)ld NM=$(TARGET_CROSS)nm \ + CC=$(HOSTCC) $(GCC_DIR)/configure \ + --target=$(GNU_TARGET_NAME) \ + --prefix=$(STAGING_DIR) \ + --exec-prefix=$(STAGING_DIR) \ + --bindir=$(STAGING_DIR)/bin \ + --sbindir=$(STAGING_DIR)/sbin \ + --sysconfdir=$(STAGING_DIR)/etc \ + --datadir=$(STAGING_DIR)/share \ + --localstatedir=$(STAGING_DIR)/var \ + --mandir=$(STAGING_DIR)/man \ + --infodir=$(STAGING_DIR)/info \ --with-local-prefix=$(STAGING_DIR)/usr/local \ - --oldincludedir=$(STAGING_DIR)/include $(MULTILIB) \ - --enable-target-optspace --disable-nls --with-gnu-ld \ - --enable-shared --enable-languages=$(TARGET_LANGUAGES) --disable-__cxa_atexit \ - --program-prefix=$(ARCH)-uclibc-); + --libdir=$(STAGING_DIR)/lib \ + --includedir=$(STAGING_DIR)/include \ + --with-gxx-include-dir=$(STAGING_DIR)/include/c++ \ + --oldincludedir=$(STAGING_DIR)/include \ + --enable-shared $(MULTILIB) \ + --enable-target-optspace --disable-nls \ + --with-gnu-ld --disable-__cxa_atexit \ + --enable-languages=$(TARGET_LANGUAGES) \ + $(EXTRA_GCC_CONFIG_OPTIONS) \ + --program-prefix=$(ARCH)-uclibc- \ + ); touch $(GCC_BUILD_DIR2)/.configured $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured - PATH=$(STAGING_DIR)/bin:$$PATH $(MAKE) -C $(GCC_BUILD_DIR2) \ - AR_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ar \ - RANLIB_FOR_TARGET=$(STAGING_DIR)/bin/$(ARCH)-uclibc-ranlib + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(HOSTCC) \ + 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) -C $(GCC_BUILD_DIR2) touch $(GCC_BUILD_DIR2)/.compiled $(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled @@ -397,6 +408,7 @@ $(GCC_BUILD_DIR2)/.fixedup: $(GCC_BUILD_DIR2)/.installed -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-g++ $(STAGING_DIR)/bin/$(ARCH)-uclibc-g++ -mv $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-c++filt $(STAGING_DIR)/bin/$(ARCH)-uclibc-c++filt rm -f $(STAGING_DIR)/bin/cpp $(STAGING_DIR)/bin/gcov $(STAGING_DIR)/bin/*gccbug + rm -f $(STAGING_DIR)/lib/libgcc_s.so* rm -rf $(STAGING_DIR)/info $(STAGING_DIR)/man $(STAGING_DIR)/share/doc \ $(STAGING_DIR)/share/locale touch $(GCC_BUILD_DIR2)/.fixedup diff --git a/make/valgrind.mk b/make/valgrind.mk index 3a0da79148..566fe2eb91 100644 --- a/make/valgrind.mk +++ b/make/valgrind.mk @@ -21,18 +21,29 @@ $(VALGRIND_DIR)/.patched: $(VALGRIND_DIR)/.unpacked touch $(VALGRIND_DIR)/.patched $(VALGRIND_DIR)/.configured: $(VALGRIND_DIR)/.patched - (cd $(VALGRIND_DIR); rm -rf config.cache; CC=$(TARGET_CC1) \ - AR=$(TARGET_CROSS)ar NM=$(TARGET_CROSS)nm \ - LD=$(TARGET_CROSS)ld AS=$(TARGET_CROSS)as \ - ./configure --prefix=/usr \ - --includedir=/usr/include \ - --disable-nls --without-uiout --disable-valgrindmi \ - --disable-tui --disable-valgrindtk --without-x \ - --without-included-gettext); + (cd $(VALGRIND_DIR); rm -rf config.cache; \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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 \ + --without-uiout --disable-valgrindmi \ + --disable-tui --disable-valgrindtk \ + --without-x --without-included-gettext \ + ); touch $(VALGRIND_DIR)/.configured $(VALGRIND_DIR)/valgrind.so: $(VALGRIND_DIR)/.configured - make CC=$(TARGET_CC1) -C $(VALGRIND_DIR) + $(MAKE) CC=$(TARGET_CC1) -C $(VALGRIND_DIR) -$(STRIP) --strip-unneeded $(VALGRIND_DIR)/*.so* touch -c $(VALGRIND_DIR)/valgrind.so @@ -63,7 +74,7 @@ $(TARGET_DIR)/usr/bin/valgrind: $(VALGRIND_DIR)/valgrind.so valgrind: $(TARGET_DIR)/usr/bin/valgrind valgrind-clean: - make -C $(VALGRIND_DIR) clean + $(MAKE) -C $(VALGRIND_DIR) clean valgrind-dirclean: rm -rf $(VALGRIND_DIR) diff --git a/make/zlib.mk b/make/zlib.mk index 11ea17cb1b..8de9b5b4c8 100644 --- a/make/zlib.mk +++ b/make/zlib.mk @@ -20,12 +20,20 @@ $(ZLIB_DIR)/.source: $(DL_DIR)/$(ZLIB_SOURCE) 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); + (cd $(ZLIB_DIR); \ + PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \ + ./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)gcc --shared" CFLAGS=$(ZLIB_CFLAGS) CC=$(TARGET_CC1) -C $(ZLIB_DIR) all libz.a; + $(MAKE) LDSHARED="$(TARGET_CROSS)gcc --shared" CFLAGS=$(ZLIB_CFLAGS) \ + CC=$(TARGET_CC1) -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 @@ -54,7 +62,7 @@ zlib: uclibc $(TARGET_DIR)/lib/libz.so.1.1.4 zlib-clean: rm -f $(TARGET_DIR)/lib/libz.so* - -make -C $(ZLIB_DIR) clean + -$(MAKE) -C $(ZLIB_DIR) clean zlib-dirclean: rm -rf $(ZLIB_DIR)