Fix IP22 timer calibration.
[linux-2.6/linux-mips.git] / arch / cris / Makefile
blob3a1a7d919725822ce204369b60e2efe894b4419f
1 # $Id: Makefile,v 1.15 2003/07/04 12:47:53 tobiasa Exp $
2 # cris/Makefile
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies. Remember to do have actions
6 # for "archclean" and "archdep" for cleaning up and making dependencies for
7 # this architecture
9 # This file is subject to the terms and conditions of the GNU General Public
10 # License. See the file "COPYING" in the main directory of this archive
11 # for more details.
13 # A bug in ld prevents us from having a (constant-value) symbol in a
14 # "ORIGIN =" or "LENGTH =" expression.
16 arch-y := v10
17 arch-$(CONFIG_ETRAX_ARCH_V10) := v10
19 # No config avaiable for make clean etc
20 ifneq ($(arch-y),)
21 SARCH := arch-$(arch-y)
22 else
23 SARCH :=
24 endif
26 LD = $(CROSS_COMPILE)ld -mcrislinux
27 LDFLAGS_BLOB := --format binary --oformat elf32-cris \
28 -T arch/cris/$(SARCH)/output_arch.ld
30 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
32 AFLAGS_vmlinux.lds.o = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
33 AFLAGS += -mlinux
35 CFLAGS := $(CFLAGS) -mlinux -march=$(arch-y) -pipe
37 ifdef CONFIG_ETRAX_KGDB
38 CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g
39 CFLAGS += -fno-omit-frame-pointer
40 endif
42 HEAD := arch/$(ARCH)/$(SARCH)/kernel/head.o
44 LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)
46 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
47 core-y += arch/$(ARCH)/$(SARCH)/kernel/ arch/$(ARCH)/$(SARCH)/mm/
48 drivers-y += arch/$(ARCH)/$(SARCH)/drivers/
49 libs-y += arch/$(ARCH)/$(SARCH)/lib/ $(LIBGCC)
51 vmlinux.bin: vmlinux
52 $(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux.bin
54 timage: vmlinux.bin
55 cat vmlinux.bin cramfs.img >timage
57 simimage: timage
58 cp vmlinux.bin simvmlinux.bin
60 # the following will remake timage without compiling the kernel
61 # it does of course require that all object files exist...
63 cramfs:
64 ## cramfs - Creates a cramfs image
65 mkcramfs -b 8192 -m romfs_meta.txt root cramfs.img
66 cat vmlinux.bin cramfs.img >timage
68 clinux: vmlinux.bin decompress.bin rescue.bin
70 decompress.bin: FORCE
71 @make -C arch/$(ARCH)/boot/compressed decompress.bin
73 rescue.bin: FORCE
74 @make -C arch/$(ARCH)/boot/rescue rescue.bin
76 zImage: vmlinux.bin rescue.bin
77 ## zImage - Compressed kernel (gzip)
78 @make -C arch/$(ARCH)/boot/ zImage
80 compressed: zImage
82 archmrproper:
83 archclean:
84 $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
85 rm -f timage vmlinux.bin cramfs.img
86 rm -rf $(LD_SCRIPT).tmp
88 prepare: arch/$(ARCH)/.links include/asm-$(ARCH)/.arch \
89 include/asm-$(ARCH)/$(SARCH)/offset.h
91 # Create some links to make all tools happy
92 arch/$(ARCH)/.links:
93 @ln -sfn $(SARCH)/drivers arch/$(ARCH)/drivers
94 @ln -sfn $(SARCH)/boot arch/$(ARCH)/boot
95 @ln -sfn $(SARCH)/lib arch/$(ARCH)/lib
96 @ln -sfn $(SARCH)/vmlinux.lds.S arch/$(ARCH)/vmlinux.lds.S
97 @touch $@
99 # Create link to sub arch includes
100 include/asm-$(ARCH)/.arch: $(wildcard include/config/arch/*.h)
101 @echo ' Making asm-$(ARCH)/arch -> asm-$(ARCH)/$(SARCH) symlink'
102 @rm -f include/asm-$(ARCH)/arch
103 @ln -sf $(SARCH) include/asm-$(ARCH)/arch
104 @touch $@
106 arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
107 include/config/MARKER
109 include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
110 $(call filechk,gen-asm-offsets)