From 85208e2ab94ddd60cc97dd7ae4a3b2a588281398 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 12 Apr 2002 12:05:57 +0000 Subject: Completely rework the config system so that it no longer annoys me to work on the busybox development tree. This eliminates the use of recursive make, and once again allows us to run 'make' in a subdirectory with the expected result. And things are now much faster too. Greatly improved IMHO... -Erik --- archival/Makefile | 33 +++++++------------------- archival/Makefile.in | 41 ++++++++++++++++++++++++++++++++ archival/libunarchive/Makefile | 49 +++++++-------------------------------- archival/libunarchive/Makefile.in | 38 ++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+), 64 deletions(-) create mode 100644 archival/Makefile.in create mode 100644 archival/libunarchive/Makefile.in (limited to 'archival') diff --git a/archival/Makefile b/archival/Makefile index 35ba02f3b..d76face4b 100644 --- a/archival/Makefile +++ b/archival/Makefile @@ -1,6 +1,6 @@ # Makefile for busybox # -# Copyright (C) 1999,2000,2001 by Erik Andersen +# Copyright (C) 1999-2002 Erik Andersen # # 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 @@ -17,29 +17,14 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -TOPDIR :=.. -L_TARGET := archival.a - -obj-y := -obj-n := -obj- := -subdir-y := libunarchive - -obj-$(CONFIG_AR) += ar.o -obj-$(CONFIG_BUNZIP2) += bunzip2.o -obj-$(CONFIG_CPIO) += cpio.o -obj-$(CONFIG_DPKG) += dpkg.o -obj-$(CONFIG_DPKG_DEB) += dpkg_deb.o -obj-$(CONFIG_GUNZIP) += gunzip.o -obj-$(CONFIG_GZIP) += gzip.o -obj-$(CONFIG_RPM2CPIO) += rpm2cpio.o -obj-$(CONFIG_TAR) += tar.o -obj-$(CONFIG_UNZIP) += unzip.o - - -# Hand off to toplevel Rules.mak -include $(TOPDIR)/Rules.mak +TOPDIR:= ../ +ARCHIVAL_DIR:=./ +include $(TOPDIR).config +include $(TOPDIR)Rules.mak +include Makefile.in +all: $(libraries-y) +-include $(TOPDIR).depend clean: - rm -f $(L_TARGET) *.o core + rm -f *.o *.a $(AR_TARGET) diff --git a/archival/Makefile.in b/archival/Makefile.in new file mode 100644 index 000000000..c53171eea --- /dev/null +++ b/archival/Makefile.in @@ -0,0 +1,41 @@ +# Makefile for busybox +# +# Copyright (C) 1999-2002 by Erik Andersen +# +# 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 +# + +ARCHIVAL_AR:=archival.a +ifndef $(ARCHIVAL_DIR) +ARCHIVAL_DIR:=$(TOPDIR)archival/ +endif + +ARCHIVAL-y:= +ARCHIVAL-$(CONFIG_AR) += ar.o +ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o +ARCHIVAL-$(CONFIG_CPIO) += cpio.o +ARCHIVAL-$(CONFIG_DPKG) += dpkg.o +ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o +ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o +ARCHIVAL-$(CONFIG_GZIP) += gzip.o +ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o +ARCHIVAL-$(CONFIG_TAR) += tar.o +ARCHIVAL-$(CONFIG_UNZIP) += unzip.o + +libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR) + +$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) + $(AR) -ro $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y)) + diff --git a/archival/libunarchive/Makefile b/archival/libunarchive/Makefile index a8409a432..7979879c4 100644 --- a/archival/libunarchive/Makefile +++ b/archival/libunarchive/Makefile @@ -1,6 +1,6 @@ # Makefile for busybox # -# Copyright (C) 1999,2000,2001 by Erik Andersen +# Copyright (C) 1999-2002 Erik Andersen # # 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 @@ -17,45 +17,14 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -TOPDIR :=../.. -L_TARGET := libunarchive.a - -obj-y := unarchive.o seek_sub_file.o -obj-n := -obj- := - -ifeq ($(CONFIG_DPKG),y) - obj-y += deb_extract.o get_header_ar.o get_header_tar.o -endif - -ifeq ($(CONFIG_DPKG_DEB),y) - obj-y += deb_extract.o get_header_ar.o get_header_tar.o -endif - -ifeq ($(CONFIG_AR),y) - obj-y += get_header_ar.o -endif - -ifeq ($(CONFIG_CPIO),y) - obj-y += get_header_cpio.o -endif - -ifeq ($(CONFIG_RPM2CPIO),y) - obj-y += get_header_cpio.o -endif - -ifeq ($(CONFIG_TAR),y) - obj-y += get_header_tar.o -endif - -ifeq ($(CONFIG_UNZIP),y) - obj-y += get_header_zip.o -endif - - -# Hand off to toplevel Rules.mak -include $(TOPDIR)/Rules.mak +TOPDIR:= ../../ +LIBUNARCHIVE_DIR:=./ +include $(TOPDIR).config +include $(TOPDIR)Rules.mak +include Makefile.in +all: $(libraries-y) +-include $(TOPDIR).depend clean: - rm -f $(L_TARGET) *.o core + rm -f *.o *.a $(AR_TARGET) diff --git a/archival/libunarchive/Makefile.in b/archival/libunarchive/Makefile.in new file mode 100644 index 000000000..cd68be732 --- /dev/null +++ b/archival/libunarchive/Makefile.in @@ -0,0 +1,38 @@ +# Makefile for busybox +# +# Copyright (C) 1999-2002 by Erik Andersen +# +# 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 +# + +LIBUNARCHIVE_AR:=libunarchive.a +ifndef $(LIBUNARCHIVE_DIR) +LIBUNARCHIVE_DIR:=$(TOPDIR)archival/libunarchive/ +endif + +LIBUNARCHIVE-y:=unarchive.o seek_sub_file.o +LIBUNARCHIVE-$(CONFIG_DPKG) += deb_extract.o get_header_ar.o get_header_tar.o +LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += deb_extract.o get_header_ar.o get_header_tar.o +LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o +LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o +LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += get_header_cpio.o +LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o +LIBUNARCHIVE-$(CONFIG_UNZIP) += get_header_zip.o + +libraries-y+=$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR) + +$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) + $(AR) -ro $@ $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y)) + -- cgit v1.2.3