mirror of https://github.com/xqemu/xqemu.git
Generate config-devices.h
Generate config-devices.h for each target and config-all-devices.h for common library. We don't want to name both config-devices.h to avoid path problems Patchworks-ID: 35195 Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1f3d3c8fd7
commit
fe0d4d3f77
7
Makefile
7
Makefile
|
@ -40,15 +40,18 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
|
||||||
|
|
||||||
-include config-all-devices.mak
|
-include config-all-devices.mak
|
||||||
|
|
||||||
build-all: config-host.h
|
build-all: config-host.h config-all-devices.h
|
||||||
$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
|
$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)
|
||||||
|
|
||||||
config-host.h: config-host.h-timestamp
|
config-host.h: config-host.h-timestamp
|
||||||
config-host.h-timestamp: config-host.mak
|
config-host.h-timestamp: config-host.mak
|
||||||
|
|
||||||
|
config-all-devices.h: config-all-devices.h-timestamp
|
||||||
|
config-all-devices.h-timestamp: config-all-devices.mak
|
||||||
|
|
||||||
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
|
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
|
||||||
|
|
||||||
subdir-%: config-host.h
|
subdir-%: config-host.h config-all-devices.h
|
||||||
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
|
$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
|
||||||
|
|
||||||
$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
|
$(filter %-softmmu,$(SUBDIR_RULES)): libqemu_common.a
|
||||||
|
|
|
@ -30,7 +30,10 @@ kvm.o kvm-all.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
|
||||||
config-target.h: config-target.h-timestamp
|
config-target.h: config-target.h-timestamp
|
||||||
config-target.h-timestamp: config-target.mak
|
config-target.h-timestamp: config-target.mak
|
||||||
|
|
||||||
all: config-target.h
|
config-devices.h: config-devices.h-timestamp
|
||||||
|
config-devices.h-timestamp: config-devices.mak
|
||||||
|
|
||||||
|
all: config-target.h config-devices.h
|
||||||
$(call quiet-command, $(MAKE) $(PROGS),)
|
$(call quiet-command, $(MAKE) $(PROGS),)
|
||||||
|
|
||||||
# Dummy command so that make thinks it has done something
|
# Dummy command so that make thinks it has done something
|
||||||
|
|
10
config.h
10
config.h
|
@ -1,3 +1,13 @@
|
||||||
|
|
||||||
#include "config-host.h"
|
#include "config-host.h"
|
||||||
#include "config-target.h"
|
#include "config-target.h"
|
||||||
|
|
||||||
|
/* We want to include different config files for specific targets
|
||||||
|
And for the common library. They need a different name because
|
||||||
|
we don't want to rely in paths */
|
||||||
|
|
||||||
|
#if defined(NEED_CPU_H)
|
||||||
|
#include "config-devices.h"
|
||||||
|
#else
|
||||||
|
#include "config-all-devices.h"
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue