summaryrefslogblamecommitdiffstats
blob: 6d1ab4b523ad14340f11092c487b5d9ad847f74d (plain) (tree)





















































































































                                                                                                                                                                                                                                                  
include Rules.make

.PHONY:	components components_clean components_linux all clean help linux linux_clean linux_install install u-boot u-boot_clean u-boot_install

#==============================================================================
# Build everything rebuildable.
#==============================================================================
all: components apps

#==============================================================================
# Build components to enable all other build targets. 
#==============================================================================
components: components_linux 
components_linux: linux

#==============================================================================
# Install components
#==============================================================================
components_install: linux_install

#==============================================================================
# Clean up the targets built by 'make all'.
#==============================================================================
components_clean: linux_clean

#==============================================================================
# Build all Demos, Examples and Applications
#==============================================================================
apps: u-boot

#==============================================================================
# Install everything
#==============================================================================
apps_install: u-boot_install

#==============================================================================
# Clean all Demos, Examples and Applications
#==============================================================================
apps_clean: u-boot_clean 

#==============================================================================
# Install everything
#==============================================================================
install: components_install apps_install
#==============================================================================
# Clean up all targets.
#==============================================================================
clean: components_clean apps_clean

#==============================================================================
# A help message target.
#==============================================================================
help:
	@echo
	@echo "Available build targets are  :"
	@echo
	@echo "    components_linux               : Build the Linux components"
	@echo "    components                     : Build the components for which a rebuild is necessary to enable all other build targets listed below. You must do this at least once upon installation prior to attempting the other targets."
	@echo "    components_clean               : Remove files generated by the 'components' target"
	@echo 
	@echo "    apps                           : Build all Examples, Demos and Applications"
	@echo "    apps_clean                     : Remove all files generated by 'apps' target"
	@echo "    install                        : Install all Examples, Demos and Applications the targets in $(EXEC_DIR)"
	@echo
	@echo
	@echo "    linux                          : Build Linux kernel uImage and module"
	@echo "    linux_clean                    : Remove generated Linux kernel files"
	@echo "    linux_install                  : Install kernel binary and  modules"
	@echo
	@echo "    u-boot                         : Build the u-boot boot loader"
	@echo "    u-boot_clean                   : Remove generated u-boot files"
	@echo "    u-boot_install                 : Install the u-boot image"
	@echo
	@echo
	@echo
	@echo "    all                            : Rebuild everything"
	@echo "    clean                          : Remove all generated files"
	@echo
	@echo "    install                        : Install all the targets in "
	@echo "                            $(EXEC_DIR)"
	@echo

#==============================================================================
# Build the Linux kernel. Also, an explicit cleanup target is defined.
#==============================================================================
linux:
	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) $(DEFAULT_LINUXKERNEL_CONFIG)
	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) uImage
	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) modules
	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) $(DEFAULT_DTB_NAME)

linux_clean:
	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) mrproper
	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) clean

linux_install:
	install -d $(EXEC_DIR)/boot
	install  $(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/uImage $(EXEC_DIR)/boot
	install  $(LINUXKERNEL_INSTALL_DIR)/arch/arm/boot/dts/$(DEFAULT_DTB_NAME) $(EXEC_DIR)/boot
	install  $(LINUXKERNEL_INSTALL_DIR)/vmlinux $(EXEC_DIR)/boot
	install  $(LINUXKERNEL_INSTALL_DIR)/System.map $(EXEC_DIR)/boot
	$(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) $(LINUXKERNEL_BUILD_VARS) INSTALL_MOD_PATH=$(EXEC_DIR)/ modules_install

#==============================================================================
# Build u-boot. Also, an explicit cleanup target is defined.
#==============================================================================
u-boot: 
	$(MAKE) -C $(UBOOT_INSTALL_DIR) $(UBOOT_BUILD_VARS) $(DEFAULT_UBOOT_CONFIG)
	$(MAKE) -C $(UBOOT_INSTALL_DIR) $(UBOOT_BUILD_VARS) 

u-boot_clean:
	$(MAKE) -C $(UBOOT_INSTALL_DIR) $(UBOOT_BUILD_VARS) distclean

u-boot_install:
	install -d $(EXEC_DIR)/boot
	install $(UBOOT_INSTALL_DIR)/MLO $(EXEC_DIR)/boot
	install $(UBOOT_INSTALL_DIR)/u-boot.img $(EXEC_DIR)/boot
	install $(UBOOT_INSTALL_DIR)/u-boot.map $(EXEC_DIR)/boot