obj-y += drivers/
obj-$(CONFIG_PPC) += lib_powerpc/
-ifneq ($(filter mpc83xx mpc8xx ppc4xx,$(CPU)),)
-obj-y += cpu/$(CPU)/
-endif
-ifneq ($(filter lwmon lwmon5 netta pdm360ng,$(BOARD)),)
+obj-$(CONFIG_MPC83xx) += cpu/mpc83xx/
+obj-$(CONFIG_8xx) += cpu/mpc8xx/
+obj-$(CONFIG_4xx) += cpu/ppc4xx/
+ifneq ($(filter lwmon5 pdm360ng,$(BOARD)),)
obj-y += board/$(BOARD)/
endif