Skip to content

Commit

Permalink
kbuild: refactor some makefiles
Browse files Browse the repository at this point in the history
[1] Move driver/core/, driver/input/ and drivers/input/ entries
    from the top Makefile to drivers/Makefile

[2] Remove the conditional by CONFIG_DM in drivers/core/Makefile
    because the whole drivers/core directory is already selected
    by CONFIG_DM in the upper level

[3] Likewise for CONFIG_DM_DEMO in drivers/demo/Makefile

[4] Simplify common/Makefile - both CONFIG_DDR_SPD and
    CONFIG_SPD_EEPROM are boolean macros so they can directly
    select objects

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Marek Vasut <[email protected]>
  • Loading branch information
masahir0y authored and trini committed Sep 24, 2014
1 parent d660b40 commit f494e0a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 12 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,9 @@ libs-y += fs/
libs-y += net/
libs-y += disk/
libs-y += drivers/
libs-$(CONFIG_DM) += drivers/core/
libs-y += drivers/dma/
libs-y += drivers/gpio/
libs-y += drivers/i2c/
libs-y += drivers/input/
libs-y += drivers/mmc/
libs-y += drivers/mtd/
libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/
Expand Down Expand Up @@ -649,7 +647,6 @@ libs-$(CONFIG_API) += api/
libs-$(CONFIG_HAS_POST) += post/
libs-y += test/
libs-y += test/dm/
libs-$(CONFIG_DM_DEMO) += drivers/demo/

ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610))
libs-y += arch/$(ARCH)/imx-common/
Expand Down
9 changes: 2 additions & 7 deletions common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,8 @@ obj-y += cmd_nvedit.o
#environment
obj-y += env_common.o
#others
ifdef CONFIG_DDR_SPD
SPD := y
endif
ifdef CONFIG_SPD_EEPROM
SPD := y
endif
obj-$(SPD) += ddr_spd.o
obj-$(CONFIG_DDR_SPD) += ddr_spd.o
obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
obj-$(CONFIG_HWCONFIG) += hwconfig.o
obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
obj-y += console.o
Expand Down
3 changes: 3 additions & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
obj-$(CONFIG_DM) += core/
obj-$(CONFIG_DM_DEMO) += demo/
obj-$(CONFIG_BIOSEMU) += bios_emulator/
obj-y += block/
obj-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount/
Expand All @@ -16,3 +18,4 @@ obj-y += watchdog/
obj-$(CONFIG_QE) += qe/
obj-y += memory/
obj-y += pwm/
obj-y += input/
2 changes: 1 addition & 1 deletion drivers/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# SPDX-License-Identifier: GPL-2.0+
#

obj-$(CONFIG_DM) := device.o lists.o root.o uclass.o util.o
obj-y := device.o lists.o root.o uclass.o util.o
2 changes: 1 addition & 1 deletion drivers/demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#

obj-$(CONFIG_DM_DEMO) += demo-uclass.o demo-pdata.o
obj-y += demo-uclass.o demo-pdata.o
obj-$(CONFIG_DM_DEMO_SIMPLE) += demo-simple.o
obj-$(CONFIG_DM_DEMO_SHAPE) += demo-shape.o

0 comments on commit f494e0a

Please sign in to comment.