Use the gnu make .SILENT: mechanism instead of requiring

$(Q) in front of every silent line.

make V=1 or make Q="" still make make noisy again.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4581 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Patrick Georgi 2009-08-25 19:38:46 +00:00
parent 698c0e0e5a
commit 2b7418ecc6
6 changed files with 132 additions and 129 deletions

View File

@ -53,8 +53,11 @@ HAVE_DOTCONFIG := $(wildcard .config)
MAKEFLAGS += -rR --no-print-directory MAKEFLAGS += -rR --no-print-directory
# Make is silent per default, but 'make V=1' will show all compiler calls. # Make is silent per default, but 'make V=1' will show all compiler calls.
ifneq ($(V),1)
Q:=@ Q:=@
ifneq ($(V),1)
ifneq ($(Q),)
.SILENT:
endif
endif endif
CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E
@ -101,14 +104,14 @@ all: coreboot
CBFSTOOL:=$(obj)/util/cbfstool/cbfstool CBFSTOOL:=$(obj)/util/cbfstool/cbfstool
$(obj)/mainboard/$(MAINBOARDDIR)/config.py: $(yapps2_py) $(config_g) $(obj)/mainboard/$(MAINBOARDDIR)/config.py: $(yapps2_py) $(config_g)
$(Q)mkdir -p $(obj)/mainboard/$(MAINBOARDDIR) mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)
$(Q)python $(yapps2_py) $(config_g) $(obj)/mainboard/$(MAINBOARDDIR)/config.py python $(yapps2_py) $(config_g) $(obj)/mainboard/$(MAINBOARDDIR)/config.py
# needed objects that every mainboard uses # needed objects that every mainboard uses
# Creation of these is architecture and mainboard independent # Creation of these is architecture and mainboard independent
$(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/Config.lb $(obj)/mainboard/$(MAINBOARDDIR)/config.py $(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/Config.lb $(obj)/mainboard/$(MAINBOARDDIR)/config.py
$(Q)mkdir -p $(obj)/mainboard/$(MAINBOARDDIR) mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)
(cd $(obj)/mainboard/$(MAINBOARDDIR) ; PYTHONPATH=$(top)/util/sconfig export PYTHONPATH; python config.py $(MAINBOARDDIR) $(top) $(obj)/mainboard/$(MAINBOARDDIR)) (cd $(obj)/mainboard/$(MAINBOARDDIR) ; PYTHONPATH=$(top)/util/sconfig export PYTHONPATH; python config.py $(MAINBOARDDIR) $(top) $(obj)/mainboard/$(MAINBOARDDIR))
$(obj)/mainboard/$(MAINBOARDDIR)/static.o: $(obj)/mainboard/$(MAINBOARDDIR)/static.c $(obj)/mainboard/$(MAINBOARDDIR)/static.o: $(obj)/mainboard/$(MAINBOARDDIR)/static.c
@ -144,49 +147,49 @@ $(eval $(call evaluate_subdirs))
define objs_c_template define objs_c_template
$(obj)/$(1)%.o: src/$(1)%.c $(obj)/$(1)%.o: src/$(1)%.c
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef endef
define objs_S_template define objs_S_template
$(obj)/$(1)%.o: src/$(1)%.S $(obj)/$(1)%.o: src/$(1)%.S
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
endef endef
define initobjs_c_template define initobjs_c_template
$(obj)/$(1)%.o: src/$(1)%.c $(obj)/$(1)%.o: src/$(1)%.c
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef endef
define initobjs_S_template define initobjs_S_template
$(obj)/$(1)%.o: src/$(1)%.S $(obj)/$(1)%.o: src/$(1)%.S
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
endef endef
define drivers_c_template define drivers_c_template
$(obj)/$(1)%.o: src/$(1)%.c $(obj)/$(1)%.o: src/$(1)%.c
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef endef
define drivers_S_template define drivers_S_template
$(obj)/$(1)%.o: src/$(1)%.S $(obj)/$(1)%.o: src/$(1)%.S
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$<
endef endef
define smmobjs_c_template define smmobjs_c_template
$(obj)/$(1)%.o: src/$(1)%.c $(obj)/$(1)%.o: src/$(1)%.c
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef endef
define smmobjs_S_template define smmobjs_S_template
$(obj)/$(1)%.o: src/$(1)%.S $(obj)/$(1)%.o: src/$(1)%.S
@printf " CC $$(subst $$(shell pwd)/,,$$(@))\n" @printf " CC $$(subst $$(shell pwd)/,,$$(@))\n"
$(Q)$(CC) -m32 $$(CFLAGS) -c -o $$@ $$< $(CC) -m32 $$(CFLAGS) -c -o $$@ $$<
endef endef
usetemplate=$(foreach d,$(sort $(dir $($(1)))),$(eval $(call $(1)_$(2)_template,$(subst $(obj)/,,$(d))))) usetemplate=$(foreach d,$(sort $(dir $($(1)))),$(eval $(call $(1)_$(2)_template,$(subst $(obj)/,,$(d)))))
@ -241,47 +244,47 @@ coreboot: prepare prepare2 $(obj)/coreboot.rom
endif endif
prepare: prepare:
$(Q)mkdir -p $(obj) mkdir -p $(obj)
$(Q)mkdir -p $(obj)/util/kconfig/lxdialog mkdir -p $(obj)/util/kconfig/lxdialog
$(Q)test -n "$(alldirs)" && mkdir -p $(alldirs) || true test -n "$(alldirs)" && mkdir -p $(alldirs) || true
prepare2: prepare2:
@printf " GEN $(subst $(shell pwd)/,,$(obj)/build.h)\n" @printf " GEN $(subst $(shell pwd)/,,$(obj)/build.h)\n"
$(Q)printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" > $(obj)/build.h printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" > $(obj)/build.h
$(Q)printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.h printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_V2 \"$(COREBOOT_V2)\"\n" >> $(obj)/build.h printf "#define COREBOOT_V2 \"$(COREBOOT_V2)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.h printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.h
$(Q)printf "\n" >> $(obj)/build.h printf "\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILER \"$(shell LANG= $(CC) --version | head -n1)\"\n" >> $(obj)/build.h printf "#define COREBOOT_COMPILER \"$(shell LANG= $(CC) --version | head -n1)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_ASSEMBLER \"$(shell LANG= $(AS) --version | head -n1)\"\n" >> $(obj)/build.h printf "#define COREBOOT_ASSEMBLER \"$(shell LANG= $(AS) --version | head -n1)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_LINKER \"$(shell LANG= $(LD) --version | head -n1)\"\n" >> $(obj)/build.h printf "#define COREBOOT_LINKER \"$(shell LANG= $(LD) --version | head -n1)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_TIME \"`LANG= date +%T`\"\n" >> $(obj)/build.h printf "#define COREBOOT_COMPILE_TIME \"`LANG= date +%T`\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_BY \"$(shell PATH=$$PATH:/usr/ucb whoami)\"\n" >> $(obj)/build.h printf "#define COREBOOT_COMPILE_BY \"$(shell PATH=$$PATH:/usr/ucb whoami)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_HOST \"$(shell hostname)\"\n" >> $(obj)/build.h printf "#define COREBOOT_COMPILE_HOST \"$(shell hostname)\"\n" >> $(obj)/build.h
$(Q)printf "#define COREBOOT_COMPILE_DOMAIN \"$(shell test `uname -s` = "Linux" && dnsdomainname || domainname)\"\n" >> $(obj)/build.h printf "#define COREBOOT_COMPILE_DOMAIN \"$(shell test `uname -s` = "Linux" && dnsdomainname || domainname)\"\n" >> $(obj)/build.h
$(Q)printf "#include \"config.h\"\n" >> $(obj)/build.h printf "#include \"config.h\"\n" >> $(obj)/build.h
doxy: doxygen doxy: doxygen
doxygen: doxygen:
$(Q)$(DOXYGEN) Doxyfile $(DOXYGEN) Doxyfile
doxyclean: doxygen-clean doxyclean: doxygen-clean
doxygen-clean: doxygen-clean:
$(Q)rm -rf $(DOXYGEN_OUTPUT_DIR) rm -rf $(DOXYGEN_OUTPUT_DIR)
clean: doxygen-clean clean: doxygen-clean
$(Q)rm -f $(allobjs) build/coreboot* .xcompile rm -f $(allobjs) build/coreboot* .xcompile
$(Q)rm -f build/option_table.* build/crt0_includes.h build/ldscript rm -f build/option_table.* build/crt0_includes.h build/ldscript
$(Q)rm -f $(obj)/mainboard/$(MAINBOARDDIR)/static.c $(obj)/mainboard/$(MAINBOARDDIR)/config.py $(obj)/mainboard/$(MAINBOARDDIR)/static.dot rm -f $(obj)/mainboard/$(MAINBOARDDIR)/static.c $(obj)/mainboard/$(MAINBOARDDIR)/config.py $(obj)/mainboard/$(MAINBOARDDIR)/static.dot
$(Q)rm -f $(obj)/mainboard/$(MAINBOARDDIR)/auto.inc $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s $(obj)/mainboard/$(MAINBOARDDIR)/crt0.disasm rm -f $(obj)/mainboard/$(MAINBOARDDIR)/auto.inc $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s $(obj)/mainboard/$(MAINBOARDDIR)/crt0.disasm
$(Q)rmdir -p $(alldirs) 2>/dev/null >/dev/null || true rmdir -p $(alldirs) 2>/dev/null >/dev/null || true
distclean: clean distclean: clean
$(Q)rm -rf build rm -rf build
$(Q)rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig*
update: update:
$(Q)dongle.py -c /dev/term/1 build/coreboot.rom EOF dongle.py -c /dev/term/1 build/coreboot.rom EOF
# This include must come _before_ the pattern rules below! # This include must come _before_ the pattern rules below!
# Order _does_ matter for pattern rules. # Order _does_ matter for pattern rules.
@ -289,7 +292,7 @@ include util/kconfig/Makefile
$(obj)/ldoptions: $(obj)/config.h $(obj)/ldoptions: $(obj)/config.h
# cat $(obj)/config.h | grep -v \" |grep -v AUTOCONF_INCLUDED | grep \#define | sed s/\#define\ // | sed s/\ /\ =\ / | sed 's/$$/;/' > $(obj)/ldoptions # cat $(obj)/config.h | grep -v \" |grep -v AUTOCONF_INCLUDED | grep \#define | sed s/\#define\ // | sed s/\ /\ =\ / | sed 's/$$/;/' > $(obj)/ldoptions
$(Q)awk '/^#define ([^"])* ([^"])*$$/ {print $$2 " = " $$3 ";";}' $< > $@ awk '/^#define ([^"])* ([^"])*$$/ {print $$2 " = " $$3 ";";}' $< > $@
$(obj)/romcc: $(top)/util/romcc/romcc.c $(obj)/romcc: $(top)/util/romcc/romcc.c
@printf " HOSTCC romcc" @printf " HOSTCC romcc"

View File

@ -14,24 +14,24 @@ BOOTBLOCK_SIZE=65536
# Build the final rom image # Build the final rom image
$(obj)/coreboot.rom: $(obj)/coreboot.bootblock $(obj)/coreboot_ram $(CBFSTOOL) $(obj)/coreboot.rom: $(obj)/coreboot.bootblock $(obj)/coreboot_ram $(CBFSTOOL)
$(Q)rm -f $@ rm -f $@
$(Q)$(CBFSTOOL) $@ create $(shell expr 1024 \* $(CONFIG_COREBOOT_ROMSIZE_KB)) $(BOOTBLOCK_SIZE) $(obj)/coreboot.bootblock $(CBFSTOOL) $@ create $(shell expr 1024 \* $(CONFIG_COREBOOT_ROMSIZE_KB)) $(BOOTBLOCK_SIZE) $(obj)/coreboot.bootblock
$(Q)if [ -f fallback/coreboot_apc ]; \ if [ -f fallback/coreboot_apc ]; \
then \ then \
$(Q)$(CBFSTOOL) $@ add-stage fallback/coreboot_apc fallback/coreboot_apc $(CBFS_COMPRESS_FLAG); \ $(CBFSTOOL) $@ add-stage fallback/coreboot_apc fallback/coreboot_apc $(CBFS_COMPRESS_FLAG); \
fi fi
$(Q)$(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram fallback/coreboot_ram $(CBFS_COMPRESS_FLAG) $(CBFSTOOL) $@ add-stage $(obj)/coreboot_ram fallback/coreboot_ram $(CBFS_COMPRESS_FLAG)
ifeq ($(CONFIG_PAYLOAD_NONE),y) ifeq ($(CONFIG_PAYLOAD_NONE),y)
@printf " PAYLOAD none (as specified by user)\n" @printf " PAYLOAD none (as specified by user)\n"
else else
@printf " PAYLOAD $(CONFIG_FALLBACK_PAYLOAD_FILE) $(COMPRESSFLAG)\n" @printf " PAYLOAD $(CONFIG_FALLBACK_PAYLOAD_FILE) $(COMPRESSFLAG)\n"
$(Q)$(CBFSTOOL) ./build/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE) fallback/payload $(CBFS_COMPRESS_FLAG) $(CBFSTOOL) ./build/coreboot.rom add-payload $(CONFIG_FALLBACK_PAYLOAD_FILE) fallback/payload $(CBFS_COMPRESS_FLAG)
ifeq ($(CONFIG_VGA_BIOS),y) ifeq ($(CONFIG_VGA_BIOS),y)
@printf " VGABIOS $(CONFIG_FALLBACK_VGA_BIOS_FILE) $(CONFIG_FALLBACK_VGA_BIOS_ID)\n" @printf " VGABIOS $(CONFIG_FALLBACK_VGA_BIOS_FILE) $(CONFIG_FALLBACK_VGA_BIOS_ID)\n"
$(Q)$(CBFSTOOL) ./build/coreboot.rom add $(CONFIG_FALLBACK_VGA_BIOS_FILE) "pci$(CONFIG_FALLBACK_VGA_BIOS_ID).rom" optionrom $(CBFSTOOL) ./build/coreboot.rom add $(CONFIG_FALLBACK_VGA_BIOS_FILE) "pci$(CONFIG_FALLBACK_VGA_BIOS_ID).rom" optionrom
endif endif
@printf " CBFSPRINT ./build/coreboot.rom\n\n" @printf " CBFSPRINT ./build/coreboot.rom\n\n"
$(Q)$(CBFSTOOL) build/coreboot.rom print $(CBFSTOOL) build/coreboot.rom print
endif endif
@ -40,53 +40,53 @@ endif
$(obj)/coreboot.bootblock: $(obj)/coreboot $(obj)/coreboot.bootblock: $(obj)/coreboot
@printf " OBJCOPY $(subst $(obj)/,,$(@))\n" @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
$(Q)$(OBJCOPY) -O binary $< $@ $(OBJCOPY) -O binary $< $@
$(obj)/ldscript.ld: $(ldscripts) $(obj)/ldoptions $(obj)/ldscript.ld: $(ldscripts) $(obj)/ldoptions
$(Q)printf 'INCLUDE "ldoptions"\n' > $@ printf 'INCLUDE "ldoptions"\n' > $@
$(Q)printf '$(foreach ldscript,$(ldscripts),INCLUDE "$(ldscript)"\n)' >> $@ printf '$(foreach ldscript,$(ldscripts),INCLUDE "$(ldscript)"\n)' >> $@
$(obj)/crt0_includes.h: $(crt0s) $(obj)/crt0_includes.h: $(crt0s)
$(Q)printf '$(foreach crt0,$(obj)/config.h $(crt0s),#include "$(crt0)"\n)' > $@ printf '$(foreach crt0,$(obj)/config.h $(crt0s),#include "$(crt0)"\n)' > $@
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s $(obj)/mainboard/$(MAINBOARDDIR)/crt0.o: $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s
$(Q)$(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm $(CC) -I$(obj) -Wa,-acdlns -c -o $@ $< > $(dir $@)/crt0.disasm
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(src)/arch/i386/init/crt0.S.lb $(obj)/crt0_includes.h $(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(src)/arch/i386/init/crt0.S.lb $(obj)/crt0_includes.h
$(Q)$(CC) -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@ $(CC) -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
$(obj)/coreboot: $(initobjs) $(obj)/ldscript.ld $(obj)/coreboot: $(initobjs) $(obj)/ldscript.ld
@printf " LINK $(subst $(obj)/,,$(@))\n" @printf " LINK $(subst $(obj)/,,$(@))\n"
$(Q)$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/ldscript.ld $(initobjs) $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/ldscript.ld $(initobjs)
$(Q)$(NM) -n $(obj)/coreboot | sort > $(obj)/coreboot.map $(NM) -n $(obj)/coreboot | sort > $(obj)/coreboot.map
####################################################################### #######################################################################
# i386 specific tools # i386 specific tools
$(obj)/option_table.h $(obj)/option_table.c: $(obj)/build_opt_tbl $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout $(obj)/option_table.h $(obj)/option_table.c: $(obj)/build_opt_tbl $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout
@printf " OPTION $(subst $(obj)/,,$(@))\n" @printf " OPTION $(subst $(obj)/,,$(@))\n"
$(Q)$(obj)/build_opt_tbl --config $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout --header $(obj)/option_table.h --option $(obj)/option_table.c $(obj)/build_opt_tbl --config $(top)/src/mainboard/$(MAINBOARDDIR)/cmos.layout --header $(obj)/option_table.h --option $(obj)/option_table.c
$(obj)/build_opt_tbl: $(top)/util/options/build_opt_tbl.c $(top)/src/include/pc80/mc146818rtc.h $(top)/src/include/boot/coreboot_tables.h $(obj)/build_opt_tbl: $(top)/util/options/build_opt_tbl.c $(top)/src/include/pc80/mc146818rtc.h $(top)/src/include/boot/coreboot_tables.h
@printf " HOSTCC $(subst $(obj)/,,$(@))\n" @printf " HOSTCC $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCC) $(HOSTCFLAGS) -include $(obj)/config.h $< -o $@ $(HOSTCC) $(HOSTCFLAGS) -include $(obj)/config.h $< -o $@
####################################################################### #######################################################################
# Build the coreboot_ram (stage 2) # Build the coreboot_ram (stage 2)
$(obj)/coreboot_ram: $(obj)/coreboot_ram.o $(src)/config/coreboot_ram.ld #ldoptions $(obj)/coreboot_ram: $(obj)/coreboot_ram.o $(src)/config/coreboot_ram.ld #ldoptions
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"
$(Q)$(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(src)/config/coreboot_ram.ld $(obj)/coreboot_ram.o $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(src)/config/coreboot_ram.ld $(obj)/coreboot_ram.o
$(Q)$(NM) -n $(obj)/coreboot_ram | sort > $(obj)/coreboot_ram.map $(NM) -n $(obj)/coreboot_ram | sort > $(obj)/coreboot_ram.map
$(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.o $(drivers) $(obj)/coreboot.a $(LIBGCC_FILE_NAME) $(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.o $(drivers) $(obj)/coreboot.a $(LIBGCC_FILE_NAME)
@printf " CC $(subst $(obj)/,,$(@))\n" @printf " CC $(subst $(obj)/,,$(@))\n"
$(Q)$(CC) -nostdlib -r -o $@ $(obj)/arch/i386/lib/c_start.o $(drivers) -Wl,-\( $(obj)/coreboot.a $(LIBGCC_FILE_NAME) -Wl,-\) $(CC) -nostdlib -r -o $@ $(obj)/arch/i386/lib/c_start.o $(drivers) -Wl,-\( $(obj)/coreboot.a $(LIBGCC_FILE_NAME) -Wl,-\)
$(obj)/coreboot.a: $(objs) $(obj)/coreboot.a: $(objs)
@printf " AR $(subst $(obj)/,,$(@))\n" @printf " AR $(subst $(obj)/,,$(@))\n"
$(Q)rm -f $(obj)/coreboot.a rm -f $(obj)/coreboot.a
$(Q)$(AR) cr $(obj)/coreboot.a $(objs) $(AR) cr $(obj)/coreboot.a $(objs)
####################################################################### #######################################################################
# done # done

View File

@ -18,16 +18,16 @@ cbfsobj += fs.o
cbfsinc := cbfstool.h cbfs.h cbfsinc := cbfstool.h cbfs.h
$(obj)/util/cbfstool: $(obj)/util/cbfstool:
$(Q)mkdir -p $@ mkdir -p $@
$(Q)mkdir -p $@/tools/lzma mkdir -p $@/tools/lzma
$(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/%.c $(obj)/util/cbfstool/%.o: $(top)/util/cbfstool/%.c
$(Q)printf " HOSTCC $(subst $(obj)/,,$(@))\n" printf " HOSTCC $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
$(obj)/util/cbfstool/cbfstool: $(obj)/util/cbfstool $(obj)/util/cbfstool/tools/cbfs-mkpayload $(obj)/util/cbfstool/tools/cbfs-mkstage $(addprefix $(obj)/util/cbfstool/,$(cbfsobj)) $(obj)/util/cbfstool/cbfstool: $(obj)/util/cbfstool $(obj)/util/cbfstool/tools/cbfs-mkpayload $(obj)/util/cbfstool/tools/cbfs-mkstage $(addprefix $(obj)/util/cbfstool/,$(cbfsobj))
$(Q)printf " HOSTCC $(subst $(obj)/,,$(@)) (link)\n" printf " HOSTCC $(subst $(obj)/,,$(@)) (link)\n"
$(Q)$(HOSTCC) -o $@ $(addprefix $(obj)/util/cbfstool/,$(cbfsobj)) $(HOSTCC) -o $@ $(addprefix $(obj)/util/cbfstool/,$(cbfsobj))
endif endif

View File

@ -9,15 +9,15 @@ COMMON = common.o compress.o $(LZMA_OBJ)
ifdef POST_EVALUATION ifdef POST_EVALUATION
$(tobj)/cbfs-mkstage: $(tobj)/cbfs-mkstage.o $(patsubst %,$(tobj)/%,$(COMMON)) $(tobj)/cbfs-mkstage: $(tobj)/cbfs-mkstage.o $(patsubst %,$(tobj)/%,$(COMMON))
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@)) (link)\n" printf " HOSTCXX $(subst $(obj)/,,$(@)) (link)\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $^ $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $^
$(tobj)/cbfs-mkpayload: $(tobj)/cbfs-mkpayload.o $(patsubst %,$(tobj)/%,$(COMMON)) $(tobj)/cbfs-mkpayload: $(tobj)/cbfs-mkpayload.o $(patsubst %,$(tobj)/%,$(COMMON))
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@)) (link)\n" printf " HOSTCXX $(subst $(obj)/,,$(@)) (link)\n"
$(Q)$(HOSTCXX) $(HOSTCFLAGS) -o $@ $^ $(HOSTCXX) $(HOSTCFLAGS) -o $@ $^
$(tobj)/%.o: $(tsrc)/%.c $(tobj)/%.o: $(tsrc)/%.c
$(Q)printf " HOSTCC $(subst $(obj)/,,$(@))\n" printf " HOSTCC $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
endif endif

View File

@ -26,35 +26,35 @@ LZMA_OBJ += lzma/lzma-compress.o
ifdef POST_EVALUATION ifdef POST_EVALUATION
$(tobj)/lzma/lzma-compress.o: $(tsrc)/lzma/minilzma.cc $(tobj)/lzma/lzma-compress.o: $(tsrc)/lzma/minilzma.cc
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c -DCOMPACT $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c -DCOMPACT $<
$(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Compress/LZMA/%.cpp $(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Compress/LZMA/%.cpp
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
$(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Compress/LZ/%.cpp $(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Compress/LZ/%.cpp
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
$(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Compress/RangeCoder/%.cpp $(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Compress/RangeCoder/%.cpp
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
$(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Decompress/%.cpp $(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Decompress/%.cpp
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
$(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Common/%.cpp $(tobj)/lzma/%.o: $(tsrc)/lzma/C/7zip/Common/%.cpp
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
$(tobj)/lzma/%.o: $(tsrc)/lzma/C/Common/%.cpp $(tobj)/lzma/%.o: $(tsrc)/lzma/C/Common/%.cpp
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
$(tobj)/lzma/%.o: $(tsrc)/lzma/%.cc $(tobj)/lzma/%.o: $(tsrc)/lzma/%.cc
$(Q)printf " HOSTCXX $(subst $(obj)/,,$(@))\n" printf " HOSTCXX $(subst $(obj)/,,$(@))\n"
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $< $(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c $<
endif endif

View File

@ -7,72 +7,72 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-c
Kconfig := src/Kconfig Kconfig := src/Kconfig
xconfig: prepare $(objk)/qconf xconfig: prepare $(objk)/qconf
$(Q)$(objk)/qconf $(Kconfig) $(objk)/qconf $(Kconfig)
gconfig: prepare $(objk)/gconf gconfig: prepare $(objk)/gconf
$(Q)$(objk)/gconf $(Kconfig) $(objk)/gconf $(Kconfig)
menuconfig: prepare $(objk)/mconf menuconfig: prepare $(objk)/mconf
$(Q)$(objk)/mconf $(Kconfig) $(objk)/mconf $(Kconfig)
config: prepare $(objk)/conf config: prepare $(objk)/conf
$(Q)$(objk)/conf $(Kconfig) $(objk)/conf $(Kconfig)
oldconfig: prepare $(objk)/conf oldconfig: prepare $(objk)/conf
$(Q)$(objk)/conf -o $(Kconfig) $(objk)/conf -o $(Kconfig)
silentoldconfig: prepare $(objk)/conf silentoldconfig: prepare $(objk)/conf
$(Q)$(objk)/conf -s $(Kconfig) $(objk)/conf -s $(Kconfig)
# --- UNUSED, ignore ---------------------------------------------------------- # --- UNUSED, ignore ----------------------------------------------------------
# Create new linux.pot file # Create new linux.pot file
# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
# The symlink is used to repair a deficiency in arch/um # The symlink is used to repair a deficiency in arch/um
update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
$(Q)echo " GEN config" echo " GEN config"
$(Q)xgettext --default-domain=linux \ xgettext --default-domain=linux \
--add-comments --keyword=_ --keyword=N_ \ --add-comments --keyword=_ --keyword=N_ \
--from-code=UTF-8 \ --from-code=UTF-8 \
--files-from=scripts/kconfig/POTFILES.in \ --files-from=scripts/kconfig/POTFILES.in \
--output $(obj)/config.pot --output $(obj)/config.pot
$(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
$(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch ln -fs Kconfig.i386 arch/um/Kconfig.arch
$(Q)(for i in `ls arch/`; \ (for i in `ls arch/`; \
do \ do \
echo " GEN $$i"; \ echo " GEN $$i"; \
$(obj)/kxgettext arch/$$i/Kconfig \ $(obj)/kxgettext arch/$$i/Kconfig \
>> $(obj)/config.pot; \ >> $(obj)/config.pot; \
done ) done )
$(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
--output $(obj)/linux.pot --output $(obj)/linux.pot
$(Q)rm -f arch/um/Kconfig.arch rm -f arch/um/Kconfig.arch
$(Q)rm -f $(obj)/config.pot rm -f $(obj)/config.pot
# --- UNUSED, ignore ---------------------------------------------------------- # --- UNUSED, ignore ----------------------------------------------------------
PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
randconfig: prepare $(objk)/conf randconfig: prepare $(objk)/conf
$(Q)$(objk)/conf -r $(Kconfig) $(objk)/conf -r $(Kconfig)
allyesconfig: prepare $(objk)/conf allyesconfig: prepare $(objk)/conf
$(Q)$(objk)/conf -y $(Kconfig) $(objk)/conf -y $(Kconfig)
allnoconfig: prepare $(objk)/conf allnoconfig: prepare $(objk)/conf
$(Q)$(objk)/conf -n $(Kconfig) $(objk)/conf -n $(Kconfig)
allmodconfig: prepare $(objk)/conf allmodconfig: prepare $(objk)/conf
$(Q)$(objk)/conf -m $(Kconfig) $(objk)/conf -m $(Kconfig)
defconfig: prepare $(objk)/conf defconfig: prepare $(objk)/conf
ifeq ($(KBUILD_DEFCONFIG),) ifeq ($(KBUILD_DEFCONFIG),)
$(Q)$(objk)/conf -d $(Kconfig) $(objk)/conf -d $(Kconfig)
else else
@echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
$(Q)$(objk)/conf -D $(KBUILD_DEFCONFIG) $(Kconfig) $(objk)/conf -D $(KBUILD_DEFCONFIG) $(Kconfig)
endif endif
%_defconfig: prepare $(objk)/conf %_defconfig: prepare $(objk)/conf
$(Q)$(objk)/conf -D configs/$@ $(Kconfig) $(objk)/conf -D configs/$@ $(Kconfig)
# Help text used by make help # Help text used by make help
help: help:
@ -149,7 +149,7 @@ clean-files += config.pot coreinfo.pot
PHONY += $(objk)/dochecklxdialog PHONY += $(objk)/dochecklxdialog
$(addprefix $(obj)/,$(lxdialog)): $(objk)/dochecklxdialog $(addprefix $(obj)/,$(lxdialog)): $(objk)/dochecklxdialog
$(objk)/dochecklxdialog: $(objk)/dochecklxdialog:
$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) $(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
always := dochecklxdialog always := dochecklxdialog
@ -294,44 +294,44 @@ endif
$(objk)/qconf: $(patsubst %,$(objk)/%,$(qconf-cxxobjs)) \ $(objk)/qconf: $(patsubst %,$(objk)/%,$(qconf-cxxobjs)) \
$(patsubst %,$(objk)/%,$(qconf-objs)) $(patsubst %,$(objk)/%,$(qconf-objs))
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) $(HOSTLOADLIBES_qconf) -o $@ $^ $(HOSTCXX) $(HOSTCXXFLAGS) $(HOSTLOADLIBES_qconf) -o $@ $^
$(objk)/gconf: $(patsubst %,$(objk)/%,$(gconf-objs)) $(objk)/gconf: $(patsubst %,$(objk)/%,$(gconf-objs))
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOSTLOADLIBES_gconf) -o $@ $^ $(HOSTCC) $(HOSTCFLAGS) $(HOSTLOADLIBES_gconf) -o $@ $^
$(objk)/mconf: $(patsubst %,$(objk)/%,$(mconf-objs)) $(objk)/mconf: $(patsubst %,$(objk)/%,$(mconf-objs))
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) -o $@ $^ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) -o $@ $^
$(objk)/conf: $(patsubst %,$(objk)/%,$(conf-objs)) $(objk)/conf: $(patsubst %,$(objk)/%,$(conf-objs))
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^
$(objk)/mconf.o: $(srck)/mconf.c $(objk)/mconf.o: $(srck)/mconf.c
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $< $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
$(objk)/conf.o: $(srck)/conf.c $(objk)/conf.o: $(srck)/conf.c
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $< $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<
$(objk)/zconf.tab.o: $(objk)/zconf.tab.c $(objk)/lex.zconf.c \ $(objk)/zconf.tab.o: $(objk)/zconf.tab.c $(objk)/lex.zconf.c \
$(objk)/zconf.hash.c $(objk)/zconf.hash.c
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $(objk)/zconf.tab.c $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $(objk)/zconf.tab.c
$(objk)/kconfig_load.o: $(srck)/kconfig_load.c $(objk)/lkc_defs.h $(objk)/kconfig_load.o: $(srck)/kconfig_load.c $(objk)/lkc_defs.h
$(Q)$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
$(objk)/qconf.o: $(srck)/qconf.cc $(objk)/qconf.moc $(objk)/lkc_defs.h $(objk)/qconf.o: $(srck)/qconf.cc $(objk)/qconf.moc $(objk)/lkc_defs.h
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) $(HOSTCXXFLAGS_qconf.o) -c -o $@ $< $(HOSTCXX) $(HOSTCXXFLAGS) $(HOSTCXXFLAGS_qconf.o) -c -o $@ $<
$(objk)/gconf.o: $(srck)/gconf.c $(objk)/lkc_defs.h $(objk)/gconf.o: $(srck)/gconf.c $(objk)/lkc_defs.h
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_gconf.o) -c -o $@ $< $(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_gconf.o) -c -o $@ $<
$(objk)/%.moc: $(srck)/%.h $(objk)/%.moc: $(srck)/%.h
$(Q)$(KC_QT_MOC) -i $< -o $@ $(KC_QT_MOC) -i $< -o $@
$(objk)/lkc_defs.h: $(srck)/lkc_proto.h $(objk)/lkc_defs.h: $(srck)/lkc_proto.h
$(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
$(objk)/lex.zconf.c: $(srck)/lex.zconf.c_shipped $(objk)/lex.zconf.c: $(srck)/lex.zconf.c_shipped
$(Q)cp $< $@ cp $< $@
$(objk)/zconf.hash.c: $(srck)/zconf.hash.c_shipped $(objk)/zconf.hash.c: $(srck)/zconf.hash.c_shipped
$(Q)cp $< $@ cp $< $@
$(objk)/zconf.tab.c: $(srck)/zconf.tab.c_shipped $(objk)/zconf.tab.c: $(srck)/zconf.tab.c_shipped
$(Q)cp $< $@ cp $< $@
$(objk)/lxdialog/lxdialog: $(objk)/dochecklxdialog \ $(objk)/lxdialog/lxdialog: $(objk)/dochecklxdialog \
$(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) $(patsubst %,$(objk)/lxdialog/%,$(lxdialog))
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) \ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) \
$(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) -o $@ $(patsubst %,$(objk)/lxdialog/%,$(lxdialog)) -o $@
$(objk)/lxdialog/%.o: $(srck)/lxdialog/%.c $(objk)/lxdialog/%.o: $(srck)/lxdialog/%.c
$(Q)$(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $^ -c -o $@ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) $^ -c -o $@