Blame view

arch/cris/Makefile 2.57 KB
2c2314bf6   Jesper Nilsson   CRIS: Update main...
1
  #
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
2
3
4
5
6
7
8
9
10
11
  # cris/Makefile
  #
  # This file is included by the global makefile so that you can add your own
  # architecture-specific flags and dependencies. Remember to do have actions
  # for "archclean" and "archdep" for cleaning up and making dependencies for
  # this architecture
  #
  # This file is subject to the terms and conditions of the GNU General Public
  # License.  See the file "COPYING" in the main directory of this archive
  # for more details.
8f808417f   Adrian Bunk   CRIS: proper defc...
12
  KBUILD_DEFCONFIG := etrax-100lx_v2_defconfig
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
13
14
  arch-y := v10
  arch-$(CONFIG_ETRAX_ARCH_V10) := v10
3e41d6522   Mikael Starvik   [PATCH] CRIS upda...
15
  arch-$(CONFIG_ETRAX_ARCH_V32) := v32
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
16

2c2314bf6   Jesper Nilsson   CRIS: Update main...
17
18
19
20
  # No config available for make clean etc
  mach-y := fs
  mach-$(CONFIG_CRIS_MACH_ARTPEC3) := a3
  mach-$(CONFIG_ETRAXFS) := fs
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
21
22
  ifneq ($(arch-y),)
  SARCH := arch-$(arch-y)
abbf1590d   David Howells   UAPI: Partition t...
23
24
25
  inc := -Iarch/cris/include/uapi/$(SARCH)
  inc += -Iarch/cris/include/$(SARCH)
  inc += -Iarch/cris/include/uapi/$(SARCH)/arch
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
26
  inc += -Iarch/cris/include/$(SARCH)/arch
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
27
28
  else
  SARCH :=
556dcee7b   Jesper Nilsson   [CRIS] Move heade...
29
  inc :=
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
30
  endif
2c2314bf6   Jesper Nilsson   CRIS: Update main...
31
32
  ifneq ($(mach-y),)
  MACH := mach-$(mach-y)
556dcee7b   Jesper Nilsson   [CRIS] Move heade...
33
34
  inc += -Iarch/cris/include/$(SARCH)/$(MACH)/
  inc += -Iarch/cris/include/$(SARCH)/$(MACH)/mach
2c2314bf6   Jesper Nilsson   CRIS: Update main...
35
36
37
  else
  MACH :=
  endif
a9f75ac5a   Rabin Vincent   CRISv32: add devi...
38
39
40
  ifneq ($(CONFIG_BUILTIN_DTB),"")
  core-$(CONFIG_OF) += arch/cris/boot/dts/
  endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
41
42
43
  LD = $(CROSS_COMPILE)ld -mcrislinux
  
  OBJCOPYFLAGS := -O binary -R .note -R .comment -S
556dcee7b   Jesper Nilsson   [CRIS] Move heade...
44
45
46
  KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc)
  KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc)
  KBUILD_CPPFLAGS += $(inc)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
47
48
  
  ifdef CONFIG_FRAME_POINTER
a0f97e06a   Sam Ravnborg   kbuild: enable 'm...
49
50
  KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
  KBUILD_CFLAGS += -fno-omit-frame-pointer
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51
  endif
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
52
  head-y := arch/cris/$(SARCH)/kernel/head.o
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
53

a0f97e06a   Sam Ravnborg   kbuild: enable 'm...
54
  LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libgcc.a)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
55

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
56
57
  core-y		+= arch/cris/kernel/ arch/cris/mm/
  core-y		+= arch/cris/$(SARCH)/kernel/ arch/cris/$(SARCH)/mm/
2c2314bf6   Jesper Nilsson   CRIS: Update main...
58
  ifdef CONFIG_ETRAX_ARCH_V32
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
59
  core-y		+= arch/cris/$(SARCH)/$(MACH)/
2c2314bf6   Jesper Nilsson   CRIS: Update main...
60
  endif
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
61
62
  drivers-y	+= arch/cris/$(SARCH)/drivers/
  libs-y		+= arch/cris/$(SARCH)/lib/ $(LIBGCC)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
63

3e41d6522   Mikael Starvik   [PATCH] CRIS upda...
64
  # cris source path
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
65
  SRC_ARCH              = $(srctree)/arch/cris
3e41d6522   Mikael Starvik   [PATCH] CRIS upda...
66
  # cris object files path
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
67
  OBJ_ARCH              = $(objtree)/arch/cris
3e41d6522   Mikael Starvik   [PATCH] CRIS upda...
68

66ab3a74c   Jesper Nilsson   CRIS: Merge machi...
69
  boot := arch/cris/boot
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
70
  MACHINE := arch/cris/$(SARCH)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
71

2c2314bf6   Jesper Nilsson   CRIS: Update main...
72
  all: zImage
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
73

2c2314bf6   Jesper Nilsson   CRIS: Update main...
74
75
  zImage Image: vmlinux
  	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
76

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
77
  archprepare:
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
78

2c2314bf6   Jesper Nilsson   CRIS: Update main...
79
  archclean:
66ab3a74c   Jesper Nilsson   CRIS: Merge machi...
80
81
  	$(Q)if [ -e arch/cris/boot ]; then \
  		$(MAKE) $(clean)=arch/cris/boot; \
2c2314bf6   Jesper Nilsson   CRIS: Update main...
82
83
84
  	fi
  
  CLEAN_FILES += \
66ab3a74c   Jesper Nilsson   CRIS: Merge machi...
85
86
87
88
  	$(boot)/zImage \
  	$(boot)/compressed/decompress.bin \
  	$(boot)/compressed/piggy.gz \
  	$(boot)/rescue/rescue.bin
2c2314bf6   Jesper Nilsson   CRIS: Update main...
89

0365f707c   Jesper Nilsson   [CRIS] Merge asm-...
90

c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
91
  # MRPROPER_FILES +=
2c2314bf6   Jesper Nilsson   CRIS: Update main...
92
93
  
  define archhelp
c5ec6fb08   Jesper Nilsson   [CRIS] Remove lin...
94
95
    echo  '* zImage        - Compressed kernel image (arch/cris/boot/zImage)'
    echo  '* Image         - Uncompressed kernel image (arch/cris/boot/Image)'
2c2314bf6   Jesper Nilsson   CRIS: Update main...
96
  endef