mirror of
https://github.com/nitraiolo/CfgUSBLoader.git
synced 2024-11-27 13:44:17 +01:00
59 lines
1.0 KiB
Makefile
59 lines
1.0 KiB
Makefile
|
# devkitARM path
|
||
|
DEVKITARM ?= /opt/devkitARM
|
||
|
|
||
|
# Prefix
|
||
|
PREFIX = $(DEVKITARM)/bin/arm-eabi-
|
||
|
|
||
|
# Executables
|
||
|
CC = $(PREFIX)gcc
|
||
|
LD = $(PREFIX)gcc
|
||
|
STRIP = ../stripios/stripios
|
||
|
|
||
|
# Flags
|
||
|
ARCH = -mcpu=arm926ej-s -mthumb -mthumb-interwork -mbig-endian
|
||
|
CFLAGS = $(ARCH) -I. -fomit-frame-pointer -Os -Wall
|
||
|
LDFLAGS = $(ARCH) -nostartfiles -Wl,-T,link.ld,-Map,$(TARGET).map -Wl,--gc-sections -Wl,-static
|
||
|
|
||
|
# Libraries
|
||
|
LIBS =
|
||
|
|
||
|
# Target
|
||
|
TARGET = dip-plugin
|
||
|
|
||
|
# Objects
|
||
|
OBJS = dip.o \
|
||
|
dip_calls.o \
|
||
|
dma.o \
|
||
|
file.o \
|
||
|
ipc.o \
|
||
|
main.o \
|
||
|
patches.o \
|
||
|
plugin.o \
|
||
|
start.o \
|
||
|
swi_mload.o \
|
||
|
syscalls.o \
|
||
|
tools.o \
|
||
|
wbfs.o \
|
||
|
usbstorage.o \
|
||
|
sdhc.o \
|
||
|
frag.o \
|
||
|
|
||
|
|
||
|
$(TARGET).elf: $(OBJS)
|
||
|
@echo -e " LD\t$@"
|
||
|
@$(LD) $(LDFLAGS) $(OBJS) $(LIBS) -o $@.orig
|
||
|
@$(STRIP) $@.orig $@
|
||
|
|
||
|
%.o: %.s
|
||
|
@echo -e " CC\t$@"
|
||
|
@$(CC) $(CFLAGS) -D_LANGUAGE_ASSEMBLY -c -x assembler-with-cpp -o $@ $<
|
||
|
|
||
|
%.o: %.c
|
||
|
@echo -e " CC\t$@"
|
||
|
@$(CC) $(CFLAGS) -c -o $@ $<
|
||
|
|
||
|
clean:
|
||
|
@echo -e "Cleaning..."
|
||
|
@rm -f $(OBJS) $(TARGET).elf $(TARGET).elf.orig $(TARGET).map
|
||
|
|