contrib: add GPL license tag on files that miss it
[fw/openocd] / contrib / loaders / debug / xscale / Makefile
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 BIN2C = ../../../../src/helper/bin2char.sh
4
5 CROSS_COMPILE ?= arm-none-eabi-
6
7 CC=$(CROSS_COMPILE)gcc
8 OBJCOPY=$(CROSS_COMPILE)objcopy
9 OBJDUMP=$(CROSS_COMPILE)objdump
10
11 CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
12 LDFLAGS = -Tdebug_handler.ld
13
14 all: debug_handler.inc
15
16 .PHONY: clean
17
18 .INTERMEDIATE: debug_handler.elf
19
20 debug_handler.elf: protocol.h
21
22 %.elf: %.S
23         $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
24
25 %.lst: %.elf
26         $(OBJDUMP) -S $< > $@
27
28 %.bin: %.elf
29         $(OBJCOPY) -Obinary $< $@
30
31 %.inc: %.bin
32         $(BIN2C) < $< > $@
33
34 clean:
35         -rm -f *.elf *.lst *.bin *.inc