summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v32/boot/rescue/Makefile
blob: f668a819872408c03d04de55c00790e2e8ac5f57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# Makefile for rescue code
#
target = $(target_rescue_dir)
src    = $(src_rescue_dir)

CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE)
CFLAGS = -O2
LD = gcc-cris -mlinux -march=v32 -nostdlib
OBJCOPY = objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss

all: $(target)/rescue.bin

rescue: rescue.bin
	# do nothing

$(target)/rescue.bin: $(target) $(target)/head.o
	$(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o
	$(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin
	cp -p $(target)/rescue.bin $(objtree)

$(target):
	mkdir -p $(target)

$(target)/head.o: $(src)/head.S
	$(CC) -D__ASSEMBLY__ -c $< -o $*.o

clean:
	rm -f $(target)/*.o $(target)/*.bin

fastdep:

modules:

modules-install: