3 SCRIPT_DIR
=$(BASE_DIR
)/scripts
4 KCONFIG_DIR
=$(SCRIPT_DIR
)/kconfig
5 CONFIG_DIR
=$(BASE_DIR
)/config
7 SOURCE_DIR
=$(BASE_DIR
)/sources
8 BUILD_DIR
=$(BASE_DIR
)/work
9 INITRD_DIR
=$(BASE_DIR
)/initrd-rootfs
10 STAGING_DIR
=$(BASE_DIR
)/staging
11 SKELETON_DIR
=$(BASE_DIR
)/skeleton
12 OUTPUT_DIR
=$(BASE_DIR
)/deploy
13 PACKAGE_DIR
=$(BASE_DIR
)/packages
14 BIN_DIR
=$(BASE_DIR
)/bin
16 ifeq (.config
, $(wildcard .config
))
23 ifneq ($(filter config
%config
,$(MAKECMDGOALS
)),)
28 ifeq ($(dot-config
),0)
32 @echo
"Configuration completed - type make to build your ROM"
36 include $(CONFIG_DIR
)/platforms
/platforms.conf
37 include $(CONFIG_DIR
)/payloads
/payloads.conf
39 # Include the global settings and other checks
40 include $(SCRIPT_DIR
)/Build.settings
42 # Construct the list of packages we will be building
44 PKGLIST
= linuxbios
$(PAYLOAD-y
) $(HOSTTOOLS-y
)
46 # Construct the various targets
48 PKG_clean
=$(patsubst %, %-clean, $(PKGLIST
))
49 PKG_distclean
=$(patsubst %, %-distclean, $(PKGLIST
))
51 all: $(HOSTTOOLS-y
) payload linuxbios
53 payload
: $(PAYLOAD_TARGET
)
56 @
rm -rf
$(INITRD_DIR
) $(OUTPUT_DIR
)
58 distclean: $(PKG_distclean
)
59 @
rm -rf
$(OUTPUT_DIR
) $(STAGING_DIR
) $(INITRD_DIR
)
60 @
rm -f
$(BASE_DIR
).config
62 # Include the payload builder
64 ifneq ($(PAYLOAD_BUILD
),)
65 include $(PAYLOAD_BUILD
)
68 # The following code gets all the make targets, but filters out the kernel
69 # targets which are implicitly set by the platform configuration
71 MKTARGETS
:= $(shell ls
$(PACKAGE_DIR
)/*/*.mk
)
73 include $(filter-out $(PACKAGE_DIR
)/kernel
/% $(PACKAGE_DIR
)/linuxbios
/%,$(MKTARGETS
))
75 include $(KERNEL_MK
) $(LINUXBIOS_MK
)
80 @ make
-C
$(KCONFIG_DIR
) clean
82 @
rm -f .config tmpconfig.h .kconfig.d .config.old
84 ifeq ($(config-targets
),1)
87 make
-C
$(KCONFIG_DIR
) conf
89 textconfig
: $(KCONFIG_DIR
)/conf
90 @
$(KCONFIG_DIR
)/conf
$(BASE_DIR
)/Config.in
92 oldconfig
: $(KCONFIG_DIR
)/conf
93 @
$(KCONFIG_DIR
)/conf
-o
$(BASE_DIR
)/Config.in
95 defconfig
: $(KCONFIG_DIR
)/conf
96 @
$(KCONFIG_DIR
)/conf
-d
$(BASE_DIR
)/Config.in