diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -148,31 +148,31 @@ $(obj)/$(1)%.o: src/$(1)%.asl endef define objs_c_template -$(obj)/$(1)%.o: src/$(1)%.c $(obj)/build.h +$(obj)/$(1)%.o: src/$(1)%.c $(obj)/config.h @printf " CC $$(subst $$(obj)/,,$$(@))\n" $(CC) -m32 $$(CFLAGS) -c -o $$@ $$< endef define objs_S_template -$(obj)/$(1)%.o: src/$(1)%.S $(obj)/build.h +$(obj)/$(1)%.o: src/$(1)%.S $(obj)/config.h @printf " CC $$(subst $$(obj)/,,$$(@))\n" $(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$< endef define initobjs_c_template -$(obj)/$(1)%.o: src/$(1)%.c $(obj)/build.h +$(obj)/$(1)%.o: src/$(1)%.c $(obj)/config.h @printf " CC $$(subst $$(obj)/,,$$(@))\n" $(CC) -m32 $$(CFLAGS) -c -o $$@ $$< endef define initobjs_S_template -$(obj)/$(1)%.o: src/$(1)%.S $(obj)/build.h +$(obj)/$(1)%.o: src/$(1)%.S $(obj)/config.h @printf " CC $$(subst $$(obj)/,,$$(@))\n" $(CC) -m32 -DASSEMBLY $$(CFLAGS) -c -o $$@ $$< endef define drivers_c_template -$(obj)/$(1)%.o: src/$(1)%.c $(obj)/build.h +$(obj)/$(1)%.o: src/$(1)%.c $(obj)/config.h @printf " CC $$(subst $$(obj)/,,$$(@))\n" $(CC) -m32 $$(CFLAGS) -c -o $$@ $$< endef @@ -219,7 +219,7 @@ OBJS := $(patsubst %,$(obj)/%,$(TARGETS-y)) INCLUDES := -I$(top)/src -I$(top)/src/include -I$(obj) -I$(top)/src/arch/$(ARCHDIR-y)/include INCLUDES += -I$(shell $(CC) -print-search-dirs | head -n 1 | cut -d' ' -f2)include INCLUDES += -I$(top)/util/x86emu/include -INCLUDES += -include $(obj)/build.h +INCLUDES += -include $(obj)/config.h CFLAGS = $(INCLUDES) -Os -nostdinc CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes @@ -250,7 +250,10 @@ prepare2: $(obj)/build.h $(obj)/build.h: @printf " GEN build.h\n" rm -f $(obj)/build.h - printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" > $(obj)/build.ht + printf "/* build system definitions (autogenerated) */\n" > $(obj)/build.ht + printf "#ifndef __BUILD_H\n" >> $(obj)/build.ht + printf "#define __BUILD_H\n\n" >> $(obj)/build.ht + printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" >> $(obj)/build.ht printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.ht printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.ht printf "\n" >> $(obj)/build.ht @@ -261,7 +264,7 @@ $(obj)/build.h: printf "#define COREBOOT_COMPILE_BY \"$(subst \,@,$(shell PATH=$$PATH:/usr/ucb whoami))\"\n" >> $(obj)/build.ht printf "#define COREBOOT_COMPILE_HOST \"$(shell hostname -s)\"\n" >> $(obj)/build.ht printf "#define COREBOOT_COMPILE_DOMAIN \"$(shell test `uname -s` = "Linux" && dnsdomainname || domainname)\"\n" >> $(obj)/build.ht - printf "#include \"config.h\"\n" >> $(obj)/build.ht + printf "#endif\n" >> $(obj)/build.ht mv $(obj)/build.ht $(obj)/build.h doxy: doxygen |