aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/boot/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sparc/boot/Makefile
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/sparc/boot/Makefile')
-rw-r--r--arch/sparc/boot/Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
new file mode 100644
index 000000000000..b365084316ac
--- /dev/null
+++ b/arch/sparc/boot/Makefile
@@ -0,0 +1,58 @@
1# $Id: Makefile,v 1.10 2000/02/23 08:17:46 jj Exp $
2# Makefile for the Sparc boot stuff.
3#
4# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
5# Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
6
7ROOT_IMG := /usr/src/root.img
8ELFTOAOUT := elftoaout
9
10hostprogs-y := piggyback btfixupprep
11targets := tftpboot.img btfix.o btfix.S image
12
13quiet_cmd_elftoaout = ELFTOAOUT $@
14 cmd_elftoaout = $(ELFTOAOUT) $(obj)/image -o $@
15quiet_cmd_piggy = PIGGY $@
16 cmd_piggy = $(obj)/piggyback $@ $(obj)/System.map $(ROOT_IMG)
17quiet_cmd_btfix = BTFIX $@
18 cmd_btfix = $(OBJDUMP) -x vmlinux | $(obj)/btfixupprep > $@
19quiet_cmd_sysmap = SYSMAP $(obj)/System.map
20 cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap
21quiet_cmd_image = LD $@
22 cmd_image = $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(@F)) -o $@
23
24define rule_image
25 $(if $($(quiet)cmd_image), \
26 echo ' $($(quiet)cmd_image)' &&) \
27 $(cmd_image); \
28 $(if $($(quiet)cmd_sysmap), \
29 echo ' $($(quiet)cmd_sysmap)' &&) \
30 $(cmd_sysmap) $@ $(obj)/System.map; \
31 if [ $$? -ne 0 ]; then \
32 rm -f $@; \
33 /bin/false; \
34 fi; \
35 echo 'cmd_$@ := $(cmd_image)' > $(@D)/.$(@F).cmd
36endef
37
38BTOBJS := $(HEAD_Y) $(INIT_Y)
39BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
40LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \
41 --start-group $(BTLIBS) --end-group \
42 $(kallsyms.o) $(obj)/btfix.o
43
44# Link the final image including btfixup'ed symbols.
45# This is a replacement for the link done in the top-level Makefile.
46# Note: No dependency on the prerequisite files since that would require
47# make to try check if they are updated - and due to changes
48# in gcc options (path for example) this would result in
49# these files being recompiled for each build.
50$(obj)/image: $(obj)/btfix.o FORCE
51 $(call if_changed_rule,image)
52
53$(obj)/tftpboot.img: $(obj)/piggyback $(obj)/System.map $(obj)/image FORCE
54 $(call if_changed,elftoaout)
55 $(call if_changed,piggy)
56
57$(obj)/btfix.S: $(obj)/btfixupprep vmlinux FORCE
58 $(call if_changed,btfix)