From ba2bea5aa5d50ed66bff25ffb7c24a61d0db3976 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 10 Jul 2007 12:14:36 +0000 Subject: [PATCH] Drop a bunch of almost-empty Makefiles which are of no real use. Instead unconditionally include _all_ northbridge/southbridge/superio Makefiles, but put 'ifeq's in each of them to guard against including unwanted contents. This may sound like it's very slow when there are many Makefiles, but in practice the speed difference is neglectable. A few ad hoc tests I did showed no measurable speed differences at all (I used 30 or 40 sample Makefiles). Signed-off-by: Uwe Hermann Acked-by: Stefan Reinauer git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@440 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- Makefile | 6 ++--- northbridge/Makefile | 24 -------------------- northbridge/amd/Makefile | 25 --------------------- northbridge/amd/geodelx/Makefile | 9 ++++++-- northbridge/intel/Makefile | 25 --------------------- northbridge/intel/i440bxemulation/Makefile | 3 +++ southbridge/Makefile | 24 -------------------- southbridge/amd/Makefile | 26 ---------------------- southbridge/amd/cs5536/Makefile | 6 ++++- southbridge/intel/Makefile | 26 ---------------------- southbridge/intel/i82371eb/Makefile | 6 ++++- superio/Makefile | 23 ------------------- superio/winbond/Makefile | 25 --------------------- superio/winbond/w83627hf/Makefile | 3 +++ 14 files changed, 26 insertions(+), 205 deletions(-) delete mode 100644 northbridge/Makefile delete mode 100644 northbridge/amd/Makefile delete mode 100644 northbridge/intel/Makefile delete mode 100644 southbridge/Makefile delete mode 100644 southbridge/amd/Makefile delete mode 100644 southbridge/intel/Makefile delete mode 100644 superio/Makefile delete mode 100644 superio/winbond/Makefile diff --git a/Makefile b/Makefile index f0c4a20d17..37613c9972 100644 --- a/Makefile +++ b/Makefile @@ -109,9 +109,9 @@ CFLAGS += -nostdinc -isystem `$(CC) -print-file-name=include` include lib/Makefile include device/Makefile include mainboard/$(MAINBOARDDIR)/Makefile -include northbridge/Makefile -include southbridge/Makefile -include superio/Makefile +include northbridge/*/*/Makefile +include southbridge/*/*/Makefile +include superio/*/*/Makefile include arch/$(ARCH)/Makefile endif diff --git a/northbridge/Makefile b/northbridge/Makefile deleted file mode 100644 index 9d78ab966b..0000000000 --- a/northbridge/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -include $(src)/northbridge/amd/Makefile -include $(src)/northbridge/intel/Makefile - diff --git a/northbridge/amd/Makefile b/northbridge/amd/Makefile deleted file mode 100644 index 0cdaf6c254..0000000000 --- a/northbridge/amd/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -ifeq ($(CONFIG_NORTHBRIDGE_AMD_GEODELX),y) - include $(src)/northbridge/amd/geodelx/Makefile -endif - diff --git a/northbridge/amd/geodelx/Makefile b/northbridge/amd/geodelx/Makefile index 5d1d9890c9..ca90ea9a88 100644 --- a/northbridge/amd/geodelx/Makefile +++ b/northbridge/amd/geodelx/Makefile @@ -19,10 +19,15 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -STAGE2_CHIPSET_OBJ += $(obj)/northbridge/amd/geodelx/geodelx.o $(obj)/northbridge/amd/geodelx/geodelxinit.o +ifeq ($(CONFIG_NORTHBRIDGE_AMD_GEODELX),y) -$(obj)/northbridge/amd/geodelx/%.o: $(src)/northbridge/amd/geodelx/%.c $(obj)/statictree.h +STAGE2_CHIPSET_OBJ += $(obj)/northbridge/amd/geodelx/geodelx.o \ + $(obj)/northbridge/amd/geodelx/geodelxinit.o + +$(obj)/northbridge/amd/geodelx/%.o: $(src)/northbridge/amd/geodelx/%.c \ + $(obj)/statictree.h $(Q)mkdir -p $(obj)/northbridge/amd/geodelx $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ +endif diff --git a/northbridge/intel/Makefile b/northbridge/intel/Makefile deleted file mode 100644 index c10c73da3e..0000000000 --- a/northbridge/intel/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -ifeq ($(CONFIG_NORTHBRIDGE_INTEL_I440BXEMULATION),y) - include $(src)/northbridge/intel/i440bxemulation/Makefile -endif - diff --git a/northbridge/intel/i440bxemulation/Makefile b/northbridge/intel/i440bxemulation/Makefile index 6f9e25a096..73e3fe285a 100644 --- a/northbridge/intel/i440bxemulation/Makefile +++ b/northbridge/intel/i440bxemulation/Makefile @@ -19,6 +19,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_NORTHBRIDGE_INTEL_I440BXEMULATION),y) + STAGE2_CHIPSET_OBJ += $(obj)/northbridge/intel/i440bxemulation/i440bx.o $(obj)/northbridge/intel/i440bxemulation/%.o: $(src)/northbridge/intel/i440bxemulation/%.c $(obj)/statictree.h @@ -26,3 +28,4 @@ $(obj)/northbridge/intel/i440bxemulation/%.o: $(src)/northbridge/intel/i440bxemu $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ +endif diff --git a/southbridge/Makefile b/southbridge/Makefile deleted file mode 100644 index ad2bce5222..0000000000 --- a/southbridge/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -include $(src)/southbridge/amd/Makefile -include $(src)/southbridge/intel/Makefile - diff --git a/southbridge/amd/Makefile b/southbridge/amd/Makefile deleted file mode 100644 index 675478ff19..0000000000 --- a/southbridge/amd/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -# One entry like the below for each supported AMD southbridge. -ifeq ($(CONFIG_SOUTHBRIDGE_AMD_CS5536),y) - include $(src)/southbridge/amd/cs5536/Makefile -endif - diff --git a/southbridge/amd/cs5536/Makefile b/southbridge/amd/cs5536/Makefile index 461c08fbbe..fe5d2f54d6 100644 --- a/southbridge/amd/cs5536/Makefile +++ b/southbridge/amd/cs5536/Makefile @@ -19,10 +19,14 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_SOUTHBRIDGE_AMD_CS5536),y) + STAGE2_CHIPSET_OBJ += $(obj)/southbridge/amd/cs5536/cs5536.o -$(obj)/southbridge/amd/cs5536/%.o: $(src)/southbridge/amd/cs5536/%.c $(obj)/statictree.h +$(obj)/southbridge/amd/cs5536/%.o: $(src)/southbridge/amd/cs5536/%.c \ + $(obj)/statictree.h $(Q)mkdir -p $(obj)/southbridge/amd/cs5536/ $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ +endif diff --git a/southbridge/intel/Makefile b/southbridge/intel/Makefile deleted file mode 100644 index 114733eabf..0000000000 --- a/southbridge/intel/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -# One entry like the below for each supported Intel southbridge. -ifeq ($(CONFIG_SOUTHBRIDGE_INTEL_I82371EB),y) - include $(src)/southbridge/intel/i82371eb/Makefile -endif - diff --git a/southbridge/intel/i82371eb/Makefile b/southbridge/intel/i82371eb/Makefile index 37c28cb9dd..0d396213eb 100644 --- a/southbridge/intel/i82371eb/Makefile +++ b/southbridge/intel/i82371eb/Makefile @@ -18,10 +18,14 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_SOUTHBRIDGE_INTEL_I82371EB),y) + STAGE2_CHIPSET_OBJ += $(obj)/southbridge/intel/i82371eb/i82371eb.o -$(obj)/southbridge/intel/i82371eb/%.o: $(src)/southbridge/intel/i82371eb/%.c $(obj)/statictree.h +$(obj)/southbridge/intel/i82371eb/%.o: $(src)/southbridge/intel/i82371eb/%.c \ + $(obj)/statictree.h $(Q)mkdir -p $(obj)/southbridge/intel/i82371eb/ $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ +endif diff --git a/superio/Makefile b/superio/Makefile deleted file mode 100644 index 8c983d3a29..0000000000 --- a/superio/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -include $(src)/superio/winbond/Makefile - diff --git a/superio/winbond/Makefile b/superio/winbond/Makefile deleted file mode 100644 index 49f24b6d5f..0000000000 --- a/superio/winbond/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -## -## This file is part of the LinuxBIOS project. -## -## Copyright (C) 2007 coresystems GmbH -## (Written by Stefan Reinauer for coresystems GmbH) -## -## 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -## - -ifeq ($(CONFIG_SUPERIO_WINBOND_W83627HF),y) - include $(src)/superio/winbond/w83627hf/Makefile -endif - diff --git a/superio/winbond/w83627hf/Makefile b/superio/winbond/w83627hf/Makefile index 1bdfc7804f..4001062b7c 100644 --- a/superio/winbond/w83627hf/Makefile +++ b/superio/winbond/w83627hf/Makefile @@ -19,6 +19,8 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +ifeq ($(CONFIG_SUPERIO_WINBOND_W83627HF),y) + # Always add to variables, as there could be more than one Super I/O. STAGE2_CHIPSET_OBJ += $(obj)/superio/winbond/w83627hf/superio.o @@ -27,3 +29,4 @@ $(obj)/superio/winbond/w83627hf/%.o: $(src)/superio/winbond/w83627hf/%.c $(obj)/ $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" $(Q)$(CC) $(INITCFLAGS) -c $< -o $@ +endif