coreboot/Makefile
Ronald G. Minnich 5274be0191 Add an emulation northbridge for the 440bx. The emulation is necessary
because not all emulators get the ram size registers right, or so we
hear. 

This northbridge is still incomplete. We are not just copying the v2
one, as we are trying to undo the various hacks that crept in over the
years, due to limitations in the v2 device model. Just look at the
i440bx in v2 and you can see what I mean. We are working to find a
better way to get the job done than those hacks. They are just too
confusing for people to follow. 

add an include for the northbridge makefile into the qemu Makefile. 
Re-order the includes in arch/x86/Makefile so we can pick up .o files
from other places. Add a STAGE2_CHIPSET_OBJ for objects defined in those
makefiles included in mainboard. 

Current issues: the enable_dev function for the i440bx is not getting
called. Enable_dev should be renamed to phase3_setup or something that
actually means something. The name as it is is totally useless.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@138 f3766cd6-281f-0410-b1cd-43a5c92072e9
2007-02-27 03:39:36 +00:00

110 lines
2.7 KiB
Makefile

##
## This file is part of the LinuxBIOS project.
##
## LinuxBIOS build system Lbuild
##
## Copyright (C) 2007 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
##
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 0
ARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
have_dotconfig := $(wildcard .config)
src:=$(shell pwd)
obj:=$(shell pwd)/lbobj
# Do not print "Entering directory ..."
MAKEFLAGS += --no-print-directory
CC := gcc
CFLAGS := -Os -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror-implicit-function-declaration \
-fno-strict-aliasing -fno-common \
-ffreestanding -fno-builtin
HOSTCC := gcc
HOSTCXX := g++
HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
-Wno-unused -Wno-sign-compare -Wno-pointer-sign
LINUXBIOSINCLUDE := -I$(src) -Iinclude \
-I$(src)/include \
-I$(src)/include/cpu/generic/$(ARCH)/ \
-include $(obj)/config.h
# make silent per default
Q := @
CPPFLAGS := $(LINUXBIOSINCLUDE)
CFLAGS += $(LINUXBIOSINCLUDE)
export src obj KERNELVERSION
ifeq ($(strip $(have_dotconfig)),)
all:
$(Q)echo "Please run make menuconfig, xconfig or config first."
else
include $(src)/.config
all: prepare prepare2 $(obj)/linuxbios.rom
$(Q)echo "Build process finished."
MAINBOARDDIR=$(shell echo $(CONFIG_MAINBOARD_NAME))
include lib/Makefile
include device/Makefile
include console/Makefile
include mainboard/$(MAINBOARDDIR)/Makefile
include arch/$(ARCH)/Makefile
endif
include util/Makefile
prepare:
$(Q)mkdir -p $(obj)
prepare2:
$(Q)cp $(src)/.tmpconfig.h $(obj)/config.h
clean:
$(Q)echo -n "Cleaning up... "
$(Q)rm -rf $(obj)
$(Q)echo "done"
distclean: clean
$(Q)echo -n "Deleting config files... "
$(Q)rm -f .kconfig.d .config .tmpconfig.h .config.old
$(Q)echo "done"
%.o: %.c
$(Q)echo "Compiling $<"
$(Q)$(CC) $(CFLAGS) -o $@ -c $<