mirror of
https://git.code.sf.net/p/openocd/code
synced 2024-11-26 01:06:47 +00:00
36597636f2
Some file miss completely the license tag. Add the SPDX tag, using the same GPL-2.0-or-later license of the OpenOCD project. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I24bd362eeb6b74f09aceb9b757d45cbfa4afe334 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7160 Tested-by: jenkins
40 lines
940 B
Makefile
40 lines
940 B
Makefile
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
CROSS_COMPILE=arm-linux-gnueabihf-
|
|
BIN2C = ../../../../src/helper/bin2char.sh
|
|
|
|
TGT = sh_qspi
|
|
ASRC += sh_qspi.S
|
|
LDS = sh_qspi.ld
|
|
|
|
OBJS += $(ASRC:.S=.o)
|
|
|
|
CC=$(CROSS_COMPILE)gcc
|
|
OBJCOPY=$(CROSS_COMPILE)objcopy
|
|
OBJDUMP=$(CROSS_COMPILE)objdump
|
|
LD=$(CROSS_COMPILE)ld
|
|
NM=$(CROSS_COMPILE)nm
|
|
SIZE=$(CROSS_COMPILE)size
|
|
|
|
CFLAGS=-Os -Wall -nostartfiles -marm -nostdinc -ffreestanding -mabi=aapcs-linux -mword-relocations -fno-pic -mno-unaligned-access -ffunction-sections -fdata-sections -fno-common -msoft-float -pipe -march=armv7-a -mtune=generic-armv7-a
|
|
LDFLAGS=-T$(LDS) -nostdlib -Map=$(TGT).map
|
|
|
|
all: $(TGT).inc
|
|
|
|
%.o: %.S
|
|
$(CC) $(CFLAGS) -c $^ -o $@
|
|
|
|
$(TGT).elf: $(OBJS)
|
|
$(LD) $(LDFLAGS) $^ -o $@
|
|
|
|
$(TGT).bin: $(TGT).elf
|
|
$(OBJCOPY) $< -O binary $@
|
|
$(NM) -n $(TGT).elf > $(TGT).sym
|
|
$(SIZE) $(TGT).elf
|
|
|
|
$(TGT).inc: $(TGT).bin
|
|
$(BIN2C) < $< > $@
|
|
|
|
clean:
|
|
rm -rf *.elf *.hex *.map *.o *.disasm *.sym
|