summaryrefslogtreecommitdiff
path: root/tests/format/elf/Makefile
blob: 0511308f7b365b8b8e5c92162a4b6a518a16aeca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

EXECUTABLES=oob_section_name overlapping_areas strings

all: $(EXECUTABLES)

oob_section_name: oob_section_name.o
	$(ARM_CROSS)objcopy $< -O binary $@

overlapping_areas: overlapping_areas.o
	$(ARM_CROSS)objcopy $< -O binary $@

strings: strings.asm
	grep .global strings.asm | cut -d ' ' -f 2 > keep.lst
	$(ARM_CROSS)as -o strings.o strings.asm
	$(ARM_CROSS)ld -s --retain-symbols-file=keep.lst -o strings strings.o
	rm -f keep.lst


%.o: %.asm
	$(ARM_CROSS)as -c $< -o $@

clean:
	rm -f *.o $(EXECUTABLES)