Commit 0430fb20 authored by Haavard Skinnemoen's avatar Haavard Skinnemoen Committed by Linus Torvalds

[PATCH] AVR32: Minor Makefile cleanup

Don't generate listing by default, remove unused LIBGCC variable and
rename generated disassembly and listing files to vmlinux.{s,lst}.

Also make sure that files generated during the build are actually
removed with make clean.
Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 71fa0a84
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# Default target when executing plain make # Default target when executing plain make
.PHONY: all .PHONY: all
all: uImage vmlinux.elf linux.lst all: uImage vmlinux.elf
KBUILD_DEFCONFIG := atstk1002_defconfig KBUILD_DEFCONFIG := atstk1002_defconfig
...@@ -21,9 +21,7 @@ cpuflags-$(CONFIG_CPU_AP7000) += -mcpu=ap7000 ...@@ -21,9 +21,7 @@ cpuflags-$(CONFIG_CPU_AP7000) += -mcpu=ap7000
CFLAGS += $(cpuflags-y) CFLAGS += $(cpuflags-y)
AFLAGS += $(cpuflags-y) AFLAGS += $(cpuflags-y)
CHECKFLAGS += -D__avr32__ CHECKFLAGS += -D__avr32__ -D__BIG_ENDIAN
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o
head-y += arch/avr32/kernel/head.o head-y += arch/avr32/kernel/head.o
...@@ -32,7 +30,7 @@ core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/ ...@@ -32,7 +30,7 @@ core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/
core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/
core-y += arch/avr32/kernel/ core-y += arch/avr32/kernel/
core-y += arch/avr32/mm/ core-y += arch/avr32/mm/
libs-y += arch/avr32/lib/ #$(LIBGCC) libs-y += arch/avr32/lib/
archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap
...@@ -48,6 +46,8 @@ endif ...@@ -48,6 +46,8 @@ endif
archprepare: include/asm-avr32/.arch archprepare: include/asm-avr32/.arch
CLEAN_FILES += include/asm-avr32/.arch include/asm-avr32/arch
BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec
.PHONY: $(BOOT_TARGETS) install .PHONY: $(BOOT_TARGETS) install
...@@ -71,14 +71,19 @@ vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux ...@@ -71,14 +71,19 @@ vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux
install: vmlinux install: vmlinux
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
linux.s: vmlinux vmlinux.s: vmlinux
$(call if_changed,disasm) $(call if_changed,disasm)
linux.lst: vmlinux vmlinux.lst: vmlinux
$(call if_changed,listing) $(call if_changed,listing)
CLEAN_FILES += vmlinux.s vmlinux.lst
archclean:
$(Q)$(MAKE) $(clean)=$(boot)
define archhelp define archhelp
@echo '* vmlinux.elf - ELF image with load address 0' @echo '* vmlinux.elf - ELF image with load address 0'
@echo ' vmlinux.cso - PathFinder CSO image' @echo ' vmlinux.cso - PathFinder CSO image'
@echo ' uImage - Create a bootable image for U-Boot' @echo '* uImage - Create a bootable image for U-Boot'
endef endef
...@@ -37,14 +37,12 @@ OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \ ...@@ -37,14 +37,12 @@ OBJCOPYFLAGS_vmlinux.elf := --change-section-lma .text-0x80000000 \
--change-section-lma .data-0x80000000 \ --change-section-lma .data-0x80000000 \
--change-section-lma .init-0x80000000 \ --change-section-lma .init-0x80000000 \
--change-section-lma .bss-0x80000000 \ --change-section-lma .bss-0x80000000 \
--change-section-lma .initrd-0x80000000 \
--change-section-lma __param-0x80000000 \ --change-section-lma __param-0x80000000 \
--change-section-lma __ksymtab-0x80000000 \ --change-section-lma __ksymtab-0x80000000 \
--change-section-lma __ksymtab_gpl-0x80000000 \ --change-section-lma __ksymtab_gpl-0x80000000 \
--change-section-lma __kcrctab-0x80000000 \ --change-section-lma __kcrctab-0x80000000 \
--change-section-lma __kcrctab_gpl-0x80000000 \ --change-section-lma __kcrctab_gpl-0x80000000 \
--change-section-lma __ksymtab_strings-0x80000000 \ --change-section-lma __ksymtab_strings-0x80000000 \
--change-section-lma .got-0x80000000 \
--set-start 0xa0000000 --set-start 0xa0000000
$(obj)/vmlinux.elf: vmlinux FORCE $(obj)/vmlinux.elf: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
...@@ -59,4 +57,4 @@ install: $(BOOTIMAGE) ...@@ -59,4 +57,4 @@ install: $(BOOTIMAGE)
sh $(srctree)/install-kernel.sh $< sh $(srctree)/install-kernel.sh $<
# Generated files to be removed upon make clean # Generated files to be removed upon make clean
clean-files := vmlinux* uImage uImage.srec clean-files := vmlinux.elf vmlinux.bin vmlinux.gz uImage uImage.srec
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