Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 1 | # |
| 2 | # arch/blackfin/Makefile |
| 3 | # |
| 4 | # This file is subject to the terms and conditions of the GNU General Public |
| 5 | # License. See the file "COPYING" in the main directory of this archive |
| 6 | # for more details. |
| 7 | # |
| 8 | |
| 9 | |
| 10 | CROSS_COMPILE ?= bfin-uclinux- |
| 11 | LDFLAGS_vmlinux := -X |
| 12 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
| 13 | GZFLAGS := -9 |
| 14 | |
| 15 | CFLAGS_MODULE += -mlong-calls |
| 16 | KALLSYMS += --symbol-prefix=_ |
| 17 | |
Mike Frysinger | ca9cb6f | 2007-05-21 18:09:35 +0800 | [diff] [blame] | 18 | KBUILD_DEFCONFIG := BF537-STAMP_defconfig |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 19 | |
| 20 | # setup the machine name and the machine dependent settings |
| 21 | machine-$(CONFIG_BF531) := bf533 |
| 22 | machine-$(CONFIG_BF532) := bf533 |
| 23 | machine-$(CONFIG_BF533) := bf533 |
| 24 | machine-$(CONFIG_BF534) := bf537 |
| 25 | machine-$(CONFIG_BF536) := bf537 |
| 26 | machine-$(CONFIG_BF537) := bf537 |
Mike Frysinger | e2dd3f1 | 2007-07-24 18:20:18 +0800 | [diff] [blame] | 27 | machine-$(CONFIG_BF542) := bf548 |
| 28 | machine-$(CONFIG_BF544) := bf548 |
Roy Huang | 24a07a1 | 2007-07-12 22:41:45 +0800 | [diff] [blame] | 29 | machine-$(CONFIG_BF548) := bf548 |
| 30 | machine-$(CONFIG_BF549) := bf548 |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 31 | machine-$(CONFIG_BF561) := bf561 |
| 32 | MACHINE := $(machine-y) |
| 33 | export MACHINE |
| 34 | |
Jie Zhang | de3025f | 2007-06-25 18:04:12 +0800 | [diff] [blame] | 35 | cpu-$(CONFIG_BF531) := bf531 |
| 36 | cpu-$(CONFIG_BF532) := bf532 |
| 37 | cpu-$(CONFIG_BF533) := bf533 |
| 38 | cpu-$(CONFIG_BF534) := bf534 |
| 39 | cpu-$(CONFIG_BF536) := bf536 |
| 40 | cpu-$(CONFIG_BF537) := bf537 |
Mike Frysinger | e2dd3f1 | 2007-07-24 18:20:18 +0800 | [diff] [blame] | 41 | cpu-$(CONFIG_BF542) := bf542 |
| 42 | cpu-$(CONFIG_BF544) := bf544 |
Jie Zhang | de3025f | 2007-06-25 18:04:12 +0800 | [diff] [blame] | 43 | cpu-$(CONFIG_BF548) := bf548 |
| 44 | cpu-$(CONFIG_BF549) := bf549 |
| 45 | cpu-$(CONFIG_BF561) := bf561 |
| 46 | |
| 47 | rev-$(CONFIG_BF_REV_0_0) := 0.0 |
| 48 | rev-$(CONFIG_BF_REV_0_1) := 0.1 |
| 49 | rev-$(CONFIG_BF_REV_0_2) := 0.2 |
| 50 | rev-$(CONFIG_BF_REV_0_3) := 0.3 |
| 51 | rev-$(CONFIG_BF_REV_0_4) := 0.4 |
| 52 | rev-$(CONFIG_BF_REV_0_5) := 0.5 |
| 53 | rev-$(CONFIG_BF_REV_NONE) := none |
| 54 | rev-$(CONFIG_BF_REV_ANY) := any |
| 55 | |
| 56 | CFLAGS += -mcpu=$(cpu-y)-$(rev-y) |
| 57 | AFLAGS += -mcpu=$(cpu-y)-$(rev-y) |
Bryan Wu | 1394f03 | 2007-05-06 14:50:22 -0700 | [diff] [blame] | 58 | |
| 59 | head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o |
| 60 | |
| 61 | core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/ |
| 62 | |
| 63 | # If we have a machine-specific directory, then include it in the build. |
| 64 | ifneq ($(machine-y),) |
| 65 | core-y += arch/$(ARCH)/mach-$(MACHINE)/ |
| 66 | core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/ |
| 67 | endif |
| 68 | |
| 69 | libs-y += arch/$(ARCH)/lib/ |
| 70 | |
| 71 | drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/ |
| 72 | |
| 73 | |
| 74 | |
| 75 | # Update machine arch symlinks if something which affects |
| 76 | # them changed. We use .mach to indicate when they were updated |
| 77 | # last, otherwise make uses the target directory mtime. |
| 78 | |
| 79 | include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf |
| 80 | @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach' |
| 81 | ifneq ($(KBUILD_SRC),) |
| 82 | $(Q)mkdir -p include/asm-$(ARCH) |
| 83 | $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach |
| 84 | else |
| 85 | $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach |
| 86 | endif |
| 87 | @touch $@ |
| 88 | |
| 89 | CLEAN_FILES += \ |
| 90 | include/asm-$(ARCH)/asm-offsets.h \ |
| 91 | arch/$(ARCH)/kernel/asm-offsets.s \ |
| 92 | include/asm-$(ARCH)/mach \ |
| 93 | include/asm-$(ARCH)/.mach |
| 94 | |
| 95 | archprepare: include/asm-blackfin/.mach |
| 96 | archclean: |
| 97 | $(Q)$(MAKE) $(clean)=$(boot) |
| 98 | |
| 99 | |
| 100 | all: vmImage |
| 101 | boot := arch/$(ARCH)/boot |
| 102 | BOOT_TARGETS = vmImage |
| 103 | .PHONY: $(BOOT_TARGETS) |
| 104 | $(BOOT_TARGETS): vmlinux |
| 105 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
| 106 | define archhelp |
| 107 | echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)' |
| 108 | endef |