]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/blackfin/cpu/Makefile
kbuild: change out-of-tree build
[karo-tx-uboot.git] / arch / blackfin / cpu / Makefile
index 243dc22a0c61470e9c01ca8542f0884168eafc89..369dc74e947848c94543b9050fb0433bbd200432 100644 (file)
@@ -23,21 +23,11 @@ obj-y  += traps.o
 
 extra-y += check_initcode
 
-extra-y += bootrom-asm-offsets.h
-$(obj)bootrom-asm-offsets.c: bootrom-asm-offsets.c.in bootrom-asm-offsets.awk
-       echo '#include <asm/mach-common/bits/bootrom.h>' | $(CPP) $(CPPFLAGS) - | gawk -f ./bootrom-asm-offsets.awk > $@.tmp
-       mv $@.tmp $@
-$(obj)bootrom-asm-offsets.s: $(obj)bootrom-asm-offsets.c
-       $(CC) $(CFLAGS) -S $^ -o $@.tmp
-       mv $@.tmp $@
-$(obj)bootrom-asm-offsets.h: $(obj)bootrom-asm-offsets.s
-       sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" $^ > $@
-
 # make sure our initcode (which goes into LDR) does not
 # have relocs or external references
-$(obj)initcode.o: CFLAGS += -fno-function-sections -fno-data-sections
+$(obj)/initcode.o: CFLAGS += -fno-function-sections -fno-data-sections
 READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $<
-$(obj)check_initcode: $(obj)initcode.o
+$(obj)/check_initcode: $(obj)/initcode.o
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
        @if $(READINIT) | grep '\<GLOBAL\>.*\<UND\>' ; then \
                echo "$< contains external references!" 1>&2 ; \
@@ -45,7 +35,7 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
        fi
 endif
 
-$(obj)init.lds: init.lds.S
+$(obj)/init.lds: $(src)/init.lds.S
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@
-$(obj)init.elf: $(obj)init.lds $(obj)init.o $(obj)initcode.o
+$(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o
        $(LD) $(LDFLAGS) -T $^ -o $@