Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
OBJS += bios.o
OBJS += bios/bios.o
+DEPS := $(patsubst %.o,%.d,$(OBJS))
+
uname_M := $(shell uname -m | sed -e s/i.86/i386/)
ifeq ($(uname_M),i386)
DEFINES += -DCONFIG_X86_32
all: $(PROGRAM)
-$(PROGRAM): $(OBJS)
+$(PROGRAM): $(DEPS) $(OBJS)
$(E) " LINK " $@
$(Q) $(CC) $(OBJS) -o $@
+$(DEPS):
+
+%.d: %.c
+ $(Q) $(CC) -M -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
+
$(OBJS):
%.o: %.c
devices: $(KVM_DEV)
.PHONY: devices
+
+# Deps
+-include $(DEPS)