]> git.proxmox.com Git - qemu.git/blobdiff - rules.mak
vma: implement experimental nbd server
[qemu.git] / rules.mak
index 5865e9ba93cd277104524b959f053b857b61d615..edc2552f0886c99608b97f85bd932460fa50da73 100644 (file)
--- a/rules.mak
+++ b/rules.mak
@@ -21,13 +21,9 @@ QEMU_CFLAGS += -I$(<D) -I$(@D)
        $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  CC    $(TARGET_DIR)$@")
 
 ifeq ($(LIBTOOL),)
-%.lo: %.c
-       @echo "missing libtool. please install and rerun configure"; exit 1
-%.lo: %.dtrace
-       @echo "missing libtool. please install and rerun configure."; exit 1
-
+LIBTOOL = /bin/false
 LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
-       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
+       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \
        $(LIBS),"  LINK  $(TARGET_DIR)$@")
 else
 LIBTOOL += $(if $(V),,--quiet)
@@ -39,7 +35,7 @@ LIBTOOL += $(if $(V),,--quiet)
 LINK = $(call quiet-command,\
        $(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \
        )$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
-       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
+       $(sort $(filter %.o, $1)) $(filter-out %.o, $1) $(version-obj-y) \
        $(LIBS),$(if $(filter %.lo %.la,$^),"lt LINK ", "  LINK  ")"$(TARGET_DIR)$@")
 endif
 
@@ -86,12 +82,16 @@ TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
 
 # Generate timestamp files for .h include files
 
-%.h: %.h-timestamp
-       @test -f $@ || cp $< $@
+config-%.h: config-%.h-timestamp
+       @cmp $< $@ >/dev/null 2>&1 || cp $< $@
+
+config-%.h-timestamp: config-%.mak
+       $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, "  GEN   $(TARGET_DIR)config-$*.h")
 
-%.h-timestamp: %.mak
-       $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, "  GEN   $(TARGET_DIR)$*.h")
-       @cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h
+.PHONY: clean-timestamp
+clean-timestamp:
+       rm -f *.timestamp
+clean: clean-timestamp
 
 # will delete the target of a rule if commands exit with a nonzero exit status
 .DELETE_ON_ERROR: