Commit 56d40a81 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: Makefile tidy-up, mostly from Sam Ravnborg

parent bd42440a
# This file is included by the global makefile so that you can add your own # 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 # architecture-specific flags and dependencies.
# 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 # 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 # License. See the file "COPYING" in the main directory of this archive
...@@ -17,24 +15,20 @@ KERNELLOAD =$(CONFIG_KERNEL_START) ...@@ -17,24 +15,20 @@ KERNELLOAD =$(CONFIG_KERNEL_START)
LDFLAGS_BLOB := --format binary --oformat elf32-powerpc LDFLAGS_BLOB := --format binary --oformat elf32-powerpc
LDFLAGS_vmlinux = -Ttext $(KERNELLOAD) -Bstatic LDFLAGS_vmlinux = -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH) CPPFLAGS += -Iarch/$(ARCH)
AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH) AFLAGS += -Iarch/$(ARCH)
CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -msoft-float -pipe \ cflags-y += -Iarch/$(ARCH) -msoft-float -pipe \
-ffixed-r2 -Wno-uninitialized -mmultiple -mstring -ffixed-r2 -Wno-uninitialized -mmultiple -mstring
CPP = $(CC) -E $(CFLAGS) CPP = $(CC) -E $(CFLAGS)
ifdef CONFIG_4xx cflags-$(CONFIG_4xx) += -Wa,-m405
CFLAGS := $(CFLAGS) -Wa,-m405 cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
endif # Use sed to remove the quotes.
cflags-$(CONFIG_MORE_COMPILE_OPTIONS) += \
$(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
ifdef CONFIG_PPC64BRIDGE CFLAGS += $(cflags-y)
CFLAGS := $(CFLAGS) -Wa,-mppc64bridge
endif
ifdef CONFIG_MORE_COMPILE_OPTIONS
# Use sed to remove the quotes.
CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
endif
head-y := arch/ppc/kernel/head.o head-y := arch/ppc/kernel/head.o
head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
HOSTCFLAGS += -I$(TOPDIR)/arch/$(ARCH)/boot/include HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
...@@ -21,7 +21,7 @@ subdir-y := lib common images ...@@ -21,7 +21,7 @@ subdir-y := lib common images
subdir-$(CONFIG_ALL_PPC) += of1275 subdir-$(CONFIG_ALL_PPC) += of1275
# for cleaning # for cleaning
subdir- += simple openfirmware prep subdir- += simple/ openfirmware/ prep/
tools-$(CONFIG_ALL_PPC) := addnote mknote hack-coff mkprep tools-$(CONFIG_ALL_PPC) := addnote mknote hack-coff mkprep
tools-$(CONFIG_PPLUS) := mkbugboot mkprep tools-$(CONFIG_PPLUS) := mkbugboot mkprep
...@@ -34,8 +34,6 @@ tools-$(CONFIG_PRPMC750) := mkbugboot mkprep ...@@ -34,8 +34,6 @@ tools-$(CONFIG_PRPMC750) := mkbugboot mkprep
tools-$(CONFIG_PRPMC800) := mkbugboot mkprep tools-$(CONFIG_PRPMC800) := mkbugboot mkprep
tools-$(CONFIG_SPRUCE) := mktree tools-$(CONFIG_SPRUCE) := mktree
all-tools := addnote mknote hack-coff mkprep mkbugboot mktree
host-progs := $(addprefix utils/,$(tools-y)) host-progs := $(addprefix utils/,$(tools-y))
.PHONY: $(BOOT_TARGETS) $(bootdir-y) .PHONY: $(BOOT_TARGETS) $(bootdir-y)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# This dir holds all of the images for PPC machines. # This dir holds all of the images for PPC machines.
# Tom Rini January 2001 # Tom Rini January 2001
targets := vmlinux.gz extra-y := vmlinux.gz
GZIP_FLAGS := -v9f GZIP_FLAGS := -v9f
$(obj)/vmlinux.gz: vmlinux $(obj)/vmlinux.gz: vmlinux
......
...@@ -26,10 +26,15 @@ COFF_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00700000 -Bstatic ...@@ -26,10 +26,15 @@ COFF_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00700000 -Bstatic
CHRP_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00800000 CHRP_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x00800000
NEWWORLD_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x01000000 NEWWORLD_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x01000000
COMMONOBJS = $(obj)/start.o $(obj)/misc.o $(obj)/common.o COMMONOBJS := start.o misc.o common.o
COFFOBJS = $(obj)/coffcrt0.o $(COMMONOBJS) $(obj)/coffmain.o COFFOBJS := coffcrt0.o $(COMMONOBJS) coffmain.o
CHRPOBJS = $(obj)/crt0.o $(COMMONOBJS) $(obj)/chrpmain.o CHRPOBJS := crt0.o $(COMMONOBJS) chrpmain.o
NEWWORLDOBJS = $(obj)/crt0.o $(COMMONOBJS) $(obj)/newworldmain.o NEWWORLDOBJS := crt0.o $(COMMONOBJS) newworldmain.o
EXTRA_TARGETS := $(COFFOBJS) $(CHRPOBJS) $(NEWWORLDOBJS)
COFFOBJS := $(addprefix $(obj)/, $(COFFOBJS))
CHRPOBJS := $(addprefix $(obj)/, $(CHRPOBJS))
NEWWORLDOBJS := $(addprefix $(obj)/, $(NEWWORLDOBJS))
LIBS = lib/lib.a $(bootlib)/lib.a $(of1275)/lib.a $(common)/lib.a LIBS = lib/lib.a $(bootlib)/lib.a $(of1275)/lib.a $(common)/lib.a
......
...@@ -35,6 +35,7 @@ of1275 := $(boot)/of1275 ...@@ -35,6 +35,7 @@ of1275 := $(boot)/of1275
images := $(boot)/images images := $(boot)/images
simple := $(boot)/simple simple := $(boot)/simple
EXTRA_TARGETS := $(boot-y) ../simple/legacy.o
OBJS := $(addprefix $(obj)/,$(boot-y)) $(simple)/legacy.o OBJS := $(addprefix $(obj)/,$(boot-y)) $(simple)/legacy.o
# Tools # Tools
......
...@@ -28,11 +28,8 @@ obj-$(CONFIG_PCI) += pci-dma.o ...@@ -28,11 +28,8 @@ obj-$(CONFIG_PCI) += pci-dma.o
obj-$(CONFIG_KGDB) += ppc-stub.o obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_TAU) += temp.o obj-$(CONFIG_TAU) += temp.o
ifeq ($(CONFIG_8xx),y)
ifneq ($(CONFIG_MATH_EMULATION),n) ifdef CONFIG_MATH_EMULATION
obj-y += softemu8xx.o obj-$(CONFIG_8xx) += softemu8xx.o
endif
endif endif
find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
...@@ -10,7 +10,7 @@ EXTRA_AFLAGS := -Wa,-m405 ...@@ -10,7 +10,7 @@ EXTRA_AFLAGS := -Wa,-m405
endif endif
# Extra CFLAGS so we don't have to do relative includes # Extra CFLAGS so we don't have to do relative includes
CFLAGS_pmac_setup.o += -I$(TOPDIR)/arch/$(ARCH)/mm CFLAGS_pmac_setup.o += -Iarch/$(ARCH)/mm
obj-$(CONFIG_APUS) += apus_setup.o obj-$(CONFIG_APUS) += apus_setup.o
ifeq ($(CONFIG_APUS),y) ifeq ($(CONFIG_APUS),y)
......
...@@ -64,5 +64,3 @@ obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \ ...@@ -64,5 +64,3 @@ obj-$(CONFIG_ZX4500) += indirect_pci.o pci_auto.o mpc10x_common.o \
obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o obj-$(CONFIG_8260) += m8260_setup.o ppc8260_pic.o
obj-$(CONFIG_BOOTX_TEXT) += btext.o obj-$(CONFIG_BOOTX_TEXT) += btext.o
find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment