PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/sh/ramdisk/Makefile

https://bitbucket.org/evzijst/gittest
Makefile | 20 lines | 11 code | 5 blank | 4 comment | 0 complexity | 8b419ce856372b7b3249d97f00c568f1 MD5 | raw file
 1#
 2# Makefile for a ramdisk image
 3#
 4
 5obj-y += ramdisk.o
 6
 7
 8O_FORMAT = $(shell $(OBJDUMP) -i | head -n 2 | grep elf32)
 9img := $(subst ",,$(CONFIG_EMBEDDED_RAMDISK_IMAGE))
10# add $(src) when $(img) is relative
11img := $(subst $(src)//,/,$(src)/$(img))
12
13quiet_cmd_ramdisk = LD      $@
14define cmd_ramdisk
15	$(LD) -T $(srctree)/$(src)/ld.script -b binary --oformat $(O_FORMAT) \
16		-o $@ $(img)
17endef
18
19$(obj)/ramdisk.o: $(img) $(srctree)/$(src)/ld.script
20	$(call cmd,ramdisk)