Look for actual framebuffer size instead of hardcoding UMA
[coreboot.git] / Makefile
index dfa1d8ed0f2135c5d272e1e9d5ce44eddb085576..cc3eb4ea44044d4976fcddd8af524552ad67cc40 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -170,7 +170,7 @@ $(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/devi
 
 $(objutil)/%.o: $(objutil)/%.c
        @printf "    HOSTCC     $(subst $(objutil)/,,$(@))\n"
-       $(HOSTCC) -MMD $(HOSTCFLAGS) -c -o $@ $<
+       $(HOSTCC) -MMD -I$(subst $(objutil)/,util/,$(dir $<)) -I$(dir $<) $(HOSTCFLAGS) -c -o $@ $<
 
 $(obj)/%.o: $(obj)/%.c $(obj)/config.h
        @printf "    CC         $(subst $(obj)/,,$(@))\n"
@@ -304,12 +304,11 @@ CBFS_PAYLOAD_COMPRESS_FLAG:=l
 CBFS_PAYLOAD_COMPRESS_NAME:=LZMA
 endif
 
-coreboot: prepare $(obj)/coreboot.rom
+coreboot: $(obj)/coreboot.rom
 
 endif
 
-prepare:
-       mkdir -p $(obj) $(objutil)/kconfig/lxdialog $(objutil)/cbfstool $(objutil)/romcc $(objutil)/options $(alldirs)
+$(shell mkdir -p $(obj) $(objutil)/kconfig/lxdialog $(objutil)/cbfstool $(objutil)/romcc $(objutil)/options $(alldirs))
 
 $(obj)/build.h: .xcompile
        @printf "    GEN        build.h\n"
@@ -369,19 +368,20 @@ include util/kconfig/Makefile
 $(obj)/ldoptions: $(obj)/config.h
        awk '/^#define ([^"])* ([^"])*$$/ {gsub("\\r","",$$3); print $$2 " = " $$3 ";";}' $< > $@
 
-_OS=$(shell uname -s |cut -c-7)
+_WINCHECK=$(shell uname -o 2> /dev/null)
 STACK=
-ifeq ($(_OS),MINGW32)
+ifeq ($(_WINCHECK),Msys)
        STACK=-Wl,--stack,16384000
 endif
-ifeq ($(_OS),CYGWIN_)
+ifeq ($(_WINCHECK),Cygwin)
        STACK=-Wl,--stack,16384000
 endif
+
 $(objutil)/romcc/romcc: $(top)/util/romcc/romcc.c
        @printf "    HOSTCC     $(subst $(obj)/,,$(@)) (this may take a while)\n"
        @# Note: Adding -O2 here might cause problems. For details see:
        @# http://www.coreboot.org/pipermail/coreboot/2010-February/055825.html
        $(HOSTCC) -g $(STACK) -Wall -o $@ $<
 
-.PHONY: $(PHONY) prepare clean distclean doxygen doxy coreboot .xcompile
+.PHONY: $(PHONY) clean distclean doxygen doxy coreboot .xcompile