Commit 943e0a319cddac80e0dd41d43f4f6901e31747bc

Authored by Juan Quintela
Committed by Anthony Liguori
1 parent 0e22fd2f

Substitute ifdef CONFIG_FOO by obj-

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 7 additions and 15 deletions
Makefile.target
@@ -135,9 +135,7 @@ all: $(PROGS) @@ -135,9 +135,7 @@ all: $(PROGS)
135 ######################################################### 135 #########################################################
136 # cpu emulator library 136 # cpu emulator library
137 libobj-y = exec.o translate-all.o cpu-exec.o translate.o host-utils.o 137 libobj-y = exec.o translate-all.o cpu-exec.o translate.o host-utils.o
138 -ifdef CONFIG_KQEMU  
139 -libobj-y += kqemu.o  
140 -endif 138 +libobj-$(CONFIG_KQEMU) += kqemu.o
141 # TCG code generator 139 # TCG code generator
142 libobj-y += tcg/tcg.o tcg/tcg-runtime.o 140 libobj-y += tcg/tcg.o tcg/tcg-runtime.o
143 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) 141 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
@@ -176,9 +174,7 @@ endif @@ -176,9 +174,7 @@ endif
176 ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) 174 ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
177 USE_I386_DIS=y 175 USE_I386_DIS=y
178 endif 176 endif
179 -ifdef USE_I386_DIS  
180 -libobj-y += i386-dis.o  
181 -endif 177 +libobj-$(USE_I386_DIS) += i386-dis.o
182 ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) 178 ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha)
183 libobj-y += alpha-dis.o 179 libobj-y += alpha-dis.o
184 endif 180 endif
@@ -328,13 +324,12 @@ obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \ @@ -328,13 +324,12 @@ obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
328 elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o 324 elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o
329 LIBS+= $(PTHREADLIBS) 325 LIBS+= $(PTHREADLIBS)
330 LIBS+= $(CLOCKLIBS) 326 LIBS+= $(CLOCKLIBS)
331 -ifdef TARGET_HAS_BFLT  
332 -obj-y += flatload.o  
333 -endif 327 +obj-$(TARGET_HAS_BFLT) += flatload.o
  328 +
334 ifdef TARGET_HAS_ELFLOAD32 329 ifdef TARGET_HAS_ELFLOAD32
335 -obj-y += elfload32.o  
336 elfload32.o: elfload.c 330 elfload32.o: elfload.c
337 endif 331 endif
  332 +obj-$(TARGET_HAS_ELFLOAD32) += elfload32.o
338 333
339 ifeq ($(TARGET_ARCH), i386) 334 ifeq ($(TARGET_ARCH), i386)
340 obj-y += vm86.o 335 obj-y += vm86.o
@@ -547,9 +542,8 @@ LIBS += $(CONFIG_BLUEZ_LIBS) @@ -547,9 +542,8 @@ LIBS += $(CONFIG_BLUEZ_LIBS)
547 endif 542 endif
548 543
549 # xen backend driver support 544 # xen backend driver support
550 -XEN_OBJS := xen_machine_pv.o xen_domainbuild.o 545 +obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
551 ifeq ($(CONFIG_XEN), yes) 546 ifeq ($(CONFIG_XEN), yes)
552 - obj-y += $(XEN_OBJS)  
553 LIBS += $(XEN_LIBS) 547 LIBS += $(XEN_LIBS)
554 endif 548 endif
555 549
@@ -597,9 +591,7 @@ ifdef FDT_LIBS @@ -597,9 +591,7 @@ ifdef FDT_LIBS
597 obj-y += device_tree.o 591 obj-y += device_tree.o
598 LIBS+= $(FDT_LIBS) 592 LIBS+= $(FDT_LIBS)
599 endif 593 endif
600 -ifdef CONFIG_KVM  
601 -obj-y += kvm_ppc.o  
602 -endif 594 +obj-$(CONFIG_KVM) += kvm_ppc.o
603 endif 595 endif
604 ifeq ($(TARGET_BASE_ARCH), mips) 596 ifeq ($(TARGET_BASE_ARCH), mips)
605 obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o 597 obj-y += mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o