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
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
# architecture-specific flags and dependencies.
#
# 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
......@@ -17,24 +15,20 @@ KERNELLOAD =$(CONFIG_KERNEL_START)
LDFLAGS_BLOB := --format binary --oformat elf32-powerpc
LDFLAGS_vmlinux = -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH)
AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH)
CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -msoft-float -pipe \
CPPFLAGS += -Iarch/$(ARCH)
AFLAGS += -Iarch/$(ARCH)
cflags-y += -Iarch/$(ARCH) -msoft-float -pipe \
-ffixed-r2 -Wno-uninitialized -mmultiple -mstring
CPP = $(CC) -E $(CFLAGS)
ifdef CONFIG_4xx
CFLAGS := $(CFLAGS) -Wa,-m405
endif
cflags-$(CONFIG_4xx) += -Wa,-m405
cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
# 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) -Wa,-mppc64bridge
endif
CFLAGS += $(cflags-y)
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-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
......
......@@ -10,8 +10,8 @@
# modified by Cort (cort@cs.nmt.edu)
#
CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
HOSTCFLAGS += -I$(TOPDIR)/arch/$(ARCH)/boot/include
CFLAGS += -fno-builtin -D__BOOTER__ -Iarch/$(ARCH)/boot/include
HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
......@@ -21,7 +21,7 @@ subdir-y := lib common images
subdir-$(CONFIG_ALL_PPC) += of1275
# for cleaning
subdir- += simple openfirmware prep
subdir- += simple/ openfirmware/ prep/
tools-$(CONFIG_ALL_PPC) := addnote mknote hack-coff mkprep
tools-$(CONFIG_PPLUS) := mkbugboot mkprep
......@@ -34,8 +34,6 @@ tools-$(CONFIG_PRPMC750) := mkbugboot mkprep
tools-$(CONFIG_PRPMC800) := mkbugboot mkprep
tools-$(CONFIG_SPRUCE) := mktree
all-tools := addnote mknote hack-coff mkprep mkbugboot mktree
host-progs := $(addprefix utils/,$(tools-y))
.PHONY: $(BOOT_TARGETS) $(bootdir-y)
......
......@@ -2,7 +2,7 @@
# This dir holds all of the images for PPC machines.
# Tom Rini January 2001
targets := vmlinux.gz
extra-y := vmlinux.gz
GZIP_FLAGS := -v9f
$(obj)/vmlinux.gz: vmlinux
......
......@@ -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
NEWWORLD_LD_ARGS = -T $(boot)/ld.script -e _start -Ttext 0x01000000
COMMONOBJS = $(obj)/start.o $(obj)/misc.o $(obj)/common.o
COFFOBJS = $(obj)/coffcrt0.o $(COMMONOBJS) $(obj)/coffmain.o
CHRPOBJS = $(obj)/crt0.o $(COMMONOBJS) $(obj)/chrpmain.o
NEWWORLDOBJS = $(obj)/crt0.o $(COMMONOBJS) $(obj)/newworldmain.o
COMMONOBJS := start.o misc.o common.o
COFFOBJS := coffcrt0.o $(COMMONOBJS) coffmain.o
CHRPOBJS := crt0.o $(COMMONOBJS) chrpmain.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
......
......@@ -35,7 +35,8 @@ of1275 := $(boot)/of1275
images := $(boot)/images
simple := $(boot)/simple
OBJS := $(addprefix $(obj)/,$(boot-y)) $(simple)/legacy.o
EXTRA_TARGETS := $(boot-y) ../simple/legacy.o
OBJS := $(addprefix $(obj)/,$(boot-y)) $(simple)/legacy.o
# Tools
MKPREP := $(utils)/mkprep
......
......@@ -28,11 +28,8 @@ obj-$(CONFIG_PCI) += pci-dma.o
obj-$(CONFIG_KGDB) += ppc-stub.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_TAU) += temp.o
ifeq ($(CONFIG_8xx),y)
ifneq ($(CONFIG_MATH_EMULATION),n)
obj-y += softemu8xx.o
endif
ifdef CONFIG_MATH_EMULATION
obj-$(CONFIG_8xx) += softemu8xx.o
endif
find_name : find_name.c
$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
......@@ -10,7 +10,7 @@ EXTRA_AFLAGS := -Wa,-m405
endif
# 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
ifeq ($(CONFIG_APUS),y)
......
......@@ -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_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