-
Notifications
You must be signed in to change notification settings - Fork 0
/
tonc_rules
25 lines (19 loc) · 901 Bytes
/
tonc_rules
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
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
endif
include $(DEVKITARM)/base_rules
PORTLIBS := $(PORTLIBS_PATH)/gba $(PORTLIBS_PATH)/armv4
LIBGBA := $(DEVKITPRO)/libgba
#---------------------------------------------------------------------------------
%.gba: %.elf
$(SILENTCMD)$(OBJCOPY) -O binary $< $@
@echo built ... $(notdir $@)
$(SILENTCMD)gbafix -t"$(ROMNAME)" -m"$(MAKERCODE)" -r"$(VERSION)" $@
#---------------------------------------------------------------------------------
%_mb.elf:
$(SILENTMSG) linking multiboot
$(SILENTCMD)$(LD) -specs=gba_mb.specs $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
#---------------------------------------------------------------------------------
%.elf:
$(SILENTMSG) linking cartridge
$(SILENTCMD)$(LD) $(LDFLAGS) -specs=gba.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $@