Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
84b3c277
Commit
84b3c277
authored
Dec 17, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: Makefile cleanup from Sam Ravnborg
parent
23c554b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
89 deletions
+85
-89
arch/ppc64/boot/Makefile
arch/ppc64/boot/Makefile
+85
-89
No files found.
arch/ppc64/boot/Makefile
View file @
84b3c277
...
...
@@ -23,92 +23,88 @@
CROSS32_COMPILE
=
#CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux-
BOOTCC
=
$(CROSS32_COMPILE)
gcc
BOOTCFLAGS
=
$(HOSTCFLAGS)
-I
$(objtree)
/include
BOOTLD
=
$(CROSS32_COMPILE)
ld
BOOTAS
=
$(CROSS32_COMPILE)
as
BOOTAFLAGS
=
-D__ASSEMBLY__
$(HOSTCFLAGS)
$(obj)/start.o
:
$(obj)/start.c
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
$(obj)/main.o
:
$(obj)/main.c
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
$(obj)/zlib.o
:
$(obj)/zlib.c
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
$(obj)/imagesize.o
:
$(obj)/imagesize.c
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
$(obj)/no_initrd.o
:
$(obj)/no_initrd.c
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
$(obj)/crt0.o
:
$(obj)/crt0.S
$(BOOTCC)
$(BOOTAFLAGS)
-traditional
-c
-o
$*
.o
$<
CFLAGS
=
$(CPPFLAGS)
-O
-fno-builtin
-DSTDC_HEADERS
LD_ARGS
=
-Ttext
0x00400000
-e
_start
BOOTCC
:=
$(CROSS32_COMPILE)
gcc
BOOTCFLAGS
:=
$(HOSTCFLAGS)
-Iinclude
BOOTLD
:=
$(CROSS32_COMPILE)
ld
BOOTAS
:=
$(CROSS32_COMPILE)
as
BOOTAFLAGS
:=
-D__ASSEMBLY__
$(HOSTCFLAGS)
CFLAGS
:=
$(CPPFLAGS)
-O
-fno-builtin
-DSTDC_HEADERS
LD_ARGS
:=
-Ttext
0x00400000
-e
_start
OBJCOPYFLAGS
:=
-S
-O
binary
OBJS
=
$(
addprefix
$(obj)
/,crt0.o start.o main.o zlib.o image.o imagesize.o
)
obj-boot
:=
start.o main.o zlib.o imagesize.o no_initrd.o
OBJS
:=
crt0.o start.o main.o zlib.o imagesize.o image.o
obj-boot
:=
$(
addprefix
$(obj)
/,
$
(
obj-boot
))
OBJS
:=
$(
addprefix
$(obj)
/,
$(OBJS)
)
targets
+=
$
(
obj-boot
)
$(
addprefix
$(obj)
/,image.c image.o
)
ifeq
($(CONFIG_PPC_ISERIES),y)
quiet_cmd_bootcc
=
BOOTCC
$@
cmd_bootcc
=
$(BOOTCC)
-Wp
,-MD,
$(depfile)
$(BOOTCFLAGS)
-c
-o
$@
$<
$(obj-boot)
:
%.o: %.c FORCE
$(
call
if_changed_dep,bootcc
)
boot
:
vmlinux.sm
quiet_cmd_bootas
=
BOOTAS
$@
cmd_bootas
=
$(BOOTCC)
-Wp
,-MD,
$(depfile)
$(BOOTAFLAGS)
-traditional
\
-c
-o
$@
$<
$(obj)/crt0.o
:
%.o: %.S FORCE
$(
call
if_changed_dep,bootas
)
$(obj)/addSystemMap
:
$(obj)/addSystemMap.c
$(HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
host-progs
:=
piggyback addnote addSystemMap addRamDisk
HOSTCFLAGS_piggyback.o
:=
-DKERNELBASE
=
$(KERNELBASE)
EXTRA_TARGETS
+=
zImage zImage.initrd vmlinux.bin vmlinux.gz
\
vmlinux.sm vmlinux.initrd vmlinux.sminitrd
\
sysmap.o initrd.o
$(obj)/vmlinux.sm
:
vmlinux $(obj)/addSystemMap
$(obj)
/addSystemMap System.map vmlinux
$(obj)
/vmlinux.sm
quiet_cmd_sysmap
=
SYSMAP
$@
cmd_sysmap
=
$(obj)
/addSystemMap System.map
$<
$@
$(obj)/vmlinux.sm
:
vmlinux $(obj)/addSystemMap System.map FORCE
$(
call
if_changed,sysmap
)
$(obj)/addRamDisk
:
$(obj)/addRamDisk.c
$(HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
quiet_cmd_ramdisk
=
RAMDISK
$@
cmd_ramdisk
=
$(obj)
/addRamDisk
$(obj)
/ramdisk.image.gz System.map
$<
$@
$(obj)/vmlinux.initrd
:
vmlinux $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map FORCE
$(
call
if_changed,ramdisk
)
$(obj)/vmlinux.
initrd
:
vmlinux $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map
$(
obj)
/addRamDisk
$(obj)
/ramdisk.image.gz System.map vmlinux
$(obj)
/vmlinux.initrd
$(obj)/vmlinux.
sminitrd
:
$(obj)/vmlinux.sm $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE
$(
call
if_changed,ramdisk
)
$(obj)/vmlinux.sminitrd
:
$(obj)/vmlinux.sm $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map
$(obj)
/addRamDisk
$(obj)
/ramdisk.image.gz System.map
$(obj)
/vmlinux.sm
$(obj)
/vmlinux.sminitrd
else
boot
:
zImage
endif
quiet_cmd_piggy
=
PIGGY
$@
cmd_piggy
=
$(obj)
/piggyback
$
(
@:.o
=)
<
$<
|
$(BOOTAS)
-o
$@
$(obj)/
piggyback
:
$(obj)/piggyback.c
$(
HOSTCC)
$(HOSTCFLAGS)
-DKERNELBASE
=
$(KERNELBASE)
-o
$@
$<
$(obj)/
image.o
:
$(obj)/vmlinux.gz $(obj)/piggyback FORCE
$(
call
if_changed,piggy
)
$(obj)/
addnote
:
$(obj)/addnote.c
$(
HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
$(obj)/
sysmap.o
:
System.map $(obj)/piggyback FORCE
$(
call
if_changed,piggy
)
$(obj)/i
mage.o
:
$(obj)/piggyback $(obj)/vmlinux.gz
$(
obj)
/piggyback
$(obj)
/image <
$(obj)
/vmlinux.gz |
$(BOOTAS)
-o
$@
$(obj)/i
nitrd.o
:
$(obj)/ramdisk.image.gz $(obj)/piggyback FORCE
$(
call
if_changed,piggy
)
$(obj)/sysmap.o
:
$(obj)/piggyback System.map
$(obj)
/piggyback
$(obj)
/sysmap < System.map |
$(BOOTAS)
-o
$(obj)
/sysmap.o
quiet_cmd_addnote
=
ADDNOTE
$@
cmd_addnote
=
$(BOOTLD)
$(LD_ARGS)
-T
$(obj)
/zImage.lds
-o
$@
$(OBJS)
$<
\
&&
$(obj)
/addnote
$@
$(obj)/
initrd.o
:
$(obj)/ramdisk.image.gz $(obj)/piggyback
$(
obj)
/piggyback
$(obj)
/initrd <
$(obj)
/ramdisk.image.gz |
$(BOOTAS)
-o
$(obj)
/initrd.o
$(obj)/
zImage
:
$(obj)/no_initrd.o $(OBJS) $(obj)/addnote FORCE
$(
call
if_changed,addnote
)
$(obj)/zImage
:
$(OBJS) $(obj)/no_initrd.o $(obj)/addnote
$(BOOTLD)
$(LD_ARGS)
-T
$(obj)
/zImage.lds
-o
$@
$(OBJS)
$(obj)
/no_initrd.o
$(obj)
/addnote
$@
$(obj)/zImage.initrd
:
$(obj)/initrd.o $(OBJS) $(obj)/addnote FORCE
$(
call
if_changed,addnote
)
$(obj)/zImage.initrd
:
$(OBJS) $(obj)/initrd.o $(obj)/addnote
$(BOOTLD)
$(LD_ARGS)
-T
$(obj)
/zImage.lds
-o
$@
$(OBJS)
$(obj)
/initrd.o
./addnote
$@
$(obj)/vmlinux.bin
:
vmlinux FORCE
$(
call
if_changed,objcopy
)
$(obj)/vmlinux.gz
:
vmlinux
$(OBJCOPY)
$(OBJCOPYFLAGS)
vmlinux
$(obj)
/vmlinux
ls
-l
$(obj)
/vmlinux |
awk
'{printf "/* generated -- do not edit! */\nint uncompressed_size = %d;\n", $$5}'
>
$(obj)
/imagesize.c
$(CROSS_COMPILE)
nm
-n
vmlinux |
tail
-1
|
awk
'{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}'
>>
$(obj)
/imagesize.c
gzip
-vf9
$(obj)
/vmlinux
$(obj)/vmlinux.gz
:
$(obj)/vmlinux.bin FORCE
$(
call
if_changed,gzip
)
$(obj)/imagesize.c
:
$(obj)/vmlinux.gz
$(obj)/imagesize.c
:
vmlinux
@
echo
Generating
$@
ls
-l
vmlinux |
\
awk
'{printf "/* generated -- do not edit! */\n" \
"int uncompressed_size = %d;\n", $$5}'
>
$(obj)
/imagesize.c
$(CROSS_COMPILE)
nm
-n
vmlinux |
tail
-1
|
\
awk
'{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}'
\
>>
$(obj)
/imagesize.c
clean
:
@
rm
-f
$(OBJS)
@
rm
-f
$(
addprefix
$(obj)
/,piggyback note addnote zImage
\
zImage.initrd vmlinux.gz no_initrd.o imagesize.c addSystemMap
\
vmlinux.sm addRamDisk vmlinux.initrd vmlinux.sminitrd
)
clean-files
:=
$(targets)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment