Don't limit RAM to 119MB for LAB, which was leftover from the early OLPC days.
[buildrom.git] / buildrom-devel / Makefile
blob15bf427a57c78e6cfc281349a18423e8f13f93f7
1 BASE_DIR=$(shell pwd)
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))
17 dot-config := 1
18 else
19 dot-config := 0
20 config-targets := 1
21 endif
23 ifneq ($(filter config %config,$(MAKECMDGOALS)),)
24 config-targets := 1
25 dot-config := 0
26 endif
28 ifeq ($(dot-config),0)
29 all: .config
31 .config: oldconfig
32 @echo "Configuration completed - type make to build your ROM"
33 else
34 -include .config
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)
55 clean: $(PKG_clean)
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)
66 endif
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)
77 endif
79 super-distclean:
80 @ make -C $(KCONFIG_DIR) clean
81 @ rm -rf $(BUILD_DIR)
82 @ rm -f .config tmpconfig.h .kconfig.d .config.old
84 ifeq ($(config-targets),1)
86 $(KCONFIG_DIR)/conf:
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
97 endif