diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-05-21 00:37:46 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-05-21 11:44:57 +0200 |
commit | 70d11e6f3deb0bcf190c37adc7b8c87c5888510d (patch) | |
tree | 018fc7daa39b957fef7deb92157878049588a29b /Makefile | |
parent | c3773639dbec70a109e5eddc6a729196356ecce1 (diff) | |
download | qboot-70d11e6f3deb0bcf190c37adc7b8c87c5888510d.zip qboot-70d11e6f3deb0bcf190c37adc7b8c87c5888510d.tar.gz qboot-70d11e6f3deb0bcf190c37adc7b8c87c5888510d.tar.bz2 |
compute dependencies automatically
getting serious...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -3,9 +3,11 @@ obj-y = $(obj16-y) entry.o main.o string.o printf.o cstart.o fw_cfg.o obj-y += linuxboot.o all-y = bios.bin +all: $(all-y) -CFLAGS := -O2 -Wall -g +CFLAGS := -O2 -g +BIOS_CFLAGS += $(autodepend-flags) -Wall BIOS_CFLAGS += -m32 BIOS_CFLAGS += -march=i386 BIOS_CFLAGS += -mregparm=3 @@ -14,7 +16,9 @@ BIOS_CFLAGS += -ffreestanding BIOS_CFLAGS += -Iinclude $(obj16-y): BIOS_CFLAGS += -include code16gcc.h -all: $(all-y) +dummy := $(shell mkdir -p .deps) +autodepend-flags = -MMD -MF .deps/cc-$(patsubst %/,%,$(dir $*))-$(notdir $*).d +-include .deps/*.d .PRECIOUS: %.o %.o: %.c @@ -30,3 +34,4 @@ bios.bin: bios.bin.elf clean: rm -f $(obj-y) $(all-y) bios.bin.elf + rm -rf .deps |